diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 09387f856d63..6a1d92ad1942 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -132,7 +132,7 @@ importers: version: file:projects/arm-automation.tgz '@rush-temp/arm-avs': specifier: file:./projects/arm-avs.tgz - version: file:projects/arm-avs.tgz + version: file:projects/arm-avs.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-azureadexternalidentities': specifier: file:./projects/arm-azureadexternalidentities.tgz version: file:projects/arm-azureadexternalidentities.tgz @@ -2599,7 +2599,7 @@ packages: version: 0.0.0 '@rush-temp/arm-avs@file:projects/arm-avs.tgz': - resolution: {integrity: sha512-YaWz2KgrKnUtn3asgtVFZEJV3nHmehSdCrN/q32IyW4H9n8Np7He6V/jq1RqU3AtDTdCSu3UVcJGtcbyDmDvwg==, tarball: file:projects/arm-avs.tgz} + resolution: {integrity: sha512-AW+c3+UgNQ1kyAA7599Ee2dKQcNh1X+dLJMfA1mblHadqA9GTByHdzzS0+VDCe7vlmVpp4Yb75IUsGXxYoLX0Q==, tarball: file:projects/arm-avs.tgz} version: 0.0.0 '@rush-temp/arm-azureadexternalidentities@file:projects/arm-azureadexternalidentities.tgz': @@ -10770,26 +10770,38 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-avs@file:projects/arm-avs.tgz': + '@rush-temp/arm-avs@file:projects/arm-avs.tgz(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 - '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 + '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/node': 18.19.68 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + eslint: 9.17.0 + playwright: 1.49.1 tslib: 2.8.1 - tsx: 4.19.2 - typescript: 5.7.2 + typescript: 5.6.3 + vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.6.8(@types/node@22.7.9)(typescript@5.7.2)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-azureadexternalidentities@file:projects/arm-azureadexternalidentities.tgz': dependencies: @@ -20609,7 +20621,7 @@ snapshots: ajv-formats@3.0.1: dependencies: - ajv: 8.13.0 + ajv: 8.17.1 ajv@6.12.6: dependencies: diff --git a/sdk/avs/arm-avs/CHANGELOG.md b/sdk/avs/arm-avs/CHANGELOG.md index ccd70a10a6c9..4b1c5a7d77c6 100644 --- a/sdk/avs/arm-avs/CHANGELOG.md +++ b/sdk/avs/arm-avs/CHANGELOG.md @@ -1,15 +1,464 @@ # Release History - -## 6.0.1 (Unreleased) - + +## 7.0.0 (2024-12-20) + ### Features Added -### Breaking Changes - -### Bugs Fixed + - Added operation AddonsOperations.createOrUpdate + - Added operation AddonsOperations.delete + - Added operation AuthorizationsOperations.createOrUpdate + - Added operation AuthorizationsOperations.delete + - Added operation CloudLinksOperations.createOrUpdate + - Added operation CloudLinksOperations.delete + - Added operation ClustersOperations.createOrUpdate + - Added operation ClustersOperations.delete + - Added operation ClustersOperations.update + - Added operation DatastoresOperations.createOrUpdate + - Added operation DatastoresOperations.delete + - Added operation GlobalReachConnectionsOperations.createOrUpdate + - Added operation GlobalReachConnectionsOperations.delete + - Added operation IscsiPathsOperations.createOrUpdate + - Added operation IscsiPathsOperations.delete + - Added operation PlacementPoliciesOperations.createOrUpdate + - Added operation PlacementPoliciesOperations.delete + - Added operation PlacementPoliciesOperations.update + - Added operation PrivateCloudsOperations.createOrUpdate + - Added operation PrivateCloudsOperations.delete + - Added operation PrivateCloudsOperations.rotateNsxtPassword + - Added operation PrivateCloudsOperations.rotateVcenterPassword + - Added operation PrivateCloudsOperations.update + - Added operation ScriptExecutionsOperations.createOrUpdate + - Added operation ScriptExecutionsOperations.delete + - Added operation VirtualMachinesOperations.restrictMovement + - Added operation WorkloadNetworksOperations.createDhcp + - Added operation WorkloadNetworksOperations.createDnsService + - Added operation WorkloadNetworksOperations.createDnsZone + - Added operation WorkloadNetworksOperations.createPortMirroring + - Added operation WorkloadNetworksOperations.createPublicIP + - Added operation WorkloadNetworksOperations.createSegment + - Added operation WorkloadNetworksOperations.createVMGroup + - Added operation WorkloadNetworksOperations.deleteDhcp + - Added operation WorkloadNetworksOperations.deleteDnsService + - Added operation WorkloadNetworksOperations.deleteDnsZone + - Added operation WorkloadNetworksOperations.deletePortMirroring + - Added operation WorkloadNetworksOperations.deletePublicIP + - Added operation WorkloadNetworksOperations.deleteSegment + - Added operation WorkloadNetworksOperations.deleteVMGroup + - Added operation WorkloadNetworksOperations.updateDhcp + - Added operation WorkloadNetworksOperations.updateDnsService + - Added operation WorkloadNetworksOperations.updateDnsZone + - Added operation WorkloadNetworksOperations.updatePortMirroring + - Added operation WorkloadNetworksOperations.updateSegment + - Added operation WorkloadNetworksOperations.updateVMGroup + - Added Interface AvsClientOptionalParams + - Added Interface CloudLinkProperties + - Added Interface ClusterProperties + - Added Interface ClusterUpdateProperties + - Added Interface DatastoreProperties + - Added Interface ExpressRouteAuthorizationProperties + - Added Interface GlobalReachConnectionProperties + - Added Interface HcxEnterpriseSiteProperties + - Added Interface IscsiPathProperties + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface PlacementPolicyUpdateProperties + - Added Interface PrivateCloudProperties + - Added Interface PrivateCloudUpdateProperties + - Added Interface RestorePollerOptions + - Added Interface ScriptCmdletProperties + - Added Interface ScriptExecutionProperties + - Added Interface ScriptPackageProperties + - Added Interface VirtualMachineProperties + - Added Interface WorkloadNetworkDnsServiceProperties + - Added Interface WorkloadNetworkDnsZoneProperties + - Added Interface WorkloadNetworkGatewayProperties + - Added Interface WorkloadNetworkPortMirroringProperties + - Added Interface WorkloadNetworkProperties + - Added Interface WorkloadNetworkPublicIPProperties + - Added Interface WorkloadNetworksCreateSegmentOptionalParams + - Added Interface WorkloadNetworkSegmentProperties + - Added Interface WorkloadNetworksUpdateSegmentOptionalParams + - Added Interface WorkloadNetworkVirtualMachineProperties + - Added Interface WorkloadNetworkVMGroupProperties + - Added Class AvsClient + - Added Type Alias ContinuablePage + - Added Type Alias SystemAssignedServiceIdentityType + - Interface CloudLink has a new optional parameter properties + - Interface Cluster has a new optional parameter properties + - Interface ClusterUpdate has a new optional parameter properties + - Interface Datastore has a new optional parameter properties + - Interface ExpressRouteAuthorization has a new optional parameter properties + - Interface GlobalReachConnection has a new optional parameter properties + - Interface HcxEnterpriseSite has a new optional parameter properties + - Interface IscsiPath has a new optional parameter properties + - Interface PlacementPolicyUpdate has a new optional parameter properties + - Interface PrivateCloud has a new optional parameter properties + - Interface PrivateCloudUpdate has a new optional parameter properties + - Interface ScriptCmdlet has a new optional parameter properties + - Interface ScriptExecution has a new optional parameter properties + - Interface ScriptPackage has a new optional parameter properties + - Interface VirtualMachine has a new optional parameter properties + - Interface WorkloadNetwork has a new optional parameter properties + - Interface WorkloadNetworkDnsService has a new optional parameter properties + - Interface WorkloadNetworkDnsZone has a new optional parameter properties + - Interface WorkloadNetworkGateway has a new optional parameter properties + - Interface WorkloadNetworkPortMirroring has a new optional parameter properties + - Interface WorkloadNetworkPublicIP has a new optional parameter properties + - Interface WorkloadNetworkSegment has a new optional parameter properties + - Interface WorkloadNetworkVirtualMachine has a new optional parameter properties + - Interface WorkloadNetworkVMGroup has a new optional parameter properties + - Added Enum KnownSystemAssignedServiceIdentityType + - Added Enum KnownVersions + - Enum KnownDhcpTypeEnum has a new value RELAY + - Enum KnownDhcpTypeEnum has a new value SERVER + - Enum KnownDnsServiceLogLevelEnum has a new value DEBUG + - Enum KnownDnsServiceLogLevelEnum has a new value ERROR + - Enum KnownDnsServiceLogLevelEnum has a new value FATAL + - Enum KnownDnsServiceLogLevelEnum has a new value INFO + - Enum KnownDnsServiceLogLevelEnum has a new value WARNING + - Enum KnownDnsServiceStatusEnum has a new value FAILURE + - Enum KnownDnsServiceStatusEnum has a new value SUCCESS + - Enum KnownMountOptionEnum has a new value ATTACH + - Enum KnownMountOptionEnum has a new value MOUNT + - Enum KnownOrigin has a new value "user,system" + - Enum KnownOrigin has a new value system + - Enum KnownOrigin has a new value user + - Enum KnownPortMirroringDirectionEnum has a new value BIDIRECTIONAL + - Enum KnownPortMirroringDirectionEnum has a new value EGRESS + - Enum KnownPortMirroringDirectionEnum has a new value INGRESS + - Enum KnownPortMirroringStatusEnum has a new value FAILURE + - Enum KnownPortMirroringStatusEnum has a new value SUCCESS + - Enum KnownSegmentStatusEnum has a new value FAILURE + - Enum KnownSegmentStatusEnum has a new value SUCCESS + - Enum KnownVMGroupStatusEnum has a new value FAILURE + - Enum KnownVMGroupStatusEnum has a new value SUCCESS + - Enum KnownVMTypeEnum has a new value EDGE + - Enum KnownVMTypeEnum has a new value REGULAR + - Enum KnownVMTypeEnum has a new value SERVICE + - Added function restorePoller -### Other Changes +### Breaking Changes + - Removed operation Addons.beginCreateOrUpdate + - Removed operation Addons.beginCreateOrUpdateAndWait + - Removed operation Addons.beginDelete + - Removed operation Addons.beginDeleteAndWait + - Removed operation Authorizations.beginCreateOrUpdate + - Removed operation Authorizations.beginCreateOrUpdateAndWait + - Removed operation Authorizations.beginDelete + - Removed operation Authorizations.beginDeleteAndWait + - Removed operation CloudLinks.beginCreateOrUpdate + - Removed operation CloudLinks.beginCreateOrUpdateAndWait + - Removed operation CloudLinks.beginDelete + - Removed operation CloudLinks.beginDeleteAndWait + - Removed operation Clusters.beginCreateOrUpdate + - Removed operation Clusters.beginCreateOrUpdateAndWait + - Removed operation Clusters.beginDelete + - Removed operation Clusters.beginDeleteAndWait + - Removed operation Clusters.beginUpdate + - Removed operation Clusters.beginUpdateAndWait + - Removed operation Datastores.beginCreateOrUpdate + - Removed operation Datastores.beginCreateOrUpdateAndWait + - Removed operation Datastores.beginDelete + - Removed operation Datastores.beginDeleteAndWait + - Removed operation GlobalReachConnections.beginCreateOrUpdate + - Removed operation GlobalReachConnections.beginCreateOrUpdateAndWait + - Removed operation GlobalReachConnections.beginDelete + - Removed operation GlobalReachConnections.beginDeleteAndWait + - Removed operation IscsiPaths.beginCreateOrUpdate + - Removed operation IscsiPaths.beginCreateOrUpdateAndWait + - Removed operation IscsiPaths.beginDelete + - Removed operation IscsiPaths.beginDeleteAndWait + - Removed operation PlacementPolicies.beginCreateOrUpdate + - Removed operation PlacementPolicies.beginCreateOrUpdateAndWait + - Removed operation PlacementPolicies.beginDelete + - Removed operation PlacementPolicies.beginDeleteAndWait + - Removed operation PlacementPolicies.beginUpdate + - Removed operation PlacementPolicies.beginUpdateAndWait + - Removed operation PrivateClouds.beginCreateOrUpdate + - Removed operation PrivateClouds.beginCreateOrUpdateAndWait + - Removed operation PrivateClouds.beginDelete + - Removed operation PrivateClouds.beginDeleteAndWait + - Removed operation PrivateClouds.beginRotateNsxtPassword + - Removed operation PrivateClouds.beginRotateNsxtPasswordAndWait + - Removed operation PrivateClouds.beginRotateVcenterPassword + - Removed operation PrivateClouds.beginRotateVcenterPasswordAndWait + - Removed operation PrivateClouds.beginUpdate + - Removed operation PrivateClouds.beginUpdateAndWait + - Removed operation ScriptExecutions.beginCreateOrUpdate + - Removed operation ScriptExecutions.beginCreateOrUpdateAndWait + - Removed operation ScriptExecutions.beginDelete + - Removed operation ScriptExecutions.beginDeleteAndWait + - Removed operation VirtualMachines.beginRestrictMovement + - Removed operation VirtualMachines.beginRestrictMovementAndWait + - Removed operation WorkloadNetworks.beginCreateDhcp + - Removed operation WorkloadNetworks.beginCreateDhcpAndWait + - Removed operation WorkloadNetworks.beginCreateDnsService + - Removed operation WorkloadNetworks.beginCreateDnsServiceAndWait + - Removed operation WorkloadNetworks.beginCreateDnsZone + - Removed operation WorkloadNetworks.beginCreateDnsZoneAndWait + - Removed operation WorkloadNetworks.beginCreatePortMirroring + - Removed operation WorkloadNetworks.beginCreatePortMirroringAndWait + - Removed operation WorkloadNetworks.beginCreatePublicIP + - Removed operation WorkloadNetworks.beginCreatePublicIPAndWait + - Removed operation WorkloadNetworks.beginCreateSegments + - Removed operation WorkloadNetworks.beginCreateSegmentsAndWait + - Removed operation WorkloadNetworks.beginCreateVMGroup + - Removed operation WorkloadNetworks.beginCreateVMGroupAndWait + - Removed operation WorkloadNetworks.beginDeleteDhcp + - Removed operation WorkloadNetworks.beginDeleteDhcpAndWait + - Removed operation WorkloadNetworks.beginDeleteDnsService + - Removed operation WorkloadNetworks.beginDeleteDnsServiceAndWait + - Removed operation WorkloadNetworks.beginDeleteDnsZone + - Removed operation WorkloadNetworks.beginDeleteDnsZoneAndWait + - Removed operation WorkloadNetworks.beginDeletePortMirroring + - Removed operation WorkloadNetworks.beginDeletePortMirroringAndWait + - Removed operation WorkloadNetworks.beginDeletePublicIP + - Removed operation WorkloadNetworks.beginDeletePublicIPAndWait + - Removed operation WorkloadNetworks.beginDeleteSegment + - Removed operation WorkloadNetworks.beginDeleteSegmentAndWait + - Removed operation WorkloadNetworks.beginDeleteVMGroup + - Removed operation WorkloadNetworks.beginDeleteVMGroupAndWait + - Removed operation WorkloadNetworks.beginUpdateDhcp + - Removed operation WorkloadNetworks.beginUpdateDhcpAndWait + - Removed operation WorkloadNetworks.beginUpdateDnsService + - Removed operation WorkloadNetworks.beginUpdateDnsServiceAndWait + - Removed operation WorkloadNetworks.beginUpdateDnsZone + - Removed operation WorkloadNetworks.beginUpdateDnsZoneAndWait + - Removed operation WorkloadNetworks.beginUpdatePortMirroring + - Removed operation WorkloadNetworks.beginUpdatePortMirroringAndWait + - Removed operation WorkloadNetworks.beginUpdateSegments + - Removed operation WorkloadNetworks.beginUpdateSegmentsAndWait + - Removed operation WorkloadNetworks.beginUpdateVMGroup + - Removed operation WorkloadNetworks.beginUpdateVMGroupAndWait + - Deleted Class AzureVMwareSolutionAPI + - Interface AddonsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface AddonsDeleteOptionalParams no longer has parameter resumeFrom + - Interface AuthorizationsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface AuthorizationsDeleteOptionalParams no longer has parameter resumeFrom + - Interface CloudLink no longer has parameter linkedCloud + - Interface CloudLink no longer has parameter provisioningState + - Interface CloudLink no longer has parameter status + - Interface CloudLinksCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface CloudLinksDeleteOptionalParams no longer has parameter resumeFrom + - Interface Cluster no longer has parameter clusterId + - Interface Cluster no longer has parameter clusterSize + - Interface Cluster no longer has parameter hosts + - Interface Cluster no longer has parameter provisioningState + - Interface Cluster no longer has parameter vsanDatastoreName + - Interface ClustersCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ClustersDeleteOptionalParams no longer has parameter resumeFrom + - Interface ClustersUpdateOptionalParams no longer has parameter resumeFrom + - Interface ClusterUpdate no longer has parameter clusterSize + - Interface ClusterUpdate no longer has parameter hosts + - Interface Datastore no longer has parameter diskPoolVolume + - Interface Datastore no longer has parameter elasticSanVolume + - Interface Datastore no longer has parameter netAppVolume + - Interface Datastore no longer has parameter provisioningState + - Interface Datastore no longer has parameter status + - Interface DatastoresCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface DatastoresDeleteOptionalParams no longer has parameter resumeFrom + - Interface ExpressRouteAuthorization no longer has parameter expressRouteAuthorizationId + - Interface ExpressRouteAuthorization no longer has parameter expressRouteAuthorizationKey + - Interface ExpressRouteAuthorization no longer has parameter expressRouteId + - Interface ExpressRouteAuthorization no longer has parameter provisioningState + - Interface GlobalReachConnection no longer has parameter addressPrefix + - Interface GlobalReachConnection no longer has parameter authorizationKey + - Interface GlobalReachConnection no longer has parameter circuitConnectionStatus + - Interface GlobalReachConnection no longer has parameter expressRouteId + - Interface GlobalReachConnection no longer has parameter peerExpressRouteCircuit + - Interface GlobalReachConnection no longer has parameter provisioningState + - Interface GlobalReachConnectionsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface GlobalReachConnectionsDeleteOptionalParams no longer has parameter resumeFrom + - Interface HcxEnterpriseSite no longer has parameter activationKey + - Interface HcxEnterpriseSite no longer has parameter provisioningState + - Interface HcxEnterpriseSite no longer has parameter status + - Interface IscsiPath no longer has parameter networkBlock + - Interface IscsiPath no longer has parameter provisioningState + - Interface IscsiPathsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface IscsiPathsDeleteOptionalParams no longer has parameter resumeFrom + - Interface PlacementPoliciesCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface PlacementPoliciesDeleteOptionalParams no longer has parameter resumeFrom + - Interface PlacementPoliciesUpdateOptionalParams no longer has parameter resumeFrom + - Interface PlacementPolicyUpdate no longer has parameter affinityStrength + - Interface PlacementPolicyUpdate no longer has parameter azureHybridBenefitType + - Interface PlacementPolicyUpdate no longer has parameter hostMembers + - Interface PlacementPolicyUpdate no longer has parameter state + - Interface PlacementPolicyUpdate no longer has parameter vmMembers + - Interface PrivateCloud no longer has parameter availability + - Interface PrivateCloud no longer has parameter circuit + - Interface PrivateCloud no longer has parameter dnsZoneType + - Interface PrivateCloud no longer has parameter encryption + - Interface PrivateCloud no longer has parameter endpoints + - Interface PrivateCloud no longer has parameter extendedNetworkBlocks + - Interface PrivateCloud no longer has parameter externalCloudLinks + - Interface PrivateCloud no longer has parameter identitySources + - Interface PrivateCloud no longer has parameter internet + - Interface PrivateCloud no longer has parameter managementCluster + - Interface PrivateCloud no longer has parameter managementNetwork + - Interface PrivateCloud no longer has parameter networkBlock + - Interface PrivateCloud no longer has parameter nsxPublicIpQuotaRaised + - Interface PrivateCloud no longer has parameter nsxtCertificateThumbprint + - Interface PrivateCloud no longer has parameter nsxtPassword + - Interface PrivateCloud no longer has parameter provisioningNetwork + - Interface PrivateCloud no longer has parameter provisioningState + - Interface PrivateCloud no longer has parameter secondaryCircuit + - Interface PrivateCloud no longer has parameter vcenterCertificateThumbprint + - Interface PrivateCloud no longer has parameter vcenterPassword + - Interface PrivateCloud no longer has parameter virtualNetworkId + - Interface PrivateCloud no longer has parameter vmotionNetwork + - Interface PrivateCloudsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface PrivateCloudsDeleteOptionalParams no longer has parameter resumeFrom + - Interface PrivateCloudsRotateNsxtPasswordOptionalParams no longer has parameter resumeFrom + - Interface PrivateCloudsRotateVcenterPasswordOptionalParams no longer has parameter resumeFrom + - Interface PrivateCloudsUpdateOptionalParams no longer has parameter resumeFrom + - Interface PrivateCloudUpdate no longer has parameter availability + - Interface PrivateCloudUpdate no longer has parameter dnsZoneType + - Interface PrivateCloudUpdate no longer has parameter encryption + - Interface PrivateCloudUpdate no longer has parameter extendedNetworkBlocks + - Interface PrivateCloudUpdate no longer has parameter identitySources + - Interface PrivateCloudUpdate no longer has parameter internet + - Interface PrivateCloudUpdate no longer has parameter managementCluster + - Interface ScriptCmdlet no longer has parameter audience + - Interface ScriptCmdlet no longer has parameter description + - Interface ScriptCmdlet no longer has parameter parameters + - Interface ScriptCmdlet no longer has parameter provisioningState + - Interface ScriptCmdlet no longer has parameter timeout + - Interface ScriptExecution no longer has parameter errors + - Interface ScriptExecution no longer has parameter failureReason + - Interface ScriptExecution no longer has parameter finishedAt + - Interface ScriptExecution no longer has parameter hiddenParameters + - Interface ScriptExecution no longer has parameter information + - Interface ScriptExecution no longer has parameter namedOutputs + - Interface ScriptExecution no longer has parameter output + - Interface ScriptExecution no longer has parameter parameters + - Interface ScriptExecution no longer has parameter provisioningState + - Interface ScriptExecution no longer has parameter retention + - Interface ScriptExecution no longer has parameter scriptCmdletId + - Interface ScriptExecution no longer has parameter startedAt + - Interface ScriptExecution no longer has parameter submittedAt + - Interface ScriptExecution no longer has parameter timeout + - Interface ScriptExecution no longer has parameter warnings + - Interface ScriptExecutionsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ScriptExecutionsDeleteOptionalParams no longer has parameter resumeFrom + - Interface ScriptPackage no longer has parameter company + - Interface ScriptPackage no longer has parameter description + - Interface ScriptPackage no longer has parameter provisioningState + - Interface ScriptPackage no longer has parameter uri + - Interface ScriptPackage no longer has parameter version + - Interface VirtualMachine no longer has parameter displayName + - Interface VirtualMachine no longer has parameter folderPath + - Interface VirtualMachine no longer has parameter moRefId + - Interface VirtualMachine no longer has parameter provisioningState + - Interface VirtualMachine no longer has parameter restrictMovement + - Interface VirtualMachinesRestrictMovementOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetwork no longer has parameter provisioningState + - Interface WorkloadNetworkDnsService no longer has parameter defaultDnsZone + - Interface WorkloadNetworkDnsService no longer has parameter displayName + - Interface WorkloadNetworkDnsService no longer has parameter dnsServiceIp + - Interface WorkloadNetworkDnsService no longer has parameter fqdnZones + - Interface WorkloadNetworkDnsService no longer has parameter logLevel + - Interface WorkloadNetworkDnsService no longer has parameter provisioningState + - Interface WorkloadNetworkDnsService no longer has parameter revision + - Interface WorkloadNetworkDnsService no longer has parameter status + - Interface WorkloadNetworkDnsZone no longer has parameter displayName + - Interface WorkloadNetworkDnsZone no longer has parameter dnsServerIps + - Interface WorkloadNetworkDnsZone no longer has parameter dnsServices + - Interface WorkloadNetworkDnsZone no longer has parameter domain + - Interface WorkloadNetworkDnsZone no longer has parameter provisioningState + - Interface WorkloadNetworkDnsZone no longer has parameter revision + - Interface WorkloadNetworkDnsZone no longer has parameter sourceIp + - Interface WorkloadNetworkGateway no longer has parameter displayName + - Interface WorkloadNetworkGateway no longer has parameter path + - Interface WorkloadNetworkGateway no longer has parameter provisioningState + - Interface WorkloadNetworkPortMirroring no longer has parameter destination + - Interface WorkloadNetworkPortMirroring no longer has parameter direction + - Interface WorkloadNetworkPortMirroring no longer has parameter displayName + - Interface WorkloadNetworkPortMirroring no longer has parameter provisioningState + - Interface WorkloadNetworkPortMirroring no longer has parameter revision + - Interface WorkloadNetworkPortMirroring no longer has parameter source + - Interface WorkloadNetworkPortMirroring no longer has parameter status + - Interface WorkloadNetworkPublicIP no longer has parameter displayName + - Interface WorkloadNetworkPublicIP no longer has parameter numberOfPublicIPs + - Interface WorkloadNetworkPublicIP no longer has parameter provisioningState + - Interface WorkloadNetworkPublicIP no longer has parameter publicIPBlock + - Interface WorkloadNetworksCreateDhcpOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksCreateDnsServiceOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksCreateDnsZoneOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksCreatePortMirroringOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksCreatePublicIPOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksCreateVMGroupOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeleteDhcpOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeleteDnsServiceOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeleteDnsZoneOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeletePortMirroringOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeletePublicIPOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeleteSegmentOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksDeleteVMGroupOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworkSegment no longer has parameter connectedGateway + - Interface WorkloadNetworkSegment no longer has parameter displayName + - Interface WorkloadNetworkSegment no longer has parameter portVif + - Interface WorkloadNetworkSegment no longer has parameter provisioningState + - Interface WorkloadNetworkSegment no longer has parameter revision + - Interface WorkloadNetworkSegment no longer has parameter status + - Interface WorkloadNetworkSegment no longer has parameter subnet + - Interface WorkloadNetworksUpdateDhcpOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksUpdateDnsServiceOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksUpdateDnsZoneOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksUpdatePortMirroringOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworksUpdateVMGroupOptionalParams no longer has parameter resumeFrom + - Interface WorkloadNetworkVirtualMachine no longer has parameter displayName + - Interface WorkloadNetworkVirtualMachine no longer has parameter provisioningState + - Interface WorkloadNetworkVirtualMachine no longer has parameter vmType + - Interface WorkloadNetworkVMGroup no longer has parameter displayName + - Interface WorkloadNetworkVMGroup no longer has parameter members + - Interface WorkloadNetworkVMGroup no longer has parameter provisioningState + - Interface WorkloadNetworkVMGroup no longer has parameter revision + - Interface WorkloadNetworkVMGroup no longer has parameter status + - Type of parameter addonType of interface AddonProperties is changed from "Arc" | "HCX" | "SRM" | "VR" to AddonType + - Type of parameter type of interface PlacementPolicyProperties is changed from "VmHost" | "VmVm" to PlacementPolicyType + - Type of parameter type of interface PrivateCloudIdentity is changed from ResourceIdentityType to SystemAssignedServiceIdentityType + - Type of parameter tags of interface PrivateCloudUpdate is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter hostsRemaining of interface Quota is changed from { + [propertyName: string]: number; + } to Record + - Type of parameter type of interface ScriptExecutionParameter is changed from "Credential" | "SecureValue" | "Value" to ScriptExecutionParameterType + - Type of parameter tags of interface TrackedResource is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter dhcpType of interface WorkloadNetworkDhcpEntity is changed from "RELAY" | "SERVER" to DhcpTypeEnum + - Removed Enum KnownResourceIdentityType + - Enum KnownDhcpTypeEnum no longer has value Relay + - Enum KnownDhcpTypeEnum no longer has value Server + - Enum KnownDnsServiceLogLevelEnum no longer has value Debug + - Enum KnownDnsServiceLogLevelEnum no longer has value Error + - Enum KnownDnsServiceLogLevelEnum no longer has value Fatal + - Enum KnownDnsServiceLogLevelEnum no longer has value Info + - Enum KnownDnsServiceLogLevelEnum no longer has value Warning + - Enum KnownDnsServiceStatusEnum no longer has value Failure + - Enum KnownDnsServiceStatusEnum no longer has value Success + - Enum KnownMountOptionEnum no longer has value Attach + - Enum KnownMountOptionEnum no longer has value Mount + - Enum KnownOrigin no longer has value System + - Enum KnownOrigin no longer has value User + - Enum KnownOrigin no longer has value UserSystem + - Enum KnownPortMirroringDirectionEnum no longer has value Bidirectional + - Enum KnownPortMirroringDirectionEnum no longer has value Egress + - Enum KnownPortMirroringDirectionEnum no longer has value Ingress + - Enum KnownPortMirroringStatusEnum no longer has value Failure + - Enum KnownPortMirroringStatusEnum no longer has value Success + - Enum KnownSegmentStatusEnum no longer has value Failure + - Enum KnownSegmentStatusEnum no longer has value Success + - Enum KnownVMGroupStatusEnum no longer has value Failure + - Enum KnownVMGroupStatusEnum no longer has value Success + - Enum KnownVMTypeEnum no longer has value Edge + - Enum KnownVMTypeEnum no longer has value Regular + - Enum KnownVMTypeEnum no longer has value Service + - Removed function getContinuationToken + + ## 6.0.0 (2024-09-19) ### Features Added diff --git a/sdk/avs/arm-avs/LICENSE.txt b/sdk/avs/arm-avs/LICENSE.txt deleted file mode 100644 index ea8fb1516028..000000000000 --- a/sdk/avs/arm-avs/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/avs/arm-avs/README.md b/sdk/avs/arm-avs/README.md index a262ba375796..69c84d98f8d3 100644 --- a/sdk/avs/arm-avs/README.md +++ b/sdk/avs/arm-avs/README.md @@ -1,13 +1,14 @@ -# AzureVMwareSolutionApi client library for JavaScript +# Azure AVS client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureVMwareSolutionApi client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AVS client. Azure VMware Solution API -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-avs) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-avs) | -[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/avs/arm-avs) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-avs) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-avs?view=azure-node-preview) ## Getting started @@ -24,16 +25,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP ### Install the `@azure/arm-avs` package -Install the AzureVMwareSolutionApi client library for JavaScript with `npm`: +Install the Azure AVS client library for JavaScript with `npm`: ```bash npm install @azure/arm-avs ``` -### Create and authenticate a `AzureVMwareSolutionAPI` +### Create and authenticate a `AVSClient` -To create a client object to access the AzureVMwareSolutionApi API, you will need the `endpoint` of your AzureVMwareSolutionApi resource and a `credential`. The AzureVMwareSolutionApi client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your AzureVMwareSolutionApi resource in the [Azure Portal][azure_portal]. +To create a client object to access the Azure AVS API, you will need the `endpoint` of your Azure AVS resource and a `credential`. The Azure AVS client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure AVS 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). @@ -43,36 +44,35 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to AzureVMwareSolutionApi** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. +You will also need to **register a new AAD application and grant access to Azure AVS** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); +const { AVSClient } = require("@azure/arm-avs"); const { DefaultAzureCredential } = require("@azure/identity"); // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new AzureVMwareSolutionAPI(new DefaultAzureCredential(), subscriptionId); +const client = new AVSClient(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new AzureVMwareSolutionAPI(credential, subscriptionId); +// const client = new AVSClient(credential, subscriptionId); ``` -### JavaScript Bundle +### 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). ## Key concepts -### AzureVMwareSolutionAPI +### AVSClient -`AzureVMwareSolutionAPI` is the primary interface for developers using the AzureVMwareSolutionApi client library. Explore the methods on this client object to understand the different features of the AzureVMwareSolutionApi service that you can access. +`AVSClient` is the primary interface for developers using the Azure AVS client library. Explore the methods on this client object to understand the different features of the Azure AVS service that you can access. ## Troubleshooting @@ -87,9 +87,6 @@ setLogLevel("info"); For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). -## 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. ## Contributing @@ -99,10 +96,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) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Favs%2Farm-avs%2FREADME.png) - -[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/avs/arm-avs/_meta.json b/sdk/avs/arm-avs/_meta.json deleted file mode 100644 index 8fe4619b54a9..000000000000 --- a/sdk/avs/arm-avs/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "386aaedd2edd916b8cef6aa0fffd7b72688787fc", - "readme": "specification/vmware/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\\vmware\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.13", - "use": "@autorest/typescript@6.0.27" -} \ No newline at end of file diff --git a/sdk/avs/arm-avs/api-extractor.json b/sdk/avs/arm-avs/api-extractor.json index f3c548add8d4..00600eb646a4 100644 --- a/sdk/avs/arm-avs/api-extractor.json +++ b/sdk/avs/arm-avs/api-extractor.json @@ -1,31 +1,18 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { - "enabled": true - }, - "apiReport": { - "enabled": true, - "reportFolder": "./review" - }, + "mainEntryPointFilePath": "./dist/esm/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-avs.d.ts" }, "messages": { - "tsdocMessageReporting": { - "default": { - "logLevel": "none" - } - }, + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, "extractorMessageReporting": { - "ae-missing-release-tag": { - "logLevel": "none" - }, - "ae-unresolved-link": { - "logLevel": "none" - } + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } } } -} \ No newline at end of file +} diff --git a/sdk/avs/arm-avs/assets.json b/sdk/avs/arm-avs/assets.json deleted file mode 100644 index 1acc39a1f232..000000000000 --- a/sdk/avs/arm-avs/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/avs/arm-avs", - "Tag": "js/avs/arm-avs_db3132ee98" -} diff --git a/sdk/avs/arm-avs/eslint.config.mjs b/sdk/avs/arm-avs/eslint.config.mjs new file mode 100644 index 000000000000..113bdc3eaf5f --- /dev/null +++ b/sdk/avs/arm-avs/eslint.config.mjs @@ -0,0 +1,17 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default [ + ...azsdkEslint.configs.recommended, + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn" + } + } +]; diff --git a/sdk/avs/arm-avs/package.json b/sdk/avs/arm-avs/package.json index 2ccfcf01c57a..69cd3efa075d 100644 --- a/sdk/avs/arm-avs/package.json +++ b/sdk/avs/arm-avs/package.json @@ -1,114 +1,152 @@ { "name": "@azure/arm-avs", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for AzureVMwareSolutionAPI.", - "version": "6.0.1", + "version": "7.0.0", + "description": "A generated SDK for AVSClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.14.0", - "tslib": "^2.2.0" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./models": "./src/models/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-avs.d.ts", - "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "tsx": "^4.7.1", - "typescript": "~5.7.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist", "README.md", "LICENSE", - "tsconfig.json", "review/*", - "CHANGELOG.md", - "types/*" + "CHANGELOG.md" ], + "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/avs/arm-avs/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/avsContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure/core-util": "^1.9.2", + "@azure-rest/core-client": "^2.3.1", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2", + "@azure/core-lro": "^3.1.0", + "@azure/abort-controller": "^2.1.2" + }, + "devDependencies": { + "dotenv": "^16.0.0", + "@microsoft/api-extractor": "^7.40.3", + "@types/node": "^18.0.0", + "eslint": "^9.9.0", + "typescript": "~5.6.2", + "@azure/identity": "^4.2.1", + "@vitest/browser": "^2.0.5", + "@vitest/coverage-istanbul": "^2.0.5", + "playwright": "^1.41.2", + "vitest": "^2.0.5", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0" + }, "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "pack": "npm pack 2>&1", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", + "integration-test:node": "echo skipped", + "build:samples": "echo skipped", + "check-format": "dev-tool run vendored 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": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", "update-snippets": "echo skipped" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/azureVMwareSolutionAPI.ts", - "prefix": "packageDetails" + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/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" } - ] + }, + "./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" + } + } }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-avs" - } + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } diff --git a/sdk/avs/arm-avs/review/arm-avs-models.api.md b/sdk/avs/arm-avs/review/arm-avs-models.api.md new file mode 100644 index 000000000000..06a8a5bbc15d --- /dev/null +++ b/sdk/avs/arm-avs/review/arm-avs-models.api.md @@ -0,0 +1,1381 @@ +## API Report File for "@azure/arm-avs" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export type ActionType = string; + +// @public +export interface Addon extends ProxyResource { + properties?: AddonPropertiesUnion; +} + +// @public +export interface AddonArcProperties extends AddonProperties { + addonType: "Arc"; + vCenter?: string; +} + +// @public +export interface AddonHcxProperties extends AddonProperties { + addonType: "HCX"; + offer: string; +} + +// @public +export interface AddonProperties { + addonType: AddonType; + readonly provisioningState?: AddonProvisioningState; +} + +// @public +export type AddonPropertiesUnion = AddonSrmProperties | AddonVrProperties | AddonHcxProperties | AddonArcProperties | AddonProperties; + +// @public +export type AddonProvisioningState = string; + +// @public +export interface AddonSrmProperties extends AddonProperties { + addonType: "SRM"; + licenseKey?: string; +} + +// @public +export type AddonType = string; + +// @public +export interface AddonVrProperties extends AddonProperties { + addonType: "VR"; + vrsCount: number; +} + +// @public +export interface AdminCredentials { + readonly nsxtPassword?: string; + readonly nsxtUsername?: string; + readonly vcenterPassword?: string; + readonly vcenterUsername?: string; +} + +// @public +export type AffinityStrength = string; + +// @public +export type AffinityType = string; + +// @public +export interface AvailabilityProperties { + secondaryZone?: number; + strategy?: AvailabilityStrategy; + zone?: number; +} + +// @public +export type AvailabilityStrategy = string; + +// @public +export type AzureHybridBenefitType = string; + +// @public +export interface Circuit { + readonly expressRouteID?: string; + readonly expressRoutePrivatePeeringID?: string; + readonly primarySubnet?: string; + readonly secondarySubnet?: string; +} + +// @public +export interface CloudLink extends ProxyResource { + properties?: CloudLinkProperties; +} + +// @public +export interface CloudLinkProperties { + linkedCloud?: string; + readonly provisioningState?: CloudLinkProvisioningState; + readonly status?: CloudLinkStatus; +} + +// @public +export type CloudLinkProvisioningState = string; + +// @public +export type CloudLinkStatus = string; + +// @public +export interface Cluster extends ProxyResource { + properties?: ClusterProperties; + sku: Sku; +} + +// @public +export interface ClusterProperties { + readonly clusterId?: number; + clusterSize?: number; + hosts?: string[]; + readonly provisioningState?: ClusterProvisioningState; + vsanDatastoreName?: string; +} + +// @public +export type ClusterProvisioningState = string; + +// @public +export interface ClusterUpdate { + properties?: ClusterUpdateProperties; + sku?: Sku; +} + +// @public +export interface ClusterUpdateProperties { + clusterSize?: number; + hosts?: string[]; +} + +// @public +export interface ClusterZone { + readonly hosts?: string[]; + readonly zone?: string; +} + +// @public +export interface ClusterZoneList { + zones?: ClusterZone[]; +} + +// @public +export type CreatedByType = string; + +// @public +export interface Datastore extends ProxyResource { + properties?: DatastoreProperties; +} + +// @public +export interface DatastoreProperties { + diskPoolVolume?: DiskPoolVolume; + elasticSanVolume?: ElasticSanVolume; + netAppVolume?: NetAppVolume; + readonly provisioningState?: DatastoreProvisioningState; + readonly status?: DatastoreStatus; +} + +// @public +export type DatastoreProvisioningState = string; + +// @public +export type DatastoreStatus = string; + +// @public +export type DhcpTypeEnum = string; + +// @public +export interface DiskPoolVolume { + lunName: string; + mountOption?: MountOptionEnum; + readonly path?: string; + targetId: string; +} + +// @public +export type DnsServiceLogLevelEnum = string; + +// @public +export type DnsServiceStatusEnum = string; + +// @public +export type DnsZoneType = string; + +// @public +export interface ElasticSanVolume { + targetId: string; +} + +// @public +export interface Encryption { + keyVaultProperties?: EncryptionKeyVaultProperties; + status?: EncryptionState; +} + +// @public +export type EncryptionKeyStatus = string; + +// @public +export interface EncryptionKeyVaultProperties { + readonly autoDetectedKeyVersion?: string; + keyName?: string; + readonly keyState?: EncryptionKeyStatus; + keyVaultUrl?: string; + keyVersion?: string; + readonly versionType?: EncryptionVersionType; +} + +// @public +export type EncryptionState = string; + +// @public +export type EncryptionVersionType = string; + +// @public +export interface Endpoints { + readonly hcxCloudManager?: string; + readonly hcxCloudManagerIp?: string; + readonly nsxtManager?: string; + readonly nsxtManagerIp?: string; + readonly vcenterIp?: string; + readonly vcsa?: string; +} + +// @public +export interface ExpressRouteAuthorization extends ProxyResource { + properties?: ExpressRouteAuthorizationProperties; +} + +// @public +export interface ExpressRouteAuthorizationProperties { + readonly expressRouteAuthorizationId?: string; + readonly expressRouteAuthorizationKey?: string; + expressRouteId?: string; + readonly provisioningState?: ExpressRouteAuthorizationProvisioningState; +} + +// @public +export type ExpressRouteAuthorizationProvisioningState = string; + +// @public +export interface GlobalReachConnection extends ProxyResource { + properties?: GlobalReachConnectionProperties; +} + +// @public +export interface GlobalReachConnectionProperties { + readonly addressPrefix?: string; + authorizationKey?: string; + readonly circuitConnectionStatus?: GlobalReachConnectionStatus; + expressRouteId?: string; + peerExpressRouteCircuit?: string; + readonly provisioningState?: GlobalReachConnectionProvisioningState; +} + +// @public +export type GlobalReachConnectionProvisioningState = string; + +// @public +export type GlobalReachConnectionStatus = string; + +// @public +export interface HcxEnterpriseSite extends ProxyResource { + properties?: HcxEnterpriseSiteProperties; +} + +// @public +export interface HcxEnterpriseSiteProperties { + readonly activationKey?: string; + readonly provisioningState?: HcxEnterpriseSiteProvisioningState; + readonly status?: HcxEnterpriseSiteStatus; +} + +// @public +export type HcxEnterpriseSiteProvisioningState = string; + +// @public +export type HcxEnterpriseSiteStatus = string; + +// @public +export interface IdentitySource { + alias?: string; + baseGroupDN?: string; + baseUserDN?: string; + domain?: string; + name?: string; + password?: string; + primaryServer?: string; + secondaryServer?: string; + ssl?: SslEnum; + username?: string; +} + +// @public +export type InternetEnum = string; + +// @public +export interface IscsiPath extends ProxyResource { + properties?: IscsiPathProperties; +} + +// @public +export interface IscsiPathProperties { + networkBlock: string; + readonly provisioningState?: IscsiPathProvisioningState; +} + +// @public +export type IscsiPathProvisioningState = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAddonProvisioningState { + Building = "Building", + Canceled = "Canceled", + Cancelled = "Cancelled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownAddonType { + // (undocumented) + Arc = "Arc", + // (undocumented) + HCX = "HCX", + // (undocumented) + SRM = "SRM", + // (undocumented) + VR = "VR" +} + +// @public +export enum KnownAffinityStrength { + Must = "Must", + Should = "Should" +} + +// @public +export enum KnownAffinityType { + Affinity = "Affinity", + AntiAffinity = "AntiAffinity" +} + +// @public +export enum KnownAvailabilityStrategy { + DualZone = "DualZone", + SingleZone = "SingleZone" +} + +// @public +export enum KnownAzureHybridBenefitType { + None = "None", + SqlHost = "SqlHost" +} + +// @public +export enum KnownCloudLinkProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownCloudLinkStatus { + Active = "Active", + Building = "Building", + Deleting = "Deleting", + Disconnected = "Disconnected", + Failed = "Failed" +} + +// @public +export enum KnownClusterProvisioningState { + Canceled = "Canceled", + Cancelled = "Cancelled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownDatastoreProvisioningState { + Canceled = "Canceled", + Cancelled = "Cancelled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownDatastoreStatus { + Accessible = "Accessible", + Attached = "Attached", + DeadOrError = "DeadOrError", + Detached = "Detached", + Inaccessible = "Inaccessible", + LostCommunication = "LostCommunication", + Unknown = "Unknown" +} + +// @public +export enum KnownDhcpTypeEnum { + // (undocumented) + RELAY = "RELAY", + // (undocumented) + SERVER = "SERVER" +} + +// @public +export enum KnownDnsServiceLogLevelEnum { + DEBUG = "DEBUG", + ERROR = "ERROR", + FATAL = "FATAL", + INFO = "INFO", + WARNING = "WARNING" +} + +// @public +export enum KnownDnsServiceStatusEnum { + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" +} + +// @public +export enum KnownDnsZoneType { + Private = "Private", + Public = "Public" +} + +// @public +export enum KnownEncryptionKeyStatus { + AccessDenied = "AccessDenied", + Connected = "Connected" +} + +// @public +export enum KnownEncryptionState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownEncryptionVersionType { + AutoDetected = "AutoDetected", + Fixed = "Fixed" +} + +// @public +export enum KnownExpressRouteAuthorizationProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownGlobalReachConnectionProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownGlobalReachConnectionStatus { + Connected = "Connected", + Connecting = "Connecting", + Disconnected = "Disconnected" +} + +// @public +export enum KnownHcxEnterpriseSiteProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownHcxEnterpriseSiteStatus { + Available = "Available", + Consumed = "Consumed", + Deactivated = "Deactivated", + Deleted = "Deleted" +} + +// @public +export enum KnownInternetEnum { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownIscsiPathProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownMountOptionEnum { + ATTACH = "ATTACH", + MOUNT = "MOUNT" +} + +// @public +export enum KnownNsxPublicIpQuotaRaisedEnum { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownOptionalParamEnum { + Optional = "Optional", + Required = "Required" +} + +// @public +export enum KnownOrigin { + "user,system" = "user,system", + system = "system", + user = "user" +} + +// @public +export enum KnownPlacementPolicyProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownPlacementPolicyState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownPlacementPolicyType { + // (undocumented) + VmHost = "VmHost", + // (undocumented) + VmVm = "VmVm" +} + +// @public +export enum KnownPortMirroringDirectionEnum { + BIDIRECTIONAL = "BIDIRECTIONAL", + EGRESS = "EGRESS", + INGRESS = "INGRESS" +} + +// @public +export enum KnownPortMirroringStatusEnum { + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" +} + +// @public +export enum KnownPrivateCloudProvisioningState { + Building = "Building", + Canceled = "Canceled", + Cancelled = "Cancelled", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownQuotaEnabled { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownScriptCmdletAudience { + Any = "Any", + Automation = "Automation" +} + +// @public +export enum KnownScriptCmdletProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownScriptExecutionParameterType { + // (undocumented) + Credential = "Credential", + // (undocumented) + SecureValue = "SecureValue", + // (undocumented) + Value = "Value" +} + +// @public +export enum KnownScriptExecutionProvisioningState { + Canceled = "Canceled", + Cancelled = "Cancelled", + Cancelling = "Cancelling", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Running = "Running", + Succeeded = "Succeeded" +} + +// @public +export enum KnownScriptOutputStreamType { + Error = "Error", + Information = "Information", + Output = "Output", + Warning = "Warning" +} + +// @public +export enum KnownScriptPackageProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownScriptParameterTypes { + Bool = "Bool", + Credential = "Credential", + Float = "Float", + Int = "Int", + SecureString = "SecureString", + String = "String" +} + +// @public +export enum KnownSegmentStatusEnum { + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" +} + +// @public +export enum KnownSslEnum { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownSystemAssignedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + +// @public +export enum KnownTrialStatus { + TrialAvailable = "TrialAvailable", + TrialDisabled = "TrialDisabled", + TrialUsed = "TrialUsed" +} + +// @public +export enum KnownVersions { + v2023_09_01 = "2023-09-01" +} + +// @public +export enum KnownVirtualMachineProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownVirtualMachineRestrictMovementState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownVisibilityParameterEnum { + Hidden = "Hidden", + Visible = "Visible" +} + +// @public +export enum KnownVMGroupStatusEnum { + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" +} + +// @public +export enum KnownVMTypeEnum { + EDGE = "EDGE", + REGULAR = "REGULAR", + SERVICE = "SERVICE" +} + +// @public +export enum KnownWorkloadNetworkDhcpProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkDnsServiceProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkDnsZoneProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkPortMirroringProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkPublicIPProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkSegmentProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownWorkloadNetworkVMGroupProvisioningState { + Building = "Building", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export interface ManagementCluster { + readonly clusterId?: number; + clusterSize?: number; + hosts?: string[]; + readonly provisioningState?: ClusterProvisioningState; + vsanDatastoreName?: string; +} + +// @public +export type MountOptionEnum = string; + +// @public +export interface NetAppVolume { + id: string; +} + +// @public +export type NsxPublicIpQuotaRaisedEnum = string; + +// @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 type OptionalParamEnum = string; + +// @public +export type Origin = string; + +// @public +export interface PlacementPolicy extends ProxyResource { + properties?: PlacementPolicyPropertiesUnion; +} + +// @public +export interface PlacementPolicyProperties { + displayName?: string; + readonly provisioningState?: PlacementPolicyProvisioningState; + state?: PlacementPolicyState; + type: PlacementPolicyType; +} + +// @public +export type PlacementPolicyPropertiesUnion = VmPlacementPolicyProperties | VmHostPlacementPolicyProperties | PlacementPolicyProperties; + +// @public +export type PlacementPolicyProvisioningState = string; + +// @public +export type PlacementPolicyState = string; + +// @public +export type PlacementPolicyType = string; + +// @public +export interface PlacementPolicyUpdate { + properties?: PlacementPolicyUpdateProperties; +} + +// @public +export interface PlacementPolicyUpdateProperties { + affinityStrength?: AffinityStrength; + azureHybridBenefitType?: AzureHybridBenefitType; + hostMembers?: string[]; + state?: PlacementPolicyState; + vmMembers?: string[]; +} + +// @public +export type PortMirroringDirectionEnum = string; + +// @public +export type PortMirroringStatusEnum = string; + +// @public +export interface PrivateCloud extends TrackedResource { + identity?: PrivateCloudIdentity; + properties?: PrivateCloudProperties; + sku: Sku; +} + +// @public +export interface PrivateCloudIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: SystemAssignedServiceIdentityType; +} + +// @public +export interface PrivateCloudProperties { + availability?: AvailabilityProperties; + circuit?: Circuit; + dnsZoneType?: DnsZoneType; + encryption?: Encryption; + readonly endpoints?: Endpoints; + extendedNetworkBlocks?: string[]; + readonly externalCloudLinks?: string[]; + identitySources?: IdentitySource[]; + internet?: InternetEnum; + managementCluster: ManagementCluster; + readonly managementNetwork?: string; + networkBlock: string; + readonly nsxPublicIpQuotaRaised?: NsxPublicIpQuotaRaisedEnum; + readonly nsxtCertificateThumbprint?: string; + nsxtPassword?: string; + readonly provisioningNetwork?: string; + readonly provisioningState?: PrivateCloudProvisioningState; + secondaryCircuit?: Circuit; + readonly vcenterCertificateThumbprint?: string; + vcenterPassword?: string; + virtualNetworkId?: string; + readonly vmotionNetwork?: string; +} + +// @public +export type PrivateCloudProvisioningState = string; + +// @public +export interface PrivateCloudUpdate { + identity?: PrivateCloudIdentity; + properties?: PrivateCloudUpdateProperties; + sku?: Sku; + tags?: Record; +} + +// @public +export interface PrivateCloudUpdateProperties { + availability?: AvailabilityProperties; + dnsZoneType?: DnsZoneType; + encryption?: Encryption; + extendedNetworkBlocks?: string[]; + identitySources?: IdentitySource[]; + internet?: InternetEnum; + managementCluster?: ManagementCluster; +} + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface PSCredentialExecutionParameter extends ScriptExecutionParameter { + password?: string; + type: "Credential"; + username?: string; +} + +// @public +export interface Quota { + readonly hostsRemaining?: Record; + readonly quotaEnabled?: QuotaEnabled; +} + +// @public +export type QuotaEnabled = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface ScriptCmdlet extends ProxyResource { + properties?: ScriptCmdletProperties; +} + +// @public +export type ScriptCmdletAudience = string; + +// @public +export interface ScriptCmdletProperties { + readonly audience?: ScriptCmdletAudience; + readonly description?: string; + readonly parameters?: ScriptParameter[]; + readonly provisioningState?: ScriptCmdletProvisioningState; + readonly timeout?: string; +} + +// @public +export type ScriptCmdletProvisioningState = string; + +// @public +export interface ScriptExecution extends ProxyResource { + properties?: ScriptExecutionProperties; +} + +// @public +export interface ScriptExecutionParameter { + name: string; + type: ScriptExecutionParameterType; +} + +// @public +export type ScriptExecutionParameterType = string; + +// @public +export type ScriptExecutionParameterUnion = ScriptSecureStringExecutionParameter | ScriptStringExecutionParameter | PSCredentialExecutionParameter | ScriptExecutionParameter; + +// @public +export interface ScriptExecutionProperties { + readonly errors?: string[]; + failureReason?: string; + readonly finishedAt?: Date; + hiddenParameters?: ScriptExecutionParameterUnion[]; + readonly information?: string[]; + namedOutputs?: Record>; + output?: string[]; + parameters?: ScriptExecutionParameterUnion[]; + readonly provisioningState?: ScriptExecutionProvisioningState; + retention?: string; + scriptCmdletId?: string; + readonly startedAt?: Date; + readonly submittedAt?: Date; + timeout: string; + readonly warnings?: string[]; +} + +// @public +export type ScriptExecutionProvisioningState = string; + +// @public +export type ScriptOutputStreamType = string; + +// @public +export interface ScriptPackage extends ProxyResource { + properties?: ScriptPackageProperties; +} + +// @public +export interface ScriptPackageProperties { + readonly company?: string; + readonly description?: string; + readonly provisioningState?: ScriptPackageProvisioningState; + readonly uri?: string; + readonly version?: string; +} + +// @public +export type ScriptPackageProvisioningState = string; + +// @public +export interface ScriptParameter { + readonly description?: string; + name?: string; + readonly optional?: OptionalParamEnum; + readonly type?: ScriptParameterTypes; + readonly visibility?: VisibilityParameterEnum; +} + +// @public +export type ScriptParameterTypes = string; + +// @public +export interface ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { + secureValue?: string; + type: "SecureValue"; +} + +// @public +export interface ScriptStringExecutionParameter extends ScriptExecutionParameter { + type: "Value"; + value?: string; +} + +// @public +export type SegmentStatusEnum = string; + +// @public +export interface Sku { + capacity?: number; + family?: string; + name: string; + size?: string; + tier?: SkuTier; +} + +// @public +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +// @public +export type SslEnum = string; + +// @public +export type SystemAssignedServiceIdentityType = 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 interface Trial { + readonly availableHosts?: number; + readonly status?: TrialStatus; +} + +// @public +export type TrialStatus = string; + +// @public +export interface VirtualMachine extends ProxyResource { + properties?: VirtualMachineProperties; +} + +// @public +export interface VirtualMachineProperties { + readonly displayName?: string; + readonly folderPath?: string; + readonly moRefId?: string; + readonly provisioningState?: VirtualMachineProvisioningState; + readonly restrictMovement?: VirtualMachineRestrictMovementState; +} + +// @public +export type VirtualMachineProvisioningState = string; + +// @public +export interface VirtualMachineRestrictMovement { + restrictMovement?: VirtualMachineRestrictMovementState; +} + +// @public +export type VirtualMachineRestrictMovementState = string; + +// @public +export type VisibilityParameterEnum = string; + +// @public +export type VMGroupStatusEnum = string; + +// @public +export interface VmHostPlacementPolicyProperties extends PlacementPolicyProperties { + affinityStrength?: AffinityStrength; + affinityType: AffinityType; + azureHybridBenefitType?: AzureHybridBenefitType; + hostMembers: string[]; + type: "VmHost"; + vmMembers: string[]; +} + +// @public +export interface VmPlacementPolicyProperties extends PlacementPolicyProperties { + affinityType: AffinityType; + type: "VmVm"; + vmMembers: string[]; +} + +// @public +export type VMTypeEnum = string; + +// @public +export interface WorkloadNetwork extends ProxyResource { + properties?: WorkloadNetworkProperties; +} + +// @public +export interface WorkloadNetworkDhcp extends ProxyResource { + properties?: WorkloadNetworkDhcpEntityUnion; +} + +// @public +export interface WorkloadNetworkDhcpEntity { + dhcpType: DhcpTypeEnum; + displayName?: string; + readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; + revision?: number; + readonly segments?: string[]; +} + +// @public +export type WorkloadNetworkDhcpEntityUnion = WorkloadNetworkDhcpServer | WorkloadNetworkDhcpRelay | WorkloadNetworkDhcpEntity; + +// @public +export type WorkloadNetworkDhcpProvisioningState = string; + +// @public +export interface WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { + dhcpType: "RELAY"; + serverAddresses?: string[]; +} + +// @public +export interface WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { + dhcpType: "SERVER"; + leaseTime?: number; + serverAddress?: string; +} + +// @public +export interface WorkloadNetworkDnsService extends ProxyResource { + properties?: WorkloadNetworkDnsServiceProperties; +} + +// @public +export interface WorkloadNetworkDnsServiceProperties { + defaultDnsZone?: string; + displayName?: string; + dnsServiceIp?: string; + fqdnZones?: string[]; + logLevel?: DnsServiceLogLevelEnum; + readonly provisioningState?: WorkloadNetworkDnsServiceProvisioningState; + revision?: number; + readonly status?: DnsServiceStatusEnum; +} + +// @public +export type WorkloadNetworkDnsServiceProvisioningState = string; + +// @public +export interface WorkloadNetworkDnsZone extends ProxyResource { + properties?: WorkloadNetworkDnsZoneProperties; +} + +// @public +export interface WorkloadNetworkDnsZoneProperties { + displayName?: string; + dnsServerIps?: string[]; + dnsServices?: number; + domain?: string[]; + readonly provisioningState?: WorkloadNetworkDnsZoneProvisioningState; + revision?: number; + sourceIp?: string; +} + +// @public +export type WorkloadNetworkDnsZoneProvisioningState = string; + +// @public +export interface WorkloadNetworkGateway extends ProxyResource { + properties?: WorkloadNetworkGatewayProperties; +} + +// @public +export interface WorkloadNetworkGatewayProperties { + displayName?: string; + readonly path?: string; + readonly provisioningState?: WorkloadNetworkProvisioningState; +} + +// @public +export interface WorkloadNetworkPortMirroring extends ProxyResource { + properties?: WorkloadNetworkPortMirroringProperties; +} + +// @public +export interface WorkloadNetworkPortMirroringProperties { + destination?: string; + direction?: PortMirroringDirectionEnum; + displayName?: string; + readonly provisioningState?: WorkloadNetworkPortMirroringProvisioningState; + revision?: number; + source?: string; + readonly status?: PortMirroringStatusEnum; +} + +// @public +export type WorkloadNetworkPortMirroringProvisioningState = string; + +// @public +export interface WorkloadNetworkProperties { + readonly provisioningState?: WorkloadNetworkProvisioningState; +} + +// @public +export type WorkloadNetworkProvisioningState = string; + +// @public +export interface WorkloadNetworkPublicIP extends ProxyResource { + properties?: WorkloadNetworkPublicIPProperties; +} + +// @public +export interface WorkloadNetworkPublicIPProperties { + displayName?: string; + numberOfPublicIPs?: number; + readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; + readonly publicIPBlock?: string; +} + +// @public +export type WorkloadNetworkPublicIPProvisioningState = string; + +// @public +export interface WorkloadNetworkSegment extends ProxyResource { + properties?: WorkloadNetworkSegmentProperties; +} + +// @public +export interface WorkloadNetworkSegmentPortVif { + portName?: string; +} + +// @public +export interface WorkloadNetworkSegmentProperties { + connectedGateway?: string; + displayName?: string; + readonly portVif?: WorkloadNetworkSegmentPortVif[]; + readonly provisioningState?: WorkloadNetworkSegmentProvisioningState; + revision?: number; + readonly status?: SegmentStatusEnum; + subnet?: WorkloadNetworkSegmentSubnet; +} + +// @public +export type WorkloadNetworkSegmentProvisioningState = string; + +// @public +export interface WorkloadNetworkSegmentSubnet { + dhcpRanges?: string[]; + gatewayAddress?: string; +} + +// @public +export interface WorkloadNetworkVirtualMachine extends ProxyResource { + properties?: WorkloadNetworkVirtualMachineProperties; +} + +// @public +export interface WorkloadNetworkVirtualMachineProperties { + displayName?: string; + readonly provisioningState?: WorkloadNetworkProvisioningState; + readonly vmType?: VMTypeEnum; +} + +// @public +export interface WorkloadNetworkVMGroup extends ProxyResource { + properties?: WorkloadNetworkVMGroupProperties; +} + +// @public +export interface WorkloadNetworkVMGroupProperties { + displayName?: string; + members?: string[]; + readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; + revision?: number; + readonly status?: VMGroupStatusEnum; +} + +// @public +export type WorkloadNetworkVMGroupProvisioningState = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/avs/arm-avs/review/arm-avs.api.md b/sdk/avs/arm-avs/review/arm-avs.api.md index 33cd6412a704..3d3d265456b0 100644 --- a/sdk/avs/arm-avs/review/arm-avs.api.md +++ b/sdk/avs/arm-avs/review/arm-avs.api.md @@ -4,11 +4,14 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } 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 type ActionType = string; @@ -30,81 +33,44 @@ export interface AddonHcxProperties extends AddonProperties { offer: string; } -// @public -export interface AddonList { - nextLink?: string; - value: Addon[]; -} - // @public export interface AddonProperties { - addonType: "Arc" | "HCX" | "SRM" | "VR"; + addonType: AddonType; readonly provisioningState?: AddonProvisioningState; } -// @public (undocumented) -export type AddonPropertiesUnion = AddonProperties | AddonArcProperties | AddonHcxProperties | AddonSrmProperties | AddonVrProperties; - -// @public -export type AddonProvisioningState = string; - // @public -export interface Addons { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, addonName: string, addon: Addon, options?: AddonsCreateOrUpdateOptionalParams): Promise, AddonsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, addonName: string, addon: Addon, options?: AddonsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, addonName: string, options?: AddonsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, addonName: string, options?: AddonsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, addonName: string, options?: AddonsGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: AddonsListOptionalParams): PagedAsyncIterableIterator; -} +export type AddonPropertiesUnion = AddonSrmProperties | AddonVrProperties | AddonHcxProperties | AddonArcProperties | AddonProperties; // @public -export interface AddonsCreateOrUpdateHeaders { - retryAfter?: number; -} +export type AddonProvisioningState = string; // @public -export interface AddonsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface AddonsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type AddonsCreateOrUpdateResponse = Addon; - -// @public -export interface AddonsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface AddonsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface AddonsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface AddonsGetOptionalParams extends coreClient.OperationOptions { +export interface AddonsGetOptionalParams extends OperationOptions { } // @public -export type AddonsGetResponse = Addon; - -// @public -export interface AddonsListNextOptionalParams extends coreClient.OperationOptions { +export interface AddonsListOptionalParams extends OperationOptions { } // @public -export type AddonsListNextResponse = AddonList; - -// @public -export interface AddonsListOptionalParams extends coreClient.OperationOptions { +export interface AddonsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, addonName: string, addon: Addon, options?: AddonsCreateOrUpdateOptionalParams) => PollerLike, Addon>; + delete: (resourceGroupName: string, privateCloudName: string, addonName: string, options?: AddonsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, addonName: string, options?: AddonsGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: AddonsListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type AddonsListResponse = AddonList; - // @public export interface AddonSrmProperties extends AddonProperties { addonType: "SRM"; @@ -135,62 +101,31 @@ export type AffinityStrength = string; export type AffinityType = string; // @public -export interface Authorizations { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: ExpressRouteAuthorization, options?: AuthorizationsCreateOrUpdateOptionalParams): Promise, AuthorizationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: ExpressRouteAuthorization, options?: AuthorizationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: AuthorizationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: AuthorizationsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: AuthorizationsGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: AuthorizationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AuthorizationsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface AuthorizationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface AuthorizationsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization; - -// @public -export interface AuthorizationsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface AuthorizationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface AuthorizationsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface AuthorizationsGetOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationsGetOptionalParams extends OperationOptions { } // @public -export type AuthorizationsGetResponse = ExpressRouteAuthorization; - -// @public -export interface AuthorizationsListNextOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationsListOptionalParams extends OperationOptions { } // @public -export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList; - -// @public -export interface AuthorizationsListOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: ExpressRouteAuthorization, options?: AuthorizationsCreateOrUpdateOptionalParams) => PollerLike, ExpressRouteAuthorization>; + delete: (resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: AuthorizationsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: AuthorizationsGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: AuthorizationsListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type AuthorizationsListResponse = ExpressRouteAuthorizationList; - // @public export interface AvailabilityProperties { secondaryZone?: number; @@ -201,60 +136,36 @@ export interface AvailabilityProperties { // @public export type AvailabilityStrategy = string; -// @public -export type AzureHybridBenefitType = string; - // @public (undocumented) -export class AzureVMwareSolutionAPI extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureVMwareSolutionAPIOptionalParams); - // (undocumented) - addons: Addons; - // (undocumented) - apiVersion: string; - // (undocumented) - authorizations: Authorizations; - // (undocumented) - cloudLinks: CloudLinks; - // (undocumented) - clusters: Clusters; - // (undocumented) - datastores: Datastores; - // (undocumented) - globalReachConnections: GlobalReachConnections; - // (undocumented) - hcxEnterpriseSites: HcxEnterpriseSites; - // (undocumented) - iscsiPaths: IscsiPaths; - // (undocumented) - locations: Locations; - // (undocumented) - operations: Operations; - // (undocumented) - placementPolicies: PlacementPolicies; - // (undocumented) - privateClouds: PrivateClouds; - // (undocumented) - scriptCmdlets: ScriptCmdlets; - // (undocumented) - scriptExecutions: ScriptExecutions; - // (undocumented) - scriptPackages: ScriptPackages; - // (undocumented) - subscriptionId: string; - // (undocumented) - virtualMachines: VirtualMachines; - // (undocumented) - workloadNetworks: WorkloadNetworks; +export class AvsClient { + constructor(credential: TokenCredential, subscriptionId: string, options?: AvsClientOptionalParams); + readonly addons: AddonsOperations; + readonly authorizations: AuthorizationsOperations; + readonly cloudLinks: CloudLinksOperations; + readonly clusters: ClustersOperations; + readonly datastores: DatastoresOperations; + readonly globalReachConnections: GlobalReachConnectionsOperations; + readonly hcxEnterpriseSites: HcxEnterpriseSitesOperations; + readonly iscsiPaths: IscsiPathsOperations; + readonly locations: LocationsOperations; + readonly operations: OperationsOperations; + readonly pipeline: Pipeline; + readonly placementPolicies: PlacementPoliciesOperations; + readonly privateClouds: PrivateCloudsOperations; + readonly scriptCmdlets: ScriptCmdletsOperations; + readonly scriptExecutions: ScriptExecutionsOperations; + readonly scriptPackages: ScriptPackagesOperations; + readonly virtualMachines: VirtualMachinesOperations; + readonly workloadNetworks: WorkloadNetworksOperations; +} + +// @public +export interface AvsClientOptionalParams extends ClientOptions { + apiVersion?: string; } // @public -export interface AzureVMwareSolutionAPIOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} +export type AzureHybridBenefitType = string; // @public export interface Circuit { @@ -266,186 +177,113 @@ export interface Circuit { // @public export interface CloudLink extends ProxyResource { - linkedCloud?: string; - readonly provisioningState?: CloudLinkProvisioningState; - readonly status?: CloudLinkStatus; + properties?: CloudLinkProperties; } // @public -export interface CloudLinkList { - nextLink?: string; - value: CloudLink[]; +export interface CloudLinkProperties { + linkedCloud?: string; + readonly provisioningState?: CloudLinkProvisioningState; + readonly status?: CloudLinkStatus; } // @public export type CloudLinkProvisioningState = string; // @public -export interface CloudLinks { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, cloudLink: CloudLink, options?: CloudLinksCreateOrUpdateOptionalParams): Promise, CloudLinksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, cloudLink: CloudLink, options?: CloudLinksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: CloudLinksDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: CloudLinksDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: CloudLinksGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: CloudLinksListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface CloudLinksCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface CloudLinksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface CloudLinksCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type CloudLinksCreateOrUpdateResponse = CloudLink; - -// @public -export interface CloudLinksDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface CloudLinksDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface CloudLinksDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface CloudLinksGetOptionalParams extends coreClient.OperationOptions { +export interface CloudLinksGetOptionalParams extends OperationOptions { } // @public -export type CloudLinksGetResponse = CloudLink; - -// @public -export interface CloudLinksListNextOptionalParams extends coreClient.OperationOptions { +export interface CloudLinksListOptionalParams extends OperationOptions { } // @public -export type CloudLinksListNextResponse = CloudLinkList; - -// @public -export interface CloudLinksListOptionalParams extends coreClient.OperationOptions { +export interface CloudLinksOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, cloudLinkName: string, cloudLink: CloudLink, options?: CloudLinksCreateOrUpdateOptionalParams) => PollerLike, CloudLink>; + delete: (resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: CloudLinksDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, cloudLinkName: string, options?: CloudLinksGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: CloudLinksListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type CloudLinksListResponse = CloudLinkList; - // @public export type CloudLinkStatus = string; // @public export interface Cluster extends ProxyResource { + properties?: ClusterProperties; + sku: Sku; +} + +// @public +export interface ClusterProperties { readonly clusterId?: number; clusterSize?: number; hosts?: string[]; readonly provisioningState?: ClusterProvisioningState; - sku: Sku; vsanDatastoreName?: string; } -// @public -export interface ClusterList { - nextLink?: string; - value: Cluster[]; -} - // @public export type ClusterProvisioningState = string; // @public -export interface Clusters { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, clusterUpdate: ClusterUpdate, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, clusterUpdate: ClusterUpdate, options?: ClustersUpdateOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: ClustersListOptionalParams): PagedAsyncIterableIterator; - listZones(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersListZonesOptionalParams): Promise; -} - -// @public -export interface ClustersCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface ClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ClustersCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ClustersCreateOrUpdateResponse = Cluster; - -// @public -export interface ClustersDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ClustersDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersGetResponse = Cluster; - -// @public -export interface ClustersListNextOptionalParams extends coreClient.OperationOptions { +export interface ClustersGetOptionalParams extends OperationOptions { } // @public -export type ClustersListNextResponse = ClusterList; - -// @public -export interface ClustersListOptionalParams extends coreClient.OperationOptions { +export interface ClustersListOptionalParams extends OperationOptions { } // @public -export type ClustersListResponse = ClusterList; - -// @public -export interface ClustersListZonesOptionalParams extends coreClient.OperationOptions { +export interface ClustersListZonesOptionalParams extends OperationOptions { } // @public -export type ClustersListZonesResponse = ClusterZoneList; - -// @public -export interface ClustersUpdateHeaders { - location?: string; - retryAfter?: number; +export interface ClustersOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, clusterName: string, cluster: Cluster, options?: ClustersCreateOrUpdateOptionalParams) => PollerLike, Cluster>; + delete: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: ClustersListOptionalParams) => PagedAsyncIterableIterator; + listZones: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: ClustersListZonesOptionalParams) => Promise; + update: (resourceGroupName: string, privateCloudName: string, clusterName: string, clusterUpdate: ClusterUpdate, options?: ClustersUpdateOptionalParams) => PollerLike, void>; } // @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ClustersUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ClustersUpdateResponse = Cluster; +export interface ClusterUpdate { + properties?: ClusterUpdateProperties; + sku?: Sku; +} // @public -export interface ClusterUpdate { +export interface ClusterUpdateProperties { clusterSize?: number; hosts?: string[]; - sku?: Sku; } // @public @@ -459,11 +297,21 @@ export interface ClusterZoneList { zones?: ClusterZone[]; } +// @public +export type ContinuablePage = TPage & { + continuationToken?: string; +}; + // @public export type CreatedByType = string; // @public export interface Datastore extends ProxyResource { + properties?: DatastoreProperties; +} + +// @public +export interface DatastoreProperties { diskPoolVolume?: DiskPoolVolume; elasticSanVolume?: ElasticSanVolume; netAppVolume?: NetAppVolume; @@ -471,72 +319,35 @@ export interface Datastore extends ProxyResource { readonly status?: DatastoreStatus; } -// @public -export interface DatastoreList { - nextLink?: string; - value: Datastore[]; -} - // @public export type DatastoreProvisioningState = string; // @public -export interface Datastores { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, datastore: Datastore, options?: DatastoresCreateOrUpdateOptionalParams): Promise, DatastoresCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, datastore: Datastore, options?: DatastoresCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: DatastoresGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: DatastoresListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DatastoresCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface DatastoresCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface DatastoresCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type DatastoresCreateOrUpdateResponse = Datastore; - -// @public -export interface DatastoresDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface DatastoresDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface DatastoresDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface DatastoresGetOptionalParams extends coreClient.OperationOptions { +export interface DatastoresGetOptionalParams extends OperationOptions { } // @public -export type DatastoresGetResponse = Datastore; - -// @public -export interface DatastoresListNextOptionalParams extends coreClient.OperationOptions { +export interface DatastoresListOptionalParams extends OperationOptions { } // @public -export type DatastoresListNextResponse = DatastoreList; - -// @public -export interface DatastoresListOptionalParams extends coreClient.OperationOptions { +export interface DatastoresOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, datastore: Datastore, options?: DatastoresCreateOrUpdateOptionalParams) => PollerLike, Datastore>; + delete: (resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: DatastoresDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, clusterName: string, datastoreName: string, options?: DatastoresGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: DatastoresListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type DatastoresListResponse = DatastoreList; - // @public export type DatastoreStatus = string; @@ -601,47 +412,28 @@ export interface Endpoints { } // @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - 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; +export interface ExpressRouteAuthorization extends ProxyResource { + properties?: ExpressRouteAuthorizationProperties; } // @public -export interface ExpressRouteAuthorization extends ProxyResource { +export interface ExpressRouteAuthorizationProperties { readonly expressRouteAuthorizationId?: string; readonly expressRouteAuthorizationKey?: string; expressRouteId?: string; readonly provisioningState?: ExpressRouteAuthorizationProvisioningState; } -// @public -export interface ExpressRouteAuthorizationList { - nextLink?: string; - value: ExpressRouteAuthorization[]; -} - // @public export type ExpressRouteAuthorizationProvisioningState = string; // @public -export function getContinuationToken(page: unknown): string | undefined; +export interface GlobalReachConnection extends ProxyResource { + properties?: GlobalReachConnectionProperties; +} // @public -export interface GlobalReachConnection extends ProxyResource { +export interface GlobalReachConnectionProperties { readonly addressPrefix?: string; authorizationKey?: string; readonly circuitConnectionStatus?: GlobalReachConnectionStatus; @@ -650,131 +442,77 @@ export interface GlobalReachConnection extends ProxyResource { readonly provisioningState?: GlobalReachConnectionProvisioningState; } -// @public -export interface GlobalReachConnectionList { - nextLink?: string; - value: GlobalReachConnection[]; -} - // @public export type GlobalReachConnectionProvisioningState = string; // @public -export interface GlobalReachConnections { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, globalReachConnection: GlobalReachConnection, options?: GlobalReachConnectionsCreateOrUpdateOptionalParams): Promise, GlobalReachConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, globalReachConnection: GlobalReachConnection, options?: GlobalReachConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: GlobalReachConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: GlobalReachConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: GlobalReachConnectionsGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: GlobalReachConnectionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GlobalReachConnectionsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface GlobalReachConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface GlobalReachConnectionsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type GlobalReachConnectionsCreateOrUpdateResponse = GlobalReachConnection; - -// @public -export interface GlobalReachConnectionsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface GlobalReachConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface GlobalReachConnectionsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface GlobalReachConnectionsGetOptionalParams extends coreClient.OperationOptions { +export interface GlobalReachConnectionsGetOptionalParams extends OperationOptions { } // @public -export type GlobalReachConnectionsGetResponse = GlobalReachConnection; - -// @public -export interface GlobalReachConnectionsListNextOptionalParams extends coreClient.OperationOptions { +export interface GlobalReachConnectionsListOptionalParams extends OperationOptions { } // @public -export type GlobalReachConnectionsListNextResponse = GlobalReachConnectionList; - -// @public -export interface GlobalReachConnectionsListOptionalParams extends coreClient.OperationOptions { +export interface GlobalReachConnectionsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, globalReachConnection: GlobalReachConnection, options?: GlobalReachConnectionsCreateOrUpdateOptionalParams) => PollerLike, GlobalReachConnection>; + delete: (resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: GlobalReachConnectionsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, globalReachConnectionName: string, options?: GlobalReachConnectionsGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: GlobalReachConnectionsListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type GlobalReachConnectionsListResponse = GlobalReachConnectionList; - // @public export type GlobalReachConnectionStatus = string; // @public export interface HcxEnterpriseSite extends ProxyResource { - readonly activationKey?: string; - readonly provisioningState?: HcxEnterpriseSiteProvisioningState; - readonly status?: HcxEnterpriseSiteStatus; + properties?: HcxEnterpriseSiteProperties; } // @public -export interface HcxEnterpriseSiteList { - nextLink?: string; - value: HcxEnterpriseSite[]; +export interface HcxEnterpriseSiteProperties { + readonly activationKey?: string; + readonly provisioningState?: HcxEnterpriseSiteProvisioningState; + readonly status?: HcxEnterpriseSiteStatus; } // @public export type HcxEnterpriseSiteProvisioningState = string; // @public -export interface HcxEnterpriseSites { - createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: HcxEnterpriseSite, options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: HcxEnterpriseSitesDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: HcxEnterpriseSitesGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: HcxEnterpriseSitesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface HcxEnterpriseSitesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface HcxEnterpriseSitesCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite; - -// @public -export interface HcxEnterpriseSitesDeleteOptionalParams extends coreClient.OperationOptions { +export interface HcxEnterpriseSitesDeleteOptionalParams extends OperationOptions { } // @public -export interface HcxEnterpriseSitesGetOptionalParams extends coreClient.OperationOptions { +export interface HcxEnterpriseSitesGetOptionalParams extends OperationOptions { } // @public -export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite; - -// @public -export interface HcxEnterpriseSitesListNextOptionalParams extends coreClient.OperationOptions { +export interface HcxEnterpriseSitesListOptionalParams extends OperationOptions { } // @public -export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList; - -// @public -export interface HcxEnterpriseSitesListOptionalParams extends coreClient.OperationOptions { +export interface HcxEnterpriseSitesOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: HcxEnterpriseSite, options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: HcxEnterpriseSitesDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: HcxEnterpriseSitesGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: HcxEnterpriseSitesListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList; - // @public export type HcxEnterpriseSiteStatus = string; @@ -797,76 +535,44 @@ export type InternetEnum = string; // @public export interface IscsiPath extends ProxyResource { - networkBlock?: string; - readonly provisioningState?: IscsiPathProvisioningState; + properties?: IscsiPathProperties; } // @public -export interface IscsiPathListResult { - nextLink?: string; - value: IscsiPath[]; +export interface IscsiPathProperties { + networkBlock: string; + readonly provisioningState?: IscsiPathProvisioningState; } // @public export type IscsiPathProvisioningState = string; // @public -export interface IscsiPaths { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, resource: IscsiPath, options?: IscsiPathsCreateOrUpdateOptionalParams): Promise, IscsiPathsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, resource: IscsiPath, options?: IscsiPathsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, options?: IscsiPathsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, options?: IscsiPathsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, options?: IscsiPathsGetOptionalParams): Promise; - listByPrivateCloud(resourceGroupName: string, privateCloudName: string, options?: IscsiPathsListByPrivateCloudOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface IscsiPathsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface IscsiPathsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface IscsiPathsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type IscsiPathsCreateOrUpdateResponse = IscsiPath; - -// @public -export interface IscsiPathsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface IscsiPathsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface IscsiPathsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface IscsiPathsGetOptionalParams extends coreClient.OperationOptions { +export interface IscsiPathsGetOptionalParams extends OperationOptions { } // @public -export type IscsiPathsGetResponse = IscsiPath; - -// @public -export interface IscsiPathsListByPrivateCloudNextOptionalParams extends coreClient.OperationOptions { +export interface IscsiPathsListByPrivateCloudOptionalParams extends OperationOptions { } // @public -export type IscsiPathsListByPrivateCloudNextResponse = IscsiPathListResult; - -// @public -export interface IscsiPathsListByPrivateCloudOptionalParams extends coreClient.OperationOptions { +export interface IscsiPathsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, iscsiPathName: string, resource: IscsiPath, options?: IscsiPathsCreateOrUpdateOptionalParams) => PollerLike, IscsiPath>; + delete: (resourceGroupName: string, privateCloudName: string, iscsiPathName: string, options?: IscsiPathsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, iscsiPathName: string, options?: IscsiPathsGetOptionalParams) => Promise; + listByPrivateCloud: (resourceGroupName: string, privateCloudName: string, options?: IscsiPathsListByPrivateCloudOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type IscsiPathsListByPrivateCloudResponse = IscsiPathListResult; - // @public export enum KnownActionType { Internal = "Internal" @@ -885,9 +591,13 @@ export enum KnownAddonProvisioningState { // @public export enum KnownAddonType { + // (undocumented) Arc = "Arc", + // (undocumented) HCX = "HCX", + // (undocumented) SRM = "SRM", + // (undocumented) VR = "VR" } @@ -974,23 +684,25 @@ export enum KnownDatastoreStatus { // @public export enum KnownDhcpTypeEnum { - Relay = "RELAY", - Server = "SERVER" + // (undocumented) + RELAY = "RELAY", + // (undocumented) + SERVER = "SERVER" } // @public export enum KnownDnsServiceLogLevelEnum { - Debug = "DEBUG", - Error = "ERROR", - Fatal = "FATAL", - Info = "INFO", - Warning = "WARNING" + DEBUG = "DEBUG", + ERROR = "ERROR", + FATAL = "FATAL", + INFO = "INFO", + WARNING = "WARNING" } // @public export enum KnownDnsServiceStatusEnum { - Failure = "FAILURE", - Success = "SUCCESS" + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" } // @public @@ -1074,8 +786,8 @@ export enum KnownIscsiPathProvisioningState { // @public export enum KnownMountOptionEnum { - Attach = "ATTACH", - Mount = "MOUNT" + ATTACH = "ATTACH", + MOUNT = "MOUNT" } // @public @@ -1092,9 +804,9 @@ export enum KnownOptionalParamEnum { // @public export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" + "user,system" = "user,system", + system = "system", + user = "user" } // @public @@ -1115,21 +827,23 @@ export enum KnownPlacementPolicyState { // @public export enum KnownPlacementPolicyType { + // (undocumented) VmHost = "VmHost", + // (undocumented) VmVm = "VmVm" } // @public export enum KnownPortMirroringDirectionEnum { - Bidirectional = "BIDIRECTIONAL", - Egress = "EGRESS", - Ingress = "INGRESS" + BIDIRECTIONAL = "BIDIRECTIONAL", + EGRESS = "EGRESS", + INGRESS = "INGRESS" } // @public export enum KnownPortMirroringStatusEnum { - Failure = "FAILURE", - Success = "SUCCESS" + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" } // @public @@ -1150,12 +864,6 @@ export enum KnownQuotaEnabled { Enabled = "Enabled" } -// @public -export enum KnownResourceIdentityType { - None = "None", - SystemAssigned = "SystemAssigned" -} - // @public export enum KnownScriptCmdletAudience { Any = "Any", @@ -1171,8 +879,11 @@ export enum KnownScriptCmdletProvisioningState { // @public export enum KnownScriptExecutionParameterType { + // (undocumented) Credential = "Credential", + // (undocumented) SecureValue = "SecureValue", + // (undocumented) Value = "Value" } @@ -1215,8 +926,8 @@ export enum KnownScriptParameterTypes { // @public export enum KnownSegmentStatusEnum { - Failure = "FAILURE", - Success = "SUCCESS" + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" } // @public @@ -1225,6 +936,12 @@ export enum KnownSslEnum { Enabled = "Enabled" } +// @public +export enum KnownSystemAssignedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + // @public export enum KnownTrialStatus { TrialAvailable = "TrialAvailable", @@ -1232,6 +949,11 @@ export enum KnownTrialStatus { TrialUsed = "TrialUsed" } +// @public +export enum KnownVersions { + v2023_09_01 = "2023-09-01" +} + // @public export enum KnownVirtualMachineProvisioningState { Canceled = "Canceled", @@ -1253,15 +975,15 @@ export enum KnownVisibilityParameterEnum { // @public export enum KnownVMGroupStatusEnum { - Failure = "FAILURE", - Success = "SUCCESS" + FAILURE = "FAILURE", + SUCCESS = "SUCCESS" } // @public export enum KnownVMTypeEnum { - Edge = "EDGE", - Regular = "REGULAR", - Service = "SERVICE" + EDGE = "EDGE", + REGULAR = "REGULAR", + SERVICE = "SERVICE" } // @public @@ -1345,25 +1067,19 @@ export enum KnownWorkloadNetworkVMGroupProvisioningState { } // @public -export interface Locations { - checkQuotaAvailability(location: string, options?: LocationsCheckQuotaAvailabilityOptionalParams): Promise; - checkTrialAvailability(location: string, options?: LocationsCheckTrialAvailabilityOptionalParams): Promise; +export interface LocationsCheckQuotaAvailabilityOptionalParams extends OperationOptions { } // @public -export interface LocationsCheckQuotaAvailabilityOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocationsCheckQuotaAvailabilityResponse = Quota; - -// @public -export interface LocationsCheckTrialAvailabilityOptionalParams extends coreClient.OperationOptions { +export interface LocationsCheckTrialAvailabilityOptionalParams extends OperationOptions { sku?: Sku; } // @public -export type LocationsCheckTrialAvailabilityResponse = Trial; +export interface LocationsOperations { + checkQuotaAvailability: (location: string, options?: LocationsCheckQuotaAvailabilityOptionalParams) => Promise; + checkTrialAvailability: (location: string, options?: LocationsCheckTrialAvailabilityOptionalParams) => Promise; +} // @public export interface ManagementCluster { @@ -1403,116 +1119,64 @@ export interface OperationDisplay { } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; +export interface OperationsListOptionalParams extends OperationOptions { } // @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { -} +export type OptionalParamEnum = string; // @public -export type OperationsListNextResponse = OperationListResult; +export type Origin = string; // @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; } // @public -export type OperationsListResponse = OperationListResult; +export interface PageSettings { + continuationToken?: string; +} // @public -export type OptionalParamEnum = string; - -// @public -export type Origin = string; - -// @public -export interface PlacementPolicies { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicy: PlacementPolicy, options?: PlacementPoliciesCreateOrUpdateOptionalParams): Promise, PlacementPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicy: PlacementPolicy, options?: PlacementPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: PlacementPoliciesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: PlacementPoliciesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicyUpdate: PlacementPolicyUpdate, options?: PlacementPoliciesUpdateOptionalParams): Promise, PlacementPoliciesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicyUpdate: PlacementPolicyUpdate, options?: PlacementPoliciesUpdateOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: PlacementPoliciesGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: PlacementPoliciesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PlacementPoliciesCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface PlacementPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PlacementPoliciesCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type PlacementPoliciesCreateOrUpdateResponse = PlacementPolicy; - -// @public -export interface PlacementPoliciesDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PlacementPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PlacementPoliciesDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface PlacementPoliciesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PlacementPoliciesGetResponse = PlacementPolicy; - -// @public -export interface PlacementPoliciesList { - nextLink?: string; - value: PlacementPolicy[]; -} - -// @public -export interface PlacementPoliciesListNextOptionalParams extends coreClient.OperationOptions { +export interface PlacementPoliciesGetOptionalParams extends OperationOptions { } // @public -export type PlacementPoliciesListNextResponse = PlacementPoliciesList; - -// @public -export interface PlacementPoliciesListOptionalParams extends coreClient.OperationOptions { +export interface PlacementPoliciesListOptionalParams extends OperationOptions { } // @public -export type PlacementPoliciesListResponse = PlacementPoliciesList; - -// @public -export interface PlacementPoliciesUpdateHeaders { - location?: string; - retryAfter?: number; +export interface PlacementPoliciesOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicy: PlacementPolicy, options?: PlacementPoliciesCreateOrUpdateOptionalParams) => PollerLike, PlacementPolicy>; + delete: (resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: PlacementPoliciesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, options?: PlacementPoliciesGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: PlacementPoliciesListOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, privateCloudName: string, clusterName: string, placementPolicyName: string, placementPolicyUpdate: PlacementPolicyUpdate, options?: PlacementPoliciesUpdateOptionalParams) => PollerLike, void>; } // @public -export interface PlacementPoliciesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PlacementPoliciesUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } -// @public -export type PlacementPoliciesUpdateResponse = PlacementPolicy; - // @public export interface PlacementPolicy extends ProxyResource { properties?: PlacementPolicyPropertiesUnion; @@ -1523,11 +1187,11 @@ export interface PlacementPolicyProperties { displayName?: string; readonly provisioningState?: PlacementPolicyProvisioningState; state?: PlacementPolicyState; - type: "VmHost" | "VmVm"; + type: PlacementPolicyType; } -// @public (undocumented) -export type PlacementPolicyPropertiesUnion = PlacementPolicyProperties | VmHostPlacementPolicyProperties | VmPlacementPolicyProperties; +// @public +export type PlacementPolicyPropertiesUnion = VmPlacementPolicyProperties | VmHostPlacementPolicyProperties | PlacementPolicyProperties; // @public export type PlacementPolicyProvisioningState = string; @@ -1540,6 +1204,11 @@ export type PlacementPolicyType = string; // @public export interface PlacementPolicyUpdate { + properties?: PlacementPolicyUpdateProperties; +} + +// @public +export interface PlacementPolicyUpdateProperties { affinityStrength?: AffinityStrength; azureHybridBenefitType?: AzureHybridBenefitType; hostMembers?: string[]; @@ -1555,6 +1224,20 @@ export type PortMirroringStatusEnum = string; // @public export interface PrivateCloud extends TrackedResource { + identity?: PrivateCloudIdentity; + properties?: PrivateCloudProperties; + sku: Sku; +} + +// @public +export interface PrivateCloudIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: SystemAssignedServiceIdentityType; +} + +// @public +export interface PrivateCloudProperties { availability?: AvailabilityProperties; circuit?: Circuit; dnsZoneType?: DnsZoneType; @@ -1562,186 +1245,97 @@ export interface PrivateCloud extends TrackedResource { readonly endpoints?: Endpoints; extendedNetworkBlocks?: string[]; readonly externalCloudLinks?: string[]; - identity?: PrivateCloudIdentity; identitySources?: IdentitySource[]; internet?: InternetEnum; - managementCluster?: ManagementCluster; + managementCluster: ManagementCluster; readonly managementNetwork?: string; - networkBlock?: string; + networkBlock: string; readonly nsxPublicIpQuotaRaised?: NsxPublicIpQuotaRaisedEnum; readonly nsxtCertificateThumbprint?: string; nsxtPassword?: string; readonly provisioningNetwork?: string; readonly provisioningState?: PrivateCloudProvisioningState; secondaryCircuit?: Circuit; - sku: Sku; readonly vcenterCertificateThumbprint?: string; vcenterPassword?: string; virtualNetworkId?: string; readonly vmotionNetwork?: string; } -// @public -export interface PrivateCloudIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ResourceIdentityType; -} - -// @public -export interface PrivateCloudList { - nextLink?: string; - value: PrivateCloud[]; -} - // @public export type PrivateCloudProvisioningState = string; // @public -export interface PrivateClouds { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: PrivateCloud, options?: PrivateCloudsCreateOrUpdateOptionalParams): Promise, PrivateCloudsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, privateCloud: PrivateCloud, options?: PrivateCloudsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsDeleteOptionalParams): Promise; - beginRotateNsxtPassword(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateNsxtPasswordOptionalParams): Promise, PrivateCloudsRotateNsxtPasswordResponse>>; - beginRotateNsxtPasswordAndWait(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateNsxtPasswordOptionalParams): Promise; - beginRotateVcenterPassword(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateVcenterPasswordOptionalParams): Promise, PrivateCloudsRotateVcenterPasswordResponse>>; - beginRotateVcenterPasswordAndWait(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateVcenterPasswordOptionalParams): Promise; - beginUpdate(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: PrivateCloudUpdate, options?: PrivateCloudsUpdateOptionalParams): Promise, PrivateCloudsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: PrivateCloudUpdate, options?: PrivateCloudsUpdateOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsGetOptionalParams): Promise; - list(resourceGroupName: string, options?: PrivateCloudsListOptionalParams): PagedAsyncIterableIterator; - listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsListAdminCredentialsOptionalParams): Promise; - listInSubscription(options?: PrivateCloudsListInSubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PrivateCloudsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface PrivateCloudsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PrivateCloudsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud; - -// @public -export interface PrivateCloudsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PrivateCloudsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface PrivateCloudsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateCloudsGetResponse = PrivateCloud; - -// @public -export interface PrivateCloudsListAdminCredentialsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials; - -// @public -export interface PrivateCloudsListInSubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface PrivateCloudsGetOptionalParams extends OperationOptions { } // @public -export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListInSubscriptionOptionalParams extends coreClient.OperationOptions { +export interface PrivateCloudsListAdminCredentialsOptionalParams extends OperationOptions { } // @public -export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListNextOptionalParams extends coreClient.OperationOptions { +export interface PrivateCloudsListInSubscriptionOptionalParams extends OperationOptions { } // @public -export type PrivateCloudsListNextResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListOptionalParams extends coreClient.OperationOptions { +export interface PrivateCloudsListOptionalParams extends OperationOptions { } // @public -export type PrivateCloudsListResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsRotateNsxtPasswordHeaders { - location?: string; - retryAfter?: number; +export interface PrivateCloudsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, privateCloud: PrivateCloud, options?: PrivateCloudsCreateOrUpdateOptionalParams) => PollerLike, PrivateCloud>; + delete: (resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsGetOptionalParams) => Promise; + list: (resourceGroupName: string, options?: PrivateCloudsListOptionalParams) => PagedAsyncIterableIterator; + listAdminCredentials: (resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsListAdminCredentialsOptionalParams) => Promise; + listInSubscription: (options?: PrivateCloudsListInSubscriptionOptionalParams) => PagedAsyncIterableIterator; + rotateNsxtPassword: (resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateNsxtPasswordOptionalParams) => PollerLike, void>; + rotateVcenterPassword: (resourceGroupName: string, privateCloudName: string, options?: PrivateCloudsRotateVcenterPasswordOptionalParams) => PollerLike, void>; + update: (resourceGroupName: string, privateCloudName: string, privateCloudUpdate: PrivateCloudUpdate, options?: PrivateCloudsUpdateOptionalParams) => PollerLike, void>; } // @public -export interface PrivateCloudsRotateNsxtPasswordOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PrivateCloudsRotateNsxtPasswordOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type PrivateCloudsRotateNsxtPasswordResponse = PrivateCloudsRotateNsxtPasswordHeaders; - -// @public -export interface PrivateCloudsRotateVcenterPasswordHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsRotateVcenterPasswordOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PrivateCloudsRotateVcenterPasswordOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type PrivateCloudsRotateVcenterPasswordResponse = PrivateCloudsRotateVcenterPasswordHeaders; - -// @public -export interface PrivateCloudsUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PrivateCloudsUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type PrivateCloudsUpdateResponse = PrivateCloud; +export interface PrivateCloudUpdate { + identity?: PrivateCloudIdentity; + properties?: PrivateCloudUpdateProperties; + sku?: Sku; + tags?: Record; +} // @public -export interface PrivateCloudUpdate { +export interface PrivateCloudUpdateProperties { availability?: AvailabilityProperties; dnsZoneType?: DnsZoneType; encryption?: Encryption; extendedNetworkBlocks?: string[]; - identity?: PrivateCloudIdentity; identitySources?: IdentitySource[]; internet?: InternetEnum; managementCluster?: ManagementCluster; - sku?: Sku; - tags?: { - [propertyName: string]: string; - }; } // @public @@ -1757,9 +1351,7 @@ export interface PSCredentialExecutionParameter extends ScriptExecutionParameter // @public export interface Quota { - readonly hostsRemaining?: { - [propertyName: string]: number; - }; + readonly hostsRemaining?: Record; readonly quotaEnabled?: QuotaEnabled; } @@ -1775,10 +1367,25 @@ export interface Resource { } // @public -export type ResourceIdentityType = string; +export function restorePoller(client: AvsClient, 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 interface ScriptCmdlet extends ProxyResource { + properties?: ScriptCmdletProperties; +} + +// @public +export type ScriptCmdletAudience = string; + +// @public +export interface ScriptCmdletProperties { readonly audience?: ScriptCmdletAudience; readonly description?: string; readonly parameters?: ScriptParameter[]; @@ -1786,55 +1393,48 @@ export interface ScriptCmdlet extends ProxyResource { readonly timeout?: string; } -// @public -export type ScriptCmdletAudience = string; - // @public export type ScriptCmdletProvisioningState = string; // @public -export interface ScriptCmdlets { - get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, options?: ScriptCmdletsGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: ScriptCmdletsListOptionalParams): PagedAsyncIterableIterator; +export interface ScriptCmdletsGetOptionalParams extends OperationOptions { } // @public -export interface ScriptCmdletsGetOptionalParams extends coreClient.OperationOptions { +export interface ScriptCmdletsListOptionalParams extends OperationOptions { } // @public -export type ScriptCmdletsGetResponse = ScriptCmdlet; - -// @public -export interface ScriptCmdletsList { - nextLink?: string; - value: ScriptCmdlet[]; +export interface ScriptCmdletsOperations { + get: (resourceGroupName: string, privateCloudName: string, scriptPackageName: string, scriptCmdletName: string, options?: ScriptCmdletsGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: ScriptCmdletsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ScriptCmdletsListNextOptionalParams extends coreClient.OperationOptions { +export interface ScriptExecution extends ProxyResource { + properties?: ScriptExecutionProperties; } // @public -export type ScriptCmdletsListNextResponse = ScriptCmdletsList; +export interface ScriptExecutionParameter { + name: string; + type: ScriptExecutionParameterType; +} // @public -export interface ScriptCmdletsListOptionalParams extends coreClient.OperationOptions { -} +export type ScriptExecutionParameterType = string; // @public -export type ScriptCmdletsListResponse = ScriptCmdletsList; +export type ScriptExecutionParameterUnion = ScriptSecureStringExecutionParameter | ScriptStringExecutionParameter | PSCredentialExecutionParameter | ScriptExecutionParameter; // @public -export interface ScriptExecution extends ProxyResource { +export interface ScriptExecutionProperties { readonly errors?: string[]; failureReason?: string; readonly finishedAt?: Date; hiddenParameters?: ScriptExecutionParameterUnion[]; readonly information?: string[]; - namedOutputs?: { - [propertyName: string]: Record; - }; + namedOutputs?: Record>; output?: string[]; parameters?: ScriptExecutionParameterUnion[]; readonly provisioningState?: ScriptExecutionProvisioningState; @@ -1842,102 +1442,55 @@ export interface ScriptExecution extends ProxyResource { scriptCmdletId?: string; readonly startedAt?: Date; readonly submittedAt?: Date; - timeout?: string; + timeout: string; readonly warnings?: string[]; } -// @public -export interface ScriptExecutionParameter { - name: string; - type: "Credential" | "SecureValue" | "Value"; -} - -// @public -export type ScriptExecutionParameterType = string; - -// @public (undocumented) -export type ScriptExecutionParameterUnion = ScriptExecutionParameter | PSCredentialExecutionParameter | ScriptSecureStringExecutionParameter | ScriptStringExecutionParameter; - // @public export type ScriptExecutionProvisioningState = string; // @public -export interface ScriptExecutions { - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, scriptExecution: ScriptExecution, options?: ScriptExecutionsCreateOrUpdateOptionalParams): Promise, ScriptExecutionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, scriptExecution: ScriptExecution, options?: ScriptExecutionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsGetOptionalParams): Promise; - getExecutionLogs(resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsGetExecutionLogsOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: ScriptExecutionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ScriptExecutionsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface ScriptExecutionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ScriptExecutionsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ScriptExecutionsCreateOrUpdateResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface ScriptExecutionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ScriptExecutionsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ScriptExecutionsGetExecutionLogsOptionalParams extends coreClient.OperationOptions { +export interface ScriptExecutionsGetExecutionLogsOptionalParams extends OperationOptions { scriptOutputStreamType?: ScriptOutputStreamType[]; } // @public -export type ScriptExecutionsGetExecutionLogsResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsGetOptionalParams extends coreClient.OperationOptions { +export interface ScriptExecutionsGetOptionalParams extends OperationOptions { } // @public -export type ScriptExecutionsGetResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsList { - nextLink?: string; - value: ScriptExecution[]; +export interface ScriptExecutionsListOptionalParams extends OperationOptions { } // @public -export interface ScriptExecutionsListNextOptionalParams extends coreClient.OperationOptions { +export interface ScriptExecutionsOperations { + createOrUpdate: (resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, scriptExecution: ScriptExecution, options?: ScriptExecutionsCreateOrUpdateOptionalParams) => PollerLike, ScriptExecution>; + delete: (resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsGetOptionalParams) => Promise; + getExecutionLogs: (resourceGroupName: string, privateCloudName: string, scriptExecutionName: string, options?: ScriptExecutionsGetExecutionLogsOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: ScriptExecutionsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export type ScriptExecutionsListNextResponse = ScriptExecutionsList; +export type ScriptOutputStreamType = string; // @public -export interface ScriptExecutionsListOptionalParams extends coreClient.OperationOptions { +export interface ScriptPackage extends ProxyResource { + properties?: ScriptPackageProperties; } // @public -export type ScriptExecutionsListResponse = ScriptExecutionsList; - -// @public -export type ScriptOutputStreamType = string; - -// @public -export interface ScriptPackage extends ProxyResource { +export interface ScriptPackageProperties { readonly company?: string; readonly description?: string; readonly provisioningState?: ScriptPackageProvisioningState; @@ -1949,38 +1502,19 @@ export interface ScriptPackage extends ProxyResource { export type ScriptPackageProvisioningState = string; // @public -export interface ScriptPackages { - get(resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: ScriptPackagesGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: ScriptPackagesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ScriptPackagesGetOptionalParams extends coreClient.OperationOptions { +export interface ScriptPackagesGetOptionalParams extends OperationOptions { } // @public -export type ScriptPackagesGetResponse = ScriptPackage; - -// @public -export interface ScriptPackagesList { - nextLink?: string; - value: ScriptPackage[]; +export interface ScriptPackagesListOptionalParams extends OperationOptions { } // @public -export interface ScriptPackagesListNextOptionalParams extends coreClient.OperationOptions { +export interface ScriptPackagesOperations { + get: (resourceGroupName: string, privateCloudName: string, scriptPackageName: string, options?: ScriptPackagesGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: ScriptPackagesListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type ScriptPackagesListNextResponse = ScriptPackagesList; - -// @public -export interface ScriptPackagesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptPackagesListResponse = ScriptPackagesList; - // @public export interface ScriptParameter { readonly description?: string; @@ -2023,6 +1557,9 @@ export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; // @public export type SslEnum = string; +// @public +export type SystemAssignedServiceIdentityType = string; + // @public export interface SystemData { createdAt?: Date; @@ -2036,9 +1573,7 @@ export interface SystemData { // @public export interface TrackedResource extends Resource { location: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public @@ -2052,6 +1587,11 @@ export type TrialStatus = string; // @public export interface VirtualMachine extends ProxyResource { + properties?: VirtualMachineProperties; +} + +// @public +export interface VirtualMachineProperties { readonly displayName?: string; readonly folderPath?: string; readonly moRefId?: string; @@ -2071,55 +1611,25 @@ export interface VirtualMachineRestrictMovement { export type VirtualMachineRestrictMovementState = string; // @public -export interface VirtualMachines { - beginRestrictMovement(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, restrictMovement: VirtualMachineRestrictMovement, options?: VirtualMachinesRestrictMovementOptionalParams): Promise, VirtualMachinesRestrictMovementResponse>>; - beginRestrictMovementAndWait(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, restrictMovement: VirtualMachineRestrictMovement, options?: VirtualMachinesRestrictMovementOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: VirtualMachinesGetOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: VirtualMachinesListOptionalParams): PagedAsyncIterableIterator; +export interface VirtualMachinesGetOptionalParams extends OperationOptions { } // @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesListOptionalParams extends OperationOptions { } // @public -export type VirtualMachinesGetResponse = VirtualMachine; - -// @public -export interface VirtualMachinesList { - nextLink?: string; - value: VirtualMachine[]; +export interface VirtualMachinesOperations { + get: (resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, options?: VirtualMachinesGetOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, clusterName: string, options?: VirtualMachinesListOptionalParams) => PagedAsyncIterableIterator; + restrictMovement: (resourceGroupName: string, privateCloudName: string, clusterName: string, virtualMachineId: string, restrictMovementParameter: VirtualMachineRestrictMovement, options?: VirtualMachinesRestrictMovementOptionalParams) => PollerLike, void>; } // @public -export interface VirtualMachinesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachinesListNextResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachinesListResponse = VirtualMachinesList; - -// @public -export interface VirtualMachinesRestrictMovementHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface VirtualMachinesRestrictMovementOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesRestrictMovementOptionalParams extends OperationOptions { updateIntervalInMs?: number; } -// @public -export type VirtualMachinesRestrictMovementResponse = VirtualMachinesRestrictMovementHeaders; - // @public export type VisibilityParameterEnum = string; @@ -2148,7 +1658,7 @@ export type VMTypeEnum = string; // @public export interface WorkloadNetwork extends ProxyResource { - readonly provisioningState?: WorkloadNetworkProvisioningState; + properties?: WorkloadNetworkProperties; } // @public @@ -2158,21 +1668,15 @@ export interface WorkloadNetworkDhcp extends ProxyResource { // @public export interface WorkloadNetworkDhcpEntity { - dhcpType: "RELAY" | "SERVER"; + dhcpType: DhcpTypeEnum; displayName?: string; readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; revision?: number; readonly segments?: string[]; } -// @public (undocumented) -export type WorkloadNetworkDhcpEntityUnion = WorkloadNetworkDhcpEntity | WorkloadNetworkDhcpRelay | WorkloadNetworkDhcpServer; - // @public -export interface WorkloadNetworkDhcpList { - nextLink?: string; - value: WorkloadNetworkDhcp[]; -} +export type WorkloadNetworkDhcpEntityUnion = WorkloadNetworkDhcpServer | WorkloadNetworkDhcpRelay | WorkloadNetworkDhcpEntity; // @public export type WorkloadNetworkDhcpProvisioningState = string; @@ -2192,6 +1696,11 @@ export interface WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { // @public export interface WorkloadNetworkDnsService extends ProxyResource { + properties?: WorkloadNetworkDnsServiceProperties; +} + +// @public +export interface WorkloadNetworkDnsServiceProperties { defaultDnsZone?: string; displayName?: string; dnsServiceIp?: string; @@ -2206,13 +1715,12 @@ export interface WorkloadNetworkDnsService extends ProxyResource { export type WorkloadNetworkDnsServiceProvisioningState = string; // @public -export interface WorkloadNetworkDnsServicesList { - nextLink?: string; - value: WorkloadNetworkDnsService[]; +export interface WorkloadNetworkDnsZone extends ProxyResource { + properties?: WorkloadNetworkDnsZoneProperties; } // @public -export interface WorkloadNetworkDnsZone extends ProxyResource { +export interface WorkloadNetworkDnsZoneProperties { displayName?: string; dnsServerIps?: string[]; dnsServices?: number; @@ -2226,32 +1734,24 @@ export interface WorkloadNetworkDnsZone extends ProxyResource { export type WorkloadNetworkDnsZoneProvisioningState = string; // @public -export interface WorkloadNetworkDnsZonesList { - nextLink?: string; - value: WorkloadNetworkDnsZone[]; +export interface WorkloadNetworkGateway extends ProxyResource { + properties?: WorkloadNetworkGatewayProperties; } // @public -export interface WorkloadNetworkGateway extends ProxyResource { +export interface WorkloadNetworkGatewayProperties { displayName?: string; readonly path?: string; readonly provisioningState?: WorkloadNetworkProvisioningState; } // @public -export interface WorkloadNetworkGatewayList { - nextLink?: string; - value: WorkloadNetworkGateway[]; -} - -// @public -export interface WorkloadNetworkList { - nextLink?: string; - value: WorkloadNetwork[]; +export interface WorkloadNetworkPortMirroring extends ProxyResource { + properties?: WorkloadNetworkPortMirroringProperties; } // @public -export interface WorkloadNetworkPortMirroring extends ProxyResource { +export interface WorkloadNetworkPortMirroringProperties { destination?: string; direction?: PortMirroringDirectionEnum; displayName?: string; @@ -2262,19 +1762,23 @@ export interface WorkloadNetworkPortMirroring extends ProxyResource { } // @public -export interface WorkloadNetworkPortMirroringList { - nextLink?: string; - value: WorkloadNetworkPortMirroring[]; -} +export type WorkloadNetworkPortMirroringProvisioningState = string; // @public -export type WorkloadNetworkPortMirroringProvisioningState = string; +export interface WorkloadNetworkProperties { + readonly provisioningState?: WorkloadNetworkProvisioningState; +} // @public export type WorkloadNetworkProvisioningState = string; // @public export interface WorkloadNetworkPublicIP extends ProxyResource { + properties?: WorkloadNetworkPublicIPProperties; +} + +// @public +export interface WorkloadNetworkPublicIPProperties { displayName?: string; numberOfPublicIPs?: number; readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; @@ -2285,259 +1789,87 @@ export interface WorkloadNetworkPublicIP extends ProxyResource { export type WorkloadNetworkPublicIPProvisioningState = string; // @public -export interface WorkloadNetworkPublicIPsList { - nextLink?: string; - value: WorkloadNetworkPublicIP[]; -} - -// @public -export interface WorkloadNetworks { - beginCreateDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksCreateDhcpOptionalParams): Promise, WorkloadNetworksCreateDhcpResponse>>; - beginCreateDhcpAndWait(resourceGroupName: string, privateCloudName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksCreateDhcpOptionalParams): Promise; - beginCreateDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksCreateDnsServiceOptionalParams): Promise, WorkloadNetworksCreateDnsServiceResponse>>; - beginCreateDnsServiceAndWait(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksCreateDnsServiceOptionalParams): Promise; - beginCreateDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksCreateDnsZoneOptionalParams): Promise, WorkloadNetworksCreateDnsZoneResponse>>; - beginCreateDnsZoneAndWait(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksCreateDnsZoneOptionalParams): Promise; - beginCreatePortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksCreatePortMirroringOptionalParams): Promise, WorkloadNetworksCreatePortMirroringResponse>>; - beginCreatePortMirroringAndWait(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksCreatePortMirroringOptionalParams): Promise; - beginCreatePublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, workloadNetworkPublicIP: WorkloadNetworkPublicIP, options?: WorkloadNetworksCreatePublicIPOptionalParams): Promise, WorkloadNetworksCreatePublicIPResponse>>; - beginCreatePublicIPAndWait(resourceGroupName: string, privateCloudName: string, publicIPId: string, workloadNetworkPublicIP: WorkloadNetworkPublicIP, options?: WorkloadNetworksCreatePublicIPOptionalParams): Promise; - beginCreateSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksCreateSegmentsOptionalParams): Promise, WorkloadNetworksCreateSegmentsResponse>>; - beginCreateSegmentsAndWait(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksCreateSegmentsOptionalParams): Promise; - beginCreateVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksCreateVMGroupOptionalParams): Promise, WorkloadNetworksCreateVMGroupResponse>>; - beginCreateVMGroupAndWait(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksCreateVMGroupOptionalParams): Promise; - beginDeleteDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: WorkloadNetworksDeleteDhcpOptionalParams): Promise, void>>; - beginDeleteDhcpAndWait(resourceGroupName: string, privateCloudName: string, dhcpId: string, options?: WorkloadNetworksDeleteDhcpOptionalParams): Promise; - beginDeleteDnsService(resourceGroupName: string, dnsServiceId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsServiceOptionalParams): Promise, void>>; - beginDeleteDnsServiceAndWait(resourceGroupName: string, dnsServiceId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsServiceOptionalParams): Promise; - beginDeleteDnsZone(resourceGroupName: string, dnsZoneId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsZoneOptionalParams): Promise, void>>; - beginDeleteDnsZoneAndWait(resourceGroupName: string, dnsZoneId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsZoneOptionalParams): Promise; - beginDeletePortMirroring(resourceGroupName: string, portMirroringId: string, privateCloudName: string, options?: WorkloadNetworksDeletePortMirroringOptionalParams): Promise, void>>; - beginDeletePortMirroringAndWait(resourceGroupName: string, portMirroringId: string, privateCloudName: string, options?: WorkloadNetworksDeletePortMirroringOptionalParams): Promise; - beginDeletePublicIP(resourceGroupName: string, publicIPId: string, privateCloudName: string, options?: WorkloadNetworksDeletePublicIPOptionalParams): Promise, void>>; - beginDeletePublicIPAndWait(resourceGroupName: string, publicIPId: string, privateCloudName: string, options?: WorkloadNetworksDeletePublicIPOptionalParams): Promise; - beginDeleteSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: WorkloadNetworksDeleteSegmentOptionalParams): Promise, void>>; - beginDeleteSegmentAndWait(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: WorkloadNetworksDeleteSegmentOptionalParams): Promise; - beginDeleteVMGroup(resourceGroupName: string, vmGroupId: string, privateCloudName: string, options?: WorkloadNetworksDeleteVMGroupOptionalParams): Promise, void>>; - beginDeleteVMGroupAndWait(resourceGroupName: string, vmGroupId: string, privateCloudName: string, options?: WorkloadNetworksDeleteVMGroupOptionalParams): Promise; - beginUpdateDhcp(resourceGroupName: string, privateCloudName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksUpdateDhcpOptionalParams): Promise, WorkloadNetworksUpdateDhcpResponse>>; - beginUpdateDhcpAndWait(resourceGroupName: string, privateCloudName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksUpdateDhcpOptionalParams): Promise; - beginUpdateDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksUpdateDnsServiceOptionalParams): Promise, WorkloadNetworksUpdateDnsServiceResponse>>; - beginUpdateDnsServiceAndWait(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksUpdateDnsServiceOptionalParams): Promise; - beginUpdateDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksUpdateDnsZoneOptionalParams): Promise, WorkloadNetworksUpdateDnsZoneResponse>>; - beginUpdateDnsZoneAndWait(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksUpdateDnsZoneOptionalParams): Promise; - beginUpdatePortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksUpdatePortMirroringOptionalParams): Promise, WorkloadNetworksUpdatePortMirroringResponse>>; - beginUpdatePortMirroringAndWait(resourceGroupName: string, privateCloudName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksUpdatePortMirroringOptionalParams): Promise; - beginUpdateSegments(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksUpdateSegmentsOptionalParams): Promise, WorkloadNetworksUpdateSegmentsResponse>>; - beginUpdateSegmentsAndWait(resourceGroupName: string, privateCloudName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksUpdateSegmentsOptionalParams): Promise; - beginUpdateVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksUpdateVMGroupOptionalParams): Promise, WorkloadNetworksUpdateVMGroupResponse>>; - beginUpdateVMGroupAndWait(resourceGroupName: string, privateCloudName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksUpdateVMGroupOptionalParams): Promise; - get(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksGetOptionalParams): Promise; - getDhcp(resourceGroupName: string, dhcpId: string, privateCloudName: string, options?: WorkloadNetworksGetDhcpOptionalParams): Promise; - getDnsService(resourceGroupName: string, privateCloudName: string, dnsServiceId: string, options?: WorkloadNetworksGetDnsServiceOptionalParams): Promise; - getDnsZone(resourceGroupName: string, privateCloudName: string, dnsZoneId: string, options?: WorkloadNetworksGetDnsZoneOptionalParams): Promise; - getGateway(resourceGroupName: string, privateCloudName: string, gatewayId: string, options?: WorkloadNetworksGetGatewayOptionalParams): Promise; - getPortMirroring(resourceGroupName: string, privateCloudName: string, portMirroringId: string, options?: WorkloadNetworksGetPortMirroringOptionalParams): Promise; - getPublicIP(resourceGroupName: string, privateCloudName: string, publicIPId: string, options?: WorkloadNetworksGetPublicIPOptionalParams): Promise; - getSegment(resourceGroupName: string, privateCloudName: string, segmentId: string, options?: WorkloadNetworksGetSegmentOptionalParams): Promise; - getVirtualMachine(resourceGroupName: string, privateCloudName: string, virtualMachineId: string, options?: WorkloadNetworksGetVirtualMachineOptionalParams): Promise; - getVMGroup(resourceGroupName: string, privateCloudName: string, vmGroupId: string, options?: WorkloadNetworksGetVMGroupOptionalParams): Promise; - list(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListOptionalParams): PagedAsyncIterableIterator; - listDhcp(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListDhcpOptionalParams): PagedAsyncIterableIterator; - listDnsServices(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListDnsServicesOptionalParams): PagedAsyncIterableIterator; - listDnsZones(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListDnsZonesOptionalParams): PagedAsyncIterableIterator; - listGateways(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListGatewaysOptionalParams): PagedAsyncIterableIterator; - listPortMirroring(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListPortMirroringOptionalParams): PagedAsyncIterableIterator; - listPublicIPs(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListPublicIPsOptionalParams): PagedAsyncIterableIterator; - listSegments(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListSegmentsOptionalParams): PagedAsyncIterableIterator; - listVirtualMachines(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListVirtualMachinesOptionalParams): PagedAsyncIterableIterator; - listVMGroups(resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListVMGroupsOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface WorkloadNetworksCreateDhcpHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateDhcpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreateDhcpOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreateDhcpResponse = WorkloadNetworkDhcp; - -// @public -export interface WorkloadNetworksCreateDnsServiceHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreateDnsServiceOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreateDnsServiceResponse = WorkloadNetworkDnsService; - -// @public -export interface WorkloadNetworksCreateDnsZoneHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreateDnsZoneOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreateDnsZoneResponse = WorkloadNetworkDnsZone; - -// @public -export interface WorkloadNetworksCreatePortMirroringHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreatePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreatePortMirroringOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreatePortMirroringResponse = WorkloadNetworkPortMirroring; - -// @public -export interface WorkloadNetworksCreatePublicIPHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreatePublicIPOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreatePublicIPOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreatePublicIPResponse = WorkloadNetworkPublicIP; - -// @public -export interface WorkloadNetworksCreateSegmentsHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateSegmentsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreateSegmentOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreateSegmentsResponse = WorkloadNetworkSegment; - -// @public -export interface WorkloadNetworksCreateVMGroupHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksCreateVMGroupOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksCreateVMGroupResponse = WorkloadNetworkVMGroup; - -// @public -export interface WorkloadNetworksDeleteDhcpHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDhcpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeleteDhcpOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeleteDnsServiceHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeleteDnsServiceOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeleteDnsZoneHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeleteDnsZoneOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeletePortMirroringHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeletePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeletePortMirroringOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeletePublicIPHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeletePublicIPOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeletePublicIPOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeleteSegmentHeaders { - location?: string; - retryAfter?: number; +export interface WorkloadNetworksDeleteSegmentOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeleteSegmentOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksDeleteVMGroupOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface WorkloadNetworksDeleteVMGroupHeaders { - location?: string; - retryAfter?: number; +export interface WorkloadNetworkSegment extends ProxyResource { + properties?: WorkloadNetworkSegmentProperties; } // @public -export interface WorkloadNetworksDeleteVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface WorkloadNetworkSegmentPortVif { + portName?: string; } // @public -export interface WorkloadNetworkSegment extends ProxyResource { +export interface WorkloadNetworkSegmentProperties { connectedGateway?: string; displayName?: string; readonly portVif?: WorkloadNetworkSegmentPortVif[]; @@ -2547,20 +1879,9 @@ export interface WorkloadNetworkSegment extends ProxyResource { subnet?: WorkloadNetworkSegmentSubnet; } -// @public -export interface WorkloadNetworkSegmentPortVif { - portName?: string; -} - // @public export type WorkloadNetworkSegmentProvisioningState = string; -// @public -export interface WorkloadNetworkSegmentsList { - nextLink?: string; - value: WorkloadNetworkSegment[]; -} - // @public export interface WorkloadNetworkSegmentSubnet { dhcpRanges?: string[]; @@ -2568,320 +1889,178 @@ export interface WorkloadNetworkSegmentSubnet { } // @public -export interface WorkloadNetworksGetDhcpOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetDhcpResponse = WorkloadNetworkDhcp; - -// @public -export interface WorkloadNetworksGetDnsServiceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetDnsServiceResponse = WorkloadNetworkDnsService; - -// @public -export interface WorkloadNetworksGetDnsZoneOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetDnsZoneResponse = WorkloadNetworkDnsZone; - -// @public -export interface WorkloadNetworksGetGatewayOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetGatewayResponse = WorkloadNetworkGateway; - -// @public -export interface WorkloadNetworksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface WorkloadNetworksGetPortMirroringOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetDhcpOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksGetPortMirroringResponse = WorkloadNetworkPortMirroring; - -// @public -export interface WorkloadNetworksGetPublicIPOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetPublicIPResponse = WorkloadNetworkPublicIP; - -// @public -export type WorkloadNetworksGetResponse = WorkloadNetwork; - -// @public -export interface WorkloadNetworksGetSegmentOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetSegmentResponse = WorkloadNetworkSegment; - -// @public -export interface WorkloadNetworksGetVirtualMachineOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetVirtualMachineResponse = WorkloadNetworkVirtualMachine; - -// @public -export interface WorkloadNetworksGetVMGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksGetVMGroupResponse = WorkloadNetworkVMGroup; - -// @public -export interface WorkloadNetworksListDhcpNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListDhcpNextResponse = WorkloadNetworkDhcpList; - -// @public -export interface WorkloadNetworksListDhcpOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetDnsServiceOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListDhcpResponse = WorkloadNetworkDhcpList; - -// @public -export interface WorkloadNetworksListDnsServicesNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetDnsZoneOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListDnsServicesNextResponse = WorkloadNetworkDnsServicesList; - -// @public -export interface WorkloadNetworksListDnsServicesOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetGatewayOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListDnsServicesResponse = WorkloadNetworkDnsServicesList; - -// @public -export interface WorkloadNetworksListDnsZonesNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListDnsZonesNextResponse = WorkloadNetworkDnsZonesList; - -// @public -export interface WorkloadNetworksListDnsZonesOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetPortMirroringOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListDnsZonesResponse = WorkloadNetworkDnsZonesList; - -// @public -export interface WorkloadNetworksListGatewaysNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetPublicIPOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListGatewaysNextResponse = WorkloadNetworkGatewayList; - -// @public -export interface WorkloadNetworksListGatewaysOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetSegmentOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListGatewaysResponse = WorkloadNetworkGatewayList; - -// @public -export interface WorkloadNetworksListNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetVirtualMachineOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListNextResponse = WorkloadNetworkList; - -// @public -export interface WorkloadNetworksListOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksGetVMGroupOptionalParams extends OperationOptions { } // @public -export interface WorkloadNetworksListPortMirroringNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListDhcpOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListPortMirroringNextResponse = WorkloadNetworkPortMirroringList; - -// @public -export interface WorkloadNetworksListPortMirroringOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListDnsServicesOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListPortMirroringResponse = WorkloadNetworkPortMirroringList; - -// @public -export interface WorkloadNetworksListPublicIPsNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListDnsZonesOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListPublicIPsNextResponse = WorkloadNetworkPublicIPsList; - -// @public -export interface WorkloadNetworksListPublicIPsOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListGatewaysOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListPublicIPsResponse = WorkloadNetworkPublicIPsList; - -// @public -export type WorkloadNetworksListResponse = WorkloadNetworkList; - -// @public -export interface WorkloadNetworksListSegmentsNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListSegmentsNextResponse = WorkloadNetworkSegmentsList; - -// @public -export interface WorkloadNetworksListSegmentsOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListPortMirroringOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListSegmentsResponse = WorkloadNetworkSegmentsList; - -// @public -export interface WorkloadNetworksListVirtualMachinesNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListPublicIPsOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListVirtualMachinesNextResponse = WorkloadNetworkVirtualMachinesList; - -// @public -export interface WorkloadNetworksListVirtualMachinesOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListSegmentsOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListVirtualMachinesResponse = WorkloadNetworkVirtualMachinesList; - -// @public -export interface WorkloadNetworksListVMGroupsNextOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListVirtualMachinesOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListVMGroupsNextResponse = WorkloadNetworkVMGroupsList; - -// @public -export interface WorkloadNetworksListVMGroupsOptionalParams extends coreClient.OperationOptions { +export interface WorkloadNetworksListVMGroupsOptionalParams extends OperationOptions { } // @public -export type WorkloadNetworksListVMGroupsResponse = WorkloadNetworkVMGroupsList; - -// @public -export interface WorkloadNetworksUpdateDhcpHeaders { - location?: string; - retryAfter?: number; +export interface WorkloadNetworksOperations { + createDhcp: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksCreateDhcpOptionalParams) => PollerLike, WorkloadNetworkDhcp>; + createDnsService: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksCreateDnsServiceOptionalParams) => PollerLike, WorkloadNetworkDnsService>; + createDnsZone: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksCreateDnsZoneOptionalParams) => PollerLike, WorkloadNetworkDnsZone>; + createPortMirroring: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksCreatePortMirroringOptionalParams) => PollerLike, WorkloadNetworkPortMirroring>; + createPublicIP: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, publicIPId: string, workloadNetworkPublicIP: WorkloadNetworkPublicIP, options?: WorkloadNetworksCreatePublicIPOptionalParams) => PollerLike, WorkloadNetworkPublicIP>; + createSegment: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksCreateSegmentOptionalParams) => PollerLike, WorkloadNetworkSegment>; + createVMGroup: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksCreateVMGroupOptionalParams) => PollerLike, WorkloadNetworkVMGroup>; + deleteDhcp: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dhcpId: string, options?: WorkloadNetworksDeleteDhcpOptionalParams) => PollerLike, void>; + deleteDnsService: (resourceGroupName: string, dnsServiceId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsServiceOptionalParams) => PollerLike, void>; + deleteDnsZone: (resourceGroupName: string, dnsZoneId: string, privateCloudName: string, options?: WorkloadNetworksDeleteDnsZoneOptionalParams) => PollerLike, void>; + deletePortMirroring: (resourceGroupName: string, portMirroringId: string, privateCloudName: string, options?: WorkloadNetworksDeletePortMirroringOptionalParams) => PollerLike, void>; + deletePublicIP: (resourceGroupName: string, publicIPId: string, privateCloudName: string, options?: WorkloadNetworksDeletePublicIPOptionalParams) => PollerLike, void>; + deleteSegment: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, segmentId: string, options?: WorkloadNetworksDeleteSegmentOptionalParams) => PollerLike, void>; + deleteVMGroup: (resourceGroupName: string, vmGroupId: string, privateCloudName: string, options?: WorkloadNetworksDeleteVMGroupOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksGetOptionalParams) => Promise; + getDhcp: (resourceGroupName: string, dhcpId: string, privateCloudName: string, options?: WorkloadNetworksGetDhcpOptionalParams) => Promise; + getDnsService: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsServiceId: string, options?: WorkloadNetworksGetDnsServiceOptionalParams) => Promise; + getDnsZone: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsZoneId: string, options?: WorkloadNetworksGetDnsZoneOptionalParams) => Promise; + getGateway: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, gatewayId: string, options?: WorkloadNetworksGetGatewayOptionalParams) => Promise; + getPortMirroring: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, portMirroringId: string, options?: WorkloadNetworksGetPortMirroringOptionalParams) => Promise; + getPublicIP: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, publicIPId: string, options?: WorkloadNetworksGetPublicIPOptionalParams) => Promise; + getSegment: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, segmentId: string, options?: WorkloadNetworksGetSegmentOptionalParams) => Promise; + getVirtualMachine: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, virtualMachineId: string, options?: WorkloadNetworksGetVirtualMachineOptionalParams) => Promise; + getVMGroup: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, vmGroupId: string, options?: WorkloadNetworksGetVMGroupOptionalParams) => Promise; + list: (resourceGroupName: string, privateCloudName: string, options?: WorkloadNetworksListOptionalParams) => PagedAsyncIterableIterator; + listDhcp: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListDhcpOptionalParams) => PagedAsyncIterableIterator; + listDnsServices: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListDnsServicesOptionalParams) => PagedAsyncIterableIterator; + listDnsZones: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListDnsZonesOptionalParams) => PagedAsyncIterableIterator; + listGateways: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListGatewaysOptionalParams) => PagedAsyncIterableIterator; + listPortMirroring: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListPortMirroringOptionalParams) => PagedAsyncIterableIterator; + listPublicIPs: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListPublicIPsOptionalParams) => PagedAsyncIterableIterator; + listSegments: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListSegmentsOptionalParams) => PagedAsyncIterableIterator; + listVirtualMachines: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListVirtualMachinesOptionalParams) => PagedAsyncIterableIterator; + listVMGroups: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, options?: WorkloadNetworksListVMGroupsOptionalParams) => PagedAsyncIterableIterator; + updateDhcp: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dhcpId: string, workloadNetworkDhcp: WorkloadNetworkDhcp, options?: WorkloadNetworksUpdateDhcpOptionalParams) => PollerLike, WorkloadNetworkDhcp>; + updateDnsService: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsServiceId: string, workloadNetworkDnsService: WorkloadNetworkDnsService, options?: WorkloadNetworksUpdateDnsServiceOptionalParams) => PollerLike, WorkloadNetworkDnsService>; + updateDnsZone: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, dnsZoneId: string, workloadNetworkDnsZone: WorkloadNetworkDnsZone, options?: WorkloadNetworksUpdateDnsZoneOptionalParams) => PollerLike, WorkloadNetworkDnsZone>; + updatePortMirroring: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, portMirroringId: string, workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, options?: WorkloadNetworksUpdatePortMirroringOptionalParams) => PollerLike, WorkloadNetworkPortMirroring>; + updateSegment: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, segmentId: string, workloadNetworkSegment: WorkloadNetworkSegment, options?: WorkloadNetworksUpdateSegmentOptionalParams) => PollerLike, WorkloadNetworkSegment>; + updateVMGroup: (resourceGroupName: string, privateCloudName: string, workloadNetworkName: string, vmGroupId: string, workloadNetworkVMGroup: WorkloadNetworkVMGroup, options?: WorkloadNetworksUpdateVMGroupOptionalParams) => PollerLike, WorkloadNetworkVMGroup>; } // @public -export interface WorkloadNetworksUpdateDhcpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdateDhcpOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdateDhcpResponse = WorkloadNetworkDhcp; - -// @public -export interface WorkloadNetworksUpdateDnsServiceHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdateDnsServiceOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdateDnsServiceResponse = WorkloadNetworkDnsService; - -// @public -export interface WorkloadNetworksUpdateDnsZoneHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdateDnsZoneOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdateDnsZoneResponse = WorkloadNetworkDnsZone; - -// @public -export interface WorkloadNetworksUpdatePortMirroringHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdatePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdatePortMirroringOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdatePortMirroringResponse = WorkloadNetworkPortMirroring; - -// @public -export interface WorkloadNetworksUpdateSegmentsHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateSegmentsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdateSegmentOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdateSegmentsResponse = WorkloadNetworkSegment; - -// @public -export interface WorkloadNetworksUpdateVMGroupHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface WorkloadNetworksUpdateVMGroupOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkloadNetworksUpdateVMGroupResponse = WorkloadNetworkVMGroup; +export interface WorkloadNetworkVirtualMachine extends ProxyResource { + properties?: WorkloadNetworkVirtualMachineProperties; +} // @public -export interface WorkloadNetworkVirtualMachine extends ProxyResource { +export interface WorkloadNetworkVirtualMachineProperties { displayName?: string; readonly provisioningState?: WorkloadNetworkProvisioningState; readonly vmType?: VMTypeEnum; } // @public -export interface WorkloadNetworkVirtualMachinesList { - nextLink?: string; - value: WorkloadNetworkVirtualMachine[]; +export interface WorkloadNetworkVMGroup extends ProxyResource { + properties?: WorkloadNetworkVMGroupProperties; } // @public -export interface WorkloadNetworkVMGroup extends ProxyResource { +export interface WorkloadNetworkVMGroupProperties { displayName?: string; members?: string[]; readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; @@ -2892,12 +2071,6 @@ export interface WorkloadNetworkVMGroup extends ProxyResource { // @public export type WorkloadNetworkVMGroupProvisioningState = string; -// @public -export interface WorkloadNetworkVMGroupsList { - nextLink?: string; - value: WorkloadNetworkVMGroup[]; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/avs/arm-avs/sample.env b/sdk/avs/arm-avs/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/avs/arm-avs/sample.env +++ b/sdk/avs/arm-avs/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/avs/arm-avs/samples-dev/addonsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/addonsCreateOrUpdateSample.ts deleted file mode 100644 index 2e69da4d4d9f..000000000000 --- a/sdk/avs/arm-avs/samples-dev/addonsCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Addon, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json - */ -async function addonsCreateOrUpdateArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const addon: Addon = { - properties: { - addonType: "Arc", - vCenter: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json - */ -async function addonsCreateOrUpdateHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const addon: Addon = { - properties: { - addonType: "HCX", - offer: "VMware MaaS Cloud Provider (Enterprise)", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json - */ -async function addonsCreateOrUpdateSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const addon: Addon = { - properties: { - addonType: "SRM", - licenseKey: "41915178-A8FF-4A4D-B683-6D735AF5E3F5", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json - */ -async function addonsCreateOrUpdateVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const addon: Addon = { properties: { addonType: "VR", vrsCount: 1 } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -async function main() { - addonsCreateOrUpdateArcReg(); - addonsCreateOrUpdateHcx(); - addonsCreateOrUpdateSrm(); - addonsCreateOrUpdateVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/addonsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/addonsDeleteSample.ts deleted file mode 100644 index a918c59e56db..000000000000 --- a/sdk/avs/arm-avs/samples-dev/addonsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Addon - * - * @summary Delete a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json - */ -async function addonsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -async function main() { - addonsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts b/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts deleted file mode 100644 index 2d7c331c1296..000000000000 --- a/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts +++ /dev/null @@ -1,116 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json - */ -async function addonsGetArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json - */ -async function addonsGetHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json - */ -async function addonsGetSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json - */ -async function addonsGetVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -async function main() { - addonsGetArcReg(); - addonsGetHcx(); - addonsGetSrm(); - addonsGetVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/addonsListSample.ts b/sdk/avs/arm-avs/samples-dev/addonsListSample.ts deleted file mode 100644 index bbb92b11b6cc..000000000000 --- a/sdk/avs/arm-avs/samples-dev/addonsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Addon resources by PrivateCloud - * - * @summary List Addon resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json - */ -async function addonsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.addons.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - addonsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts deleted file mode 100644 index c9830fd6bee3..000000000000 --- a/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ExpressRouteAuthorization, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a ExpressRouteAuthorization - * - * @summary Create a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json - */ -async function authorizationsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const authorization: ExpressRouteAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - authorization, - ); - console.log(result); -} - -async function main() { - authorizationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts deleted file mode 100644 index 53948819a084..000000000000 --- a/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a ExpressRouteAuthorization - * - * @summary Delete a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json - */ -async function authorizationsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts deleted file mode 100644 index 7bc9ad8ad7e8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ExpressRouteAuthorization - * - * @summary Get a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json - */ -async function authorizationsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.get( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts deleted file mode 100644 index a06d1752ea0b..000000000000 --- a/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ExpressRouteAuthorization resources by PrivateCloud - * - * @summary List ExpressRouteAuthorization resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json - */ -async function authorizationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizations.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - authorizationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts deleted file mode 100644 index 8aa26537c80a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudLink, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a CloudLink - * - * @summary Create a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json - */ -async function cloudLinksCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const cloudLink: CloudLink = { - linkedCloud: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - cloudLink, - ); - console.log(result); -} - -async function main() { - cloudLinksCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts deleted file mode 100644 index 0364aa7f9315..000000000000 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a CloudLink - * - * @summary Delete a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json - */ -async function cloudLinksDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - ); - console.log(result); -} - -async function main() { - cloudLinksDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts deleted file mode 100644 index a1d1d30d872d..000000000000 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a CloudLink - * - * @summary Get a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json - */ -async function cloudLinksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.get( - resourceGroupName, - privateCloudName, - cloudLinkName, - ); - console.log(result); -} - -async function main() { - cloudLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts deleted file mode 100644 index f7170cf0fc26..000000000000 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List CloudLink resources by PrivateCloud - * - * @summary List CloudLink resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json - */ -async function cloudLinksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudLinks.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - cloudLinksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts deleted file mode 100644 index ab0efec93552..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Cluster, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Cluster - * - * @summary Create a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json - */ -async function clustersCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const cluster: Cluster = { clusterSize: 3, sku: { name: "AV20" } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - cluster, - ); - console.log(result); -} - -async function main() { - clustersCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts deleted file mode 100644 index 1662ed323aae..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Cluster - * - * @summary Delete a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json - */ -async function clustersDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts b/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts deleted file mode 100644 index fe8a81736afa..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Cluster - * - * @summary Get a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json - */ -async function clustersGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.get( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersListSample.ts b/sdk/avs/arm-avs/samples-dev/clustersListSample.ts deleted file mode 100644 index 2748f95a10e4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Cluster resources by PrivateCloud - * - * @summary List Cluster resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json - */ -async function clustersList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clustersList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts b/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts deleted file mode 100644 index b9ee0b2bc0e7..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json - */ -async function clustersListZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json - */ -async function clustersListZonesStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersListZones(); - clustersListZonesStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts deleted file mode 100644 index 954c859d0496..000000000000 --- a/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ClusterUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a Cluster - * - * @summary Update a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json - */ -async function clustersUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const clusterUpdate: ClusterUpdate = { clusterSize: 4 }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - clusterUpdate, - ); - console.log(result); -} - -async function main() { - clustersUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts deleted file mode 100644 index cde4d34c0438..000000000000 --- a/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Datastore, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Datastore - * - * @summary Create a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json - */ -async function datastoresCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const datastore: Datastore = { - netAppVolume: { - id: "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - datastore, - ); - console.log(result); -} - -async function main() { - datastoresCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts deleted file mode 100644 index 484031fb0977..000000000000 --- a/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Datastore - * - * @summary Delete a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json - */ -async function datastoresDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts deleted file mode 100644 index 6e0b8b433ac8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Datastore - * - * @summary Get a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json - */ -async function datastoresGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.get( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts deleted file mode 100644 index fbdeb76d7a61..000000000000 --- a/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Datastore resources by Cluster - * - * @summary List Datastore resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json - */ -async function datastoresList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.datastores.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - datastoresList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 743d223fa17b..000000000000 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { GlobalReachConnection, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a GlobalReachConnection - * - * @summary Create a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json - */ -async function globalReachConnectionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const globalReachConnection: GlobalReachConnection = { - authorizationKey: "01010101-0101-0101-0101-010101010101", - peerExpressRouteCircuit: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - globalReachConnection, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts deleted file mode 100644 index 3615ec251e9a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a GlobalReachConnection - * - * @summary Delete a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json - */ -async function globalReachConnectionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts deleted file mode 100644 index cd0c749e2c5d..000000000000 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a GlobalReachConnection - * - * @summary Get a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json - */ -async function globalReachConnectionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.get( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts deleted file mode 100644 index c1ae83cd5970..000000000000 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List GlobalReachConnection resources by PrivateCloud - * - * @summary List GlobalReachConnection resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json - */ -async function globalReachConnectionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.globalReachConnections.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - globalReachConnectionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts deleted file mode 100644 index 33b40ba742fa..000000000000 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HcxEnterpriseSite, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a HcxEnterpriseSite - * - * @summary Create a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json - */ -async function hcxEnterpriseSitesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const hcxEnterpriseSite: HcxEnterpriseSite = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.createOrUpdate( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - hcxEnterpriseSite, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts deleted file mode 100644 index 7c811da35595..000000000000 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a HcxEnterpriseSite - * - * @summary Delete a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json - */ -async function hcxEnterpriseSitesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.delete( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts deleted file mode 100644 index 4efe65414717..000000000000 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a HcxEnterpriseSite - * - * @summary Get a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json - */ -async function hcxEnterpriseSitesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.get( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts deleted file mode 100644 index b034393caee3..000000000000 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List HcxEnterpriseSite resources by PrivateCloud - * - * @summary List HcxEnterpriseSite resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json - */ -async function hcxEnterpriseSitesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hcxEnterpriseSites.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hcxEnterpriseSitesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts deleted file mode 100644 index 307f6798b804..000000000000 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { IscsiPath, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a IscsiPath - * - * @summary Create a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json - */ -async function iscsiPathsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const resource: IscsiPath = { networkBlock: "192.168.0.0/24" }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - resource, - ); - console.log(result); -} - -async function main() { - iscsiPathsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts deleted file mode 100644 index a2e60d4bd9f6..000000000000 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a IscsiPath - * - * @summary Delete a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json - */ -async function iscsiPathsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - iscsiPathsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts deleted file mode 100644 index df7e8cd56203..000000000000 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a IscsiPath - * - * @summary Get a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json - */ -async function iscsiPathsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - iscsiPathsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts deleted file mode 100644 index a92c540200a9..000000000000 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List IscsiPath resources by PrivateCloud - * - * @summary List IscsiPath resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json - */ -async function iscsiPathsListByPrivateCloud() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.iscsiPaths.listByPrivateCloud( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - iscsiPathsListByPrivateCloud(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts b/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts deleted file mode 100644 index 144591ba227f..000000000000 --- a/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return quota for subscription by region - * - * @summary Return quota for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json - */ -async function locationsCheckQuotaAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkQuotaAvailability(location); - console.log(result); -} - -async function main() { - locationsCheckQuotaAvailability(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts b/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts deleted file mode 100644 index 2ae660306879..000000000000 --- a/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Sku, - LocationsCheckTrialAvailabilityOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json - */ -async function locationsCheckTrialAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability(location); - console.log(result); -} - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailabilityWithSku.json - */ -async function locationsCheckTrialAvailabilityWithSku() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const sku: Sku = { name: "avs52t" }; - const options: LocationsCheckTrialAvailabilityOptionalParams = { sku }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability( - location, - options, - ); - console.log(result); -} - -async function main() { - locationsCheckTrialAvailability(); - locationsCheckTrialAvailabilityWithSku(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/operationsListSample.ts b/sdk/avs/arm-avs/samples-dev/operationsListSample.ts deleted file mode 100644 index 87a8a49055bd..000000000000 --- a/sdk/avs/arm-avs/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json - */ -async function operationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b037596809c9..000000000000 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlacementPolicy, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a PlacementPolicy - * - * @summary Create a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json - */ -async function placementPoliciesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicy: PlacementPolicy = { - properties: { - type: "VmHost", - affinityStrength: "Must", - affinityType: "AntiAffinity", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicy, - ); - console.log(result); -} - -async function main() { - placementPoliciesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts deleted file mode 100644 index 1aa96b4eca1c..000000000000 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a PlacementPolicy - * - * @summary Delete a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json - */ -async function placementPoliciesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts deleted file mode 100644 index 7630777c1837..000000000000 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a PlacementPolicy - * - * @summary Get a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json - */ -async function placementPoliciesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.get( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts deleted file mode 100644 index 4801a7470ba5..000000000000 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PlacementPolicy resources by Cluster - * - * @summary List PlacementPolicy resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json - */ -async function placementPoliciesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.placementPolicies.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - placementPoliciesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts deleted file mode 100644 index b6f16ef14f63..000000000000 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlacementPolicyUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a PlacementPolicy - * - * @summary Update a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json - */ -async function placementPoliciesUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicyUpdate: PlacementPolicyUpdate = { - affinityStrength: "Must", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - state: "Disabled", - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicyUpdate, - ); - console.log(result); -} - -async function main() { - placementPoliciesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts deleted file mode 100644 index d1be41ce029e..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateCloud, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json - */ -async function privateCloudsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud: PrivateCloud = { - identity: { type: "SystemAssigned" }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json - */ -async function privateCloudsCreateOrUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud: PrivateCloud = { - availability: { secondaryZone: 2, strategy: "DualZone", zone: 1 }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -async function main() { - privateCloudsCreateOrUpdate(); - privateCloudsCreateOrUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts deleted file mode 100644 index 2ee2fe082201..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a PrivateCloud - * - * @summary Delete a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json - */ -async function privateCloudsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts deleted file mode 100644 index d4f4d784e0a7..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json - */ -async function privateCloudsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json - */ -async function privateCloudsGetStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsGet(); - privateCloudsGetStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts deleted file mode 100644 index e5b77fa10c2b..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the admin credentials for the private cloud - * - * @summary List the admin credentials for the private cloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials.json - */ -async function privateCloudsListAdminCredentials() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.listAdminCredentials( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsListAdminCredentials(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts deleted file mode 100644 index 7b28945edcd8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json - */ -async function privateCloudsListInSubscription() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription_Stretched.json - */ -async function privateCloudsListInSubscriptionStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsListInSubscription(); - privateCloudsListInSubscriptionStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts deleted file mode 100644 index 3d90a48925fa..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json - */ -async function privateCloudsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json - */ -async function privateCloudsListStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsList(); - privateCloudsListStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts deleted file mode 100644 index d38d74e61ac8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Rotate the NSX-T Manager password - * - * @summary Rotate the NSX-T Manager password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword.json - */ -async function privateCloudsRotateNsxtPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateNsxtPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateNsxtPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts deleted file mode 100644 index d57f39e89e23..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Rotate the vCenter password - * - * @summary Rotate the vCenter password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateVcenterPassword.json - */ -async function privateCloudsRotateVcenterPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateVcenterPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateVcenterPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts deleted file mode 100644 index ea579663305c..000000000000 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts +++ /dev/null @@ -1,81 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateCloudUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json - */ -async function privateCloudsUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate: PrivateCloudUpdate = { - encryption: { - keyVaultProperties: { - keyName: "keyname1", - keyVaultUrl: "https://keyvault1-kmip-kvault.vault.azure.net/", - keyVersion: "ver1.0", - }, - status: "Enabled", - }, - identity: { type: "None" }, - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched.json - */ -async function privateCloudsUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate: PrivateCloudUpdate = { - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -async function main() { - privateCloudsUpdate(); - privateCloudsUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts deleted file mode 100644 index 4ba80dd752ea..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptCmdlet - * - * @summary Get a ScriptCmdlet - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json - */ -async function scriptCmdletsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const scriptCmdletName = "New-ExternalSsoDomain"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptCmdlets.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - ); - console.log(result); -} - -async function main() { - scriptCmdletsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts deleted file mode 100644 index af20e74967a8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptCmdlet resources by ScriptPackage - * - * @summary List ScriptCmdlet resources by ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json - */ -async function scriptCmdletsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptCmdlets.list( - resourceGroupName, - privateCloudName, - scriptPackageName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptCmdletsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts deleted file mode 100644 index 7119b63b053a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScriptExecution, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a ScriptExecution - * - * @summary Create a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json - */ -async function scriptExecutionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptExecution: ScriptExecution = { - hiddenParameters: [ - { - name: "Password", - type: "SecureValue", - secureValue: "PlaceholderPassword", - }, - ], - parameters: [ - { name: "DomainName", type: "Value", value: "placeholderDomain.local" }, - { - name: "BaseUserDN", - type: "Value", - value: "DC=placeholder, DC=placeholder", - }, - ], - retention: "P0Y0M60DT0H60M60S", - scriptCmdletId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource", - timeout: "P0Y0M0DT0H60M60S", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - scriptExecution, - ); - console.log(result); -} - -async function main() { - scriptExecutionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts deleted file mode 100644 index 6471eeeb5756..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a ScriptExecution - * - * @summary Delete a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json - */ -async function scriptExecutionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts deleted file mode 100644 index 5706d2eabebb..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ScriptOutputStreamType, - ScriptExecutionsGetExecutionLogsOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return the logs for a script execution resource - * - * @summary Return the logs for a script execution resource - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json - */ -async function scriptExecutionsGetExecutionLogs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptOutputStreamType: ScriptOutputStreamType[] = [ - "Information", - "Warnings", - "Errors", - "Output", - ]; - const options: ScriptExecutionsGetExecutionLogsOptionalParams = { - scriptOutputStreamType, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.getExecutionLogs( - resourceGroupName, - privateCloudName, - scriptExecutionName, - options, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGetExecutionLogs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts deleted file mode 100644 index d352f654bab4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptExecution - * - * @summary Get a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json - */ -async function scriptExecutionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.get( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts deleted file mode 100644 index 3a89710388ad..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptExecution resources by PrivateCloud - * - * @summary List ScriptExecution resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json - */ -async function scriptExecutionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptExecutions.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptExecutionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts deleted file mode 100644 index ee730017f5b2..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptPackage - * - * @summary Get a ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json - */ -async function scriptPackagesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "Microsoft.AVS.Management@3.0.48"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptPackages.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - ); - console.log(result); -} - -async function main() { - scriptPackagesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts deleted file mode 100644 index 070066ab5574..000000000000 --- a/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptPackage resources by PrivateCloud - * - * @summary List ScriptPackage resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json - */ -async function scriptPackagesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptPackages.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptPackagesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts deleted file mode 100644 index bee127ec27f3..000000000000 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a VirtualMachine - * - * @summary Get a VirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json - */ -async function virtualMachinesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - virtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts deleted file mode 100644 index f30647ca8736..000000000000 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List VirtualMachine resources by Cluster - * - * @summary List VirtualMachine resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json - */ -async function virtualMachinesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachinesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts deleted file mode 100644 index 81874d580749..000000000000 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineRestrictMovement, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable or disable DRS-driven VM movement restriction - * - * @summary Enable or disable DRS-driven VM movement restriction - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement.json - */ -async function virtualMachinesRestrictMovement() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const restrictMovement: VirtualMachineRestrictMovement = { - restrictMovement: "Enabled", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginRestrictMovementAndWait( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - ); - console.log(result); -} - -async function main() { - virtualMachinesRestrictMovement(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDhcpSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDhcpSample.ts deleted file mode 100644 index f5e78cba30af..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDhcpSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDhcp - * - * @summary Create a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json - */ -async function workloadNetworksCreateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp: WorkloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - displayName: "dhcpConfigurations1", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsServiceSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsServiceSample.ts deleted file mode 100644 index 90f6eee69857..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsServiceSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsService - * - * @summary Create a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService.json - */ -async function workloadNetworksCreateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService: WorkloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsZoneSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsZoneSample.ts deleted file mode 100644 index e0aabd12d8f4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsZoneSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsZone - * - * @summary Create a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone.json - */ -async function workloadNetworksCreateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone: WorkloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePortMirroringSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePortMirroringSample.ts deleted file mode 100644 index 6c0f7f26c2ea..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePortMirroringSample.ts +++ /dev/null @@ -1,55 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPortMirroring - * - * @summary Create a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePortMirroring.json - */ -async function workloadNetworksCreatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring: WorkloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - displayName: "portMirroring1", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePublicIPSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePublicIPSample.ts deleted file mode 100644 index 831d65e6f264..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePublicIPSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPublicIP, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPublicIP - * - * @summary Create a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP.json - */ -async function workloadNetworksCreatePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const workloadNetworkPublicIP: WorkloadNetworkPublicIP = { - displayName: "publicIP1", - numberOfPublicIPs: 32, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePublicIPAndWait( - resourceGroupName, - privateCloudName, - publicIPId, - workloadNetworkPublicIP, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateSegmentsSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateSegmentsSample.ts deleted file mode 100644 index 5b437b057181..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateSegmentsSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkSegment - * - * @summary Create a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json - */ -async function workloadNetworksCreateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment: WorkloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - displayName: "segment1", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateVMGroupSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateVMGroupSample.ts deleted file mode 100644 index c6f543798dc5..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateVMGroupSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkVMGroup - * - * @summary Create a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup.json - */ -async function workloadNetworksCreateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup: WorkloadNetworkVMGroup = { - displayName: "vmGroup1", - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDhcpSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDhcpSample.ts deleted file mode 100644 index 88bd3730dd66..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDhcpSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDhcp - * - * @summary Delete a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json - */ -async function workloadNetworksDeleteDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsServiceSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsServiceSample.ts deleted file mode 100644 index 33eb3448f360..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsServiceSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsService - * - * @summary Delete a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService.json - */ -async function workloadNetworksDeleteDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsServiceId = "dnsService1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsServiceAndWait( - resourceGroupName, - dnsServiceId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsZoneSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsZoneSample.ts deleted file mode 100644 index b092101ce3b6..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsZoneSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsZone - * - * @summary Delete a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone.json - */ -async function workloadNetworksDeleteDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsZoneId = "dnsZone1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsZoneAndWait( - resourceGroupName, - dnsZoneId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePortMirroringSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePortMirroringSample.ts deleted file mode 100644 index e26f9ecbf692..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePortMirroringSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPortMirroring - * - * @summary Delete a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePortMirroring.json - */ -async function workloadNetworksDeletePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const portMirroringId = "portMirroring1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePortMirroringAndWait( - resourceGroupName, - portMirroringId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePublicIPSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePublicIPSample.ts deleted file mode 100644 index 0ab8b562b428..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePublicIPSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPublicIP - * - * @summary Delete a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP.json - */ -async function workloadNetworksDeletePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const publicIPId = "publicIP1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePublicIPAndWait( - resourceGroupName, - publicIPId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteSegmentSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteSegmentSample.ts deleted file mode 100644 index d20186d214b8..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteSegmentSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkSegment - * - * @summary Delete a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json - */ -async function workloadNetworksDeleteSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteSegmentAndWait( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteVMGroupSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteVMGroupSample.ts deleted file mode 100644 index 5073f4a03d82..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteVMGroupSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkVMGroup - * - * @summary Delete a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup.json - */ -async function workloadNetworksDeleteVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const vmGroupId = "vmGroup1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteVMGroupAndWait( - resourceGroupName, - vmGroupId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDhcpSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDhcpSample.ts deleted file mode 100644 index 23d52348e012..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDhcpSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDhcp - * - * @summary Get a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json - */ -async function workloadNetworksGetDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dhcpId = "dhcp1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDhcp( - resourceGroupName, - dhcpId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsServiceSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsServiceSample.ts deleted file mode 100644 index 7d54c1db2cab..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsServiceSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsService - * - * @summary Get a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService.json - */ -async function workloadNetworksGetDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsService( - resourceGroupName, - privateCloudName, - dnsServiceId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsZoneSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsZoneSample.ts deleted file mode 100644 index 578c8031b1a9..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsZoneSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsZone - * - * @summary Get a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json - */ -async function workloadNetworksGetDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsZone( - resourceGroupName, - privateCloudName, - dnsZoneId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetGatewaySample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetGatewaySample.ts deleted file mode 100644 index a1aaf3b17f1c..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetGatewaySample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkGateway - * - * @summary Get a WorkloadNetworkGateway - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json - */ -async function workloadNetworksGetGateway() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const gatewayId = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getGateway( - resourceGroupName, - privateCloudName, - gatewayId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPortMirroringSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPortMirroringSample.ts deleted file mode 100644 index c1d64d2caede..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPortMirroringSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPortMirroring - * - * @summary Get a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring.json - */ -async function workloadNetworksGetPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPortMirroring( - resourceGroupName, - privateCloudName, - portMirroringId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPublicIPSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPublicIPSample.ts deleted file mode 100644 index 3485a027a27f..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPublicIPSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPublicIP - * - * @summary Get a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json - */ -async function workloadNetworksGetPublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPublicIP( - resourceGroupName, - privateCloudName, - publicIPId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSample.ts deleted file mode 100644 index d10f427e6c9b..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetwork - * - * @summary Get a WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json - */ -async function workloadNetworksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSegmentSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSegmentSample.ts deleted file mode 100644 index e77abf4733a2..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSegmentSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkSegment - * - * @summary Get a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json - */ -async function workloadNetworksGetSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getSegment( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVMGroupSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVMGroupSample.ts deleted file mode 100644 index 8d9e3a23806c..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVMGroupSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVMGroup - * - * @summary Get a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json - */ -async function workloadNetworksGetVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVMGroup( - resourceGroupName, - privateCloudName, - vmGroupId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVirtualMachineSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVirtualMachineSample.ts deleted file mode 100644 index a223402fe2d6..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVirtualMachineSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVirtualMachine - * - * @summary Get a WorkloadNetworkVirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json - */ -async function workloadNetworksGetVirtualMachine() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const virtualMachineId = "vm1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVirtualMachine( - resourceGroupName, - privateCloudName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDhcpSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListDhcpSample.ts deleted file mode 100644 index a78823d022af..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDhcpSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDhcp resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDhcp resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json - */ -async function workloadNetworksListDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDhcp( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsServicesSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsServicesSample.ts deleted file mode 100644 index 6f1895661570..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsServicesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsService resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsService resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices.json - */ -async function workloadNetworksListDnsServices() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsServices( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsServices(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsZonesSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsZonesSample.ts deleted file mode 100644 index e2f5d35a0675..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsZonesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsZone resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsZone resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json - */ -async function workloadNetworksListDnsZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsZones( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsZones(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListGatewaysSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListGatewaysSample.ts deleted file mode 100644 index acec4e800629..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListGatewaysSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkGateway resources by WorkloadNetwork - * - * @summary List WorkloadNetworkGateway resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json - */ -async function workloadNetworksListGateways() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listGateways( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListGateways(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPortMirroringSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListPortMirroringSample.ts deleted file mode 100644 index 7353acadf9e2..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPortMirroringSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring.json - */ -async function workloadNetworksListPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPortMirroring( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPublicIPsSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListPublicIPsSample.ts deleted file mode 100644 index 8cffff6c1c98..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPublicIPsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPublicIP resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPublicIP resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs.json - */ -async function workloadNetworksListPublicIPs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPublicIPs( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPublicIPs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListSample.ts deleted file mode 100644 index 37870a16fe55..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetwork resources by PrivateCloud - * - * @summary List WorkloadNetwork resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json - */ -async function workloadNetworksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSegmentsSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListSegmentsSample.ts deleted file mode 100644 index 825475c385fd..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSegmentsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkSegment resources by WorkloadNetwork - * - * @summary List WorkloadNetworkSegment resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json - */ -async function workloadNetworksListSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listSegments( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVMGroupsSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListVMGroupsSample.ts deleted file mode 100644 index 9de1ba946e25..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVMGroupsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVMGroup resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVMGroup resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json - */ -async function workloadNetworksListVMGroups() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVMGroups( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVMGroups(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVirtualMachinesSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksListVirtualMachinesSample.ts deleted file mode 100644 index 77de1085e666..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVirtualMachinesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json - */ -async function workloadNetworksListVirtualMachines() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVirtualMachines( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVirtualMachines(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDhcpSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDhcpSample.ts deleted file mode 100644 index 3ae89440ad11..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDhcpSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDhcp - * - * @summary Update a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json - */ -async function workloadNetworksUpdateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp: WorkloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsServiceSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsServiceSample.ts deleted file mode 100644 index 8ea067878e73..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsServiceSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsService - * - * @summary Update a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService.json - */ -async function workloadNetworksUpdateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService: WorkloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsZoneSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsZoneSample.ts deleted file mode 100644 index 38c1059ed03f..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsZoneSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsZone - * - * @summary Update a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone.json - */ -async function workloadNetworksUpdateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone: WorkloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdatePortMirroringSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdatePortMirroringSample.ts deleted file mode 100644 index 3d437baa3fbc..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdatePortMirroringSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkPortMirroring - * - * @summary Update a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdatePortMirroring.json - */ -async function workloadNetworksUpdatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring: WorkloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateSegmentsSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateSegmentsSample.ts deleted file mode 100644 index 01b132432003..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateSegmentsSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkSegment - * - * @summary Update a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json - */ -async function workloadNetworksUpdateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment: WorkloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateVMGroupSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateVMGroupSample.ts deleted file mode 100644 index ddc3f9234a3b..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateVMGroupSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkVMGroup - * - * @summary Update a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup.json - */ -async function workloadNetworksUpdateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup: WorkloadNetworkVMGroup = { - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/README.md b/sdk/avs/arm-avs/samples/v6/javascript/README.md deleted file mode 100644 index c6841670390f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/README.md +++ /dev/null @@ -1,254 +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** | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [addonsCreateOrUpdateSample.js][addonscreateorupdatesample] | Create a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json | -| [addonsDeleteSample.js][addonsdeletesample] | Delete a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json | -| [addonsGetSample.js][addonsgetsample] | Get a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json | -| [addonsListSample.js][addonslistsample] | List Addon resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json | -| [authorizationsCreateOrUpdateSample.js][authorizationscreateorupdatesample] | Create a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json | -| [authorizationsDeleteSample.js][authorizationsdeletesample] | Delete a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json | -| [authorizationsGetSample.js][authorizationsgetsample] | Get a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json | -| [authorizationsListSample.js][authorizationslistsample] | List ExpressRouteAuthorization resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json | -| [cloudLinksCreateOrUpdateSample.js][cloudlinkscreateorupdatesample] | Create a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json | -| [cloudLinksDeleteSample.js][cloudlinksdeletesample] | Delete a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json | -| [cloudLinksGetSample.js][cloudlinksgetsample] | Get a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json | -| [cloudLinksListSample.js][cloudlinkslistsample] | List CloudLink resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json | -| [clustersCreateOrUpdateSample.js][clusterscreateorupdatesample] | Create a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json | -| [clustersDeleteSample.js][clustersdeletesample] | Delete a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json | -| [clustersGetSample.js][clustersgetsample] | Get a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json | -| [clustersListSample.js][clusterslistsample] | List Cluster resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json | -| [clustersListZonesSample.js][clusterslistzonessample] | List hosts by zone in a cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json | -| [clustersUpdateSample.js][clustersupdatesample] | Update a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json | -| [datastoresCreateOrUpdateSample.js][datastorescreateorupdatesample] | Create a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json | -| [datastoresDeleteSample.js][datastoresdeletesample] | Delete a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json | -| [datastoresGetSample.js][datastoresgetsample] | Get a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json | -| [datastoresListSample.js][datastoreslistsample] | List Datastore resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json | -| [globalReachConnectionsCreateOrUpdateSample.js][globalreachconnectionscreateorupdatesample] | Create a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json | -| [globalReachConnectionsDeleteSample.js][globalreachconnectionsdeletesample] | Delete a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json | -| [globalReachConnectionsGetSample.js][globalreachconnectionsgetsample] | Get a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json | -| [globalReachConnectionsListSample.js][globalreachconnectionslistsample] | List GlobalReachConnection resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json | -| [hcxEnterpriseSitesCreateOrUpdateSample.js][hcxenterprisesitescreateorupdatesample] | Create a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json | -| [hcxEnterpriseSitesDeleteSample.js][hcxenterprisesitesdeletesample] | Delete a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json | -| [hcxEnterpriseSitesGetSample.js][hcxenterprisesitesgetsample] | Get a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json | -| [hcxEnterpriseSitesListSample.js][hcxenterprisesiteslistsample] | List HcxEnterpriseSite resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json | -| [iscsiPathsCreateOrUpdateSample.js][iscsipathscreateorupdatesample] | Create a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json | -| [iscsiPathsDeleteSample.js][iscsipathsdeletesample] | Delete a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json | -| [iscsiPathsGetSample.js][iscsipathsgetsample] | Get a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json | -| [iscsiPathsListByPrivateCloudSample.js][iscsipathslistbyprivatecloudsample] | List IscsiPath resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json | -| [locationsCheckQuotaAvailabilitySample.js][locationscheckquotaavailabilitysample] | Return quota for subscription by region x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json | -| [locationsCheckTrialAvailabilitySample.js][locationschecktrialavailabilitysample] | Return trial status for subscription by region x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json | -| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json | -| [placementPoliciesCreateOrUpdateSample.js][placementpoliciescreateorupdatesample] | Create a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json | -| [placementPoliciesDeleteSample.js][placementpoliciesdeletesample] | Delete a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json | -| [placementPoliciesGetSample.js][placementpoliciesgetsample] | Get a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json | -| [placementPoliciesListSample.js][placementpolicieslistsample] | List PlacementPolicy resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json | -| [placementPoliciesUpdateSample.js][placementpoliciesupdatesample] | Update a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json | -| [privateCloudsCreateOrUpdateSample.js][privatecloudscreateorupdatesample] | Create a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json | -| [privateCloudsDeleteSample.js][privatecloudsdeletesample] | Delete a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json | -| [privateCloudsGetSample.js][privatecloudsgetsample] | Get a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json | -| [privateCloudsListAdminCredentialsSample.js][privatecloudslistadmincredentialssample] | List the admin credentials for the private cloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials.json | -| [privateCloudsListInSubscriptionSample.js][privatecloudslistinsubscriptionsample] | List PrivateCloud resources by subscription ID x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json | -| [privateCloudsListSample.js][privatecloudslistsample] | List PrivateCloud resources by resource group x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json | -| [privateCloudsRotateNsxtPasswordSample.js][privatecloudsrotatensxtpasswordsample] | Rotate the NSX-T Manager password x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword.json | -| [privateCloudsRotateVcenterPasswordSample.js][privatecloudsrotatevcenterpasswordsample] | Rotate the vCenter password x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateVcenterPassword.json | -| [privateCloudsUpdateSample.js][privatecloudsupdatesample] | Update a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json | -| [scriptCmdletsGetSample.js][scriptcmdletsgetsample] | Get a ScriptCmdlet x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json | -| [scriptCmdletsListSample.js][scriptcmdletslistsample] | List ScriptCmdlet resources by ScriptPackage x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json | -| [scriptExecutionsCreateOrUpdateSample.js][scriptexecutionscreateorupdatesample] | Create a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json | -| [scriptExecutionsDeleteSample.js][scriptexecutionsdeletesample] | Delete a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json | -| [scriptExecutionsGetExecutionLogsSample.js][scriptexecutionsgetexecutionlogssample] | Return the logs for a script execution resource x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json | -| [scriptExecutionsGetSample.js][scriptexecutionsgetsample] | Get a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json | -| [scriptExecutionsListSample.js][scriptexecutionslistsample] | List ScriptExecution resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json | -| [scriptPackagesGetSample.js][scriptpackagesgetsample] | Get a ScriptPackage x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json | -| [scriptPackagesListSample.js][scriptpackageslistsample] | List ScriptPackage resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json | -| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Get a VirtualMachine x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json | -| [virtualMachinesListSample.js][virtualmachineslistsample] | List VirtualMachine resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json | -| [virtualMachinesRestrictMovementSample.js][virtualmachinesrestrictmovementsample] | Enable or disable DRS-driven VM movement restriction x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement.json | -| [workloadNetworksCreateDhcpSample.js][workloadnetworkscreatedhcpsample] | Create a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json | -| [workloadNetworksCreateDnsServiceSample.js][workloadnetworkscreatednsservicesample] | Create a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService.json | -| [workloadNetworksCreateDnsZoneSample.js][workloadnetworkscreatednszonesample] | Create a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone.json | -| [workloadNetworksCreatePortMirroringSample.js][workloadnetworkscreateportmirroringsample] | Create a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePortMirroring.json | -| [workloadNetworksCreatePublicIPSample.js][workloadnetworkscreatepublicipsample] | Create a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP.json | -| [workloadNetworksCreateSegmentsSample.js][workloadnetworkscreatesegmentssample] | Create a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json | -| [workloadNetworksCreateVMGroupSample.js][workloadnetworkscreatevmgroupsample] | Create a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup.json | -| [workloadNetworksDeleteDhcpSample.js][workloadnetworksdeletedhcpsample] | Delete a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json | -| [workloadNetworksDeleteDnsServiceSample.js][workloadnetworksdeletednsservicesample] | Delete a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService.json | -| [workloadNetworksDeleteDnsZoneSample.js][workloadnetworksdeletednszonesample] | Delete a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone.json | -| [workloadNetworksDeletePortMirroringSample.js][workloadnetworksdeleteportmirroringsample] | Delete a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePortMirroring.json | -| [workloadNetworksDeletePublicIPSample.js][workloadnetworksdeletepublicipsample] | Delete a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP.json | -| [workloadNetworksDeleteSegmentSample.js][workloadnetworksdeletesegmentsample] | Delete a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json | -| [workloadNetworksDeleteVMGroupSample.js][workloadnetworksdeletevmgroupsample] | Delete a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup.json | -| [workloadNetworksGetDhcpSample.js][workloadnetworksgetdhcpsample] | Get a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json | -| [workloadNetworksGetDnsServiceSample.js][workloadnetworksgetdnsservicesample] | Get a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService.json | -| [workloadNetworksGetDnsZoneSample.js][workloadnetworksgetdnszonesample] | Get a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json | -| [workloadNetworksGetGatewaySample.js][workloadnetworksgetgatewaysample] | Get a WorkloadNetworkGateway x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json | -| [workloadNetworksGetPortMirroringSample.js][workloadnetworksgetportmirroringsample] | Get a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring.json | -| [workloadNetworksGetPublicIPSample.js][workloadnetworksgetpublicipsample] | Get a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json | -| [workloadNetworksGetSample.js][workloadnetworksgetsample] | Get a WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json | -| [workloadNetworksGetSegmentSample.js][workloadnetworksgetsegmentsample] | Get a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json | -| [workloadNetworksGetVMGroupSample.js][workloadnetworksgetvmgroupsample] | Get a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json | -| [workloadNetworksGetVirtualMachineSample.js][workloadnetworksgetvirtualmachinesample] | Get a WorkloadNetworkVirtualMachine x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json | -| [workloadNetworksListDhcpSample.js][workloadnetworkslistdhcpsample] | List WorkloadNetworkDhcp resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json | -| [workloadNetworksListDnsServicesSample.js][workloadnetworkslistdnsservicessample] | List WorkloadNetworkDnsService resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices.json | -| [workloadNetworksListDnsZonesSample.js][workloadnetworkslistdnszonessample] | List WorkloadNetworkDnsZone resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json | -| [workloadNetworksListGatewaysSample.js][workloadnetworkslistgatewayssample] | List WorkloadNetworkGateway resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json | -| [workloadNetworksListPortMirroringSample.js][workloadnetworkslistportmirroringsample] | List WorkloadNetworkPortMirroring resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring.json | -| [workloadNetworksListPublicIPsSample.js][workloadnetworkslistpublicipssample] | List WorkloadNetworkPublicIP resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs.json | -| [workloadNetworksListSample.js][workloadnetworkslistsample] | List WorkloadNetwork resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json | -| [workloadNetworksListSegmentsSample.js][workloadnetworkslistsegmentssample] | List WorkloadNetworkSegment resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json | -| [workloadNetworksListVMGroupsSample.js][workloadnetworkslistvmgroupssample] | List WorkloadNetworkVMGroup resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json | -| [workloadNetworksListVirtualMachinesSample.js][workloadnetworkslistvirtualmachinessample] | List WorkloadNetworkVirtualMachine resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json | -| [workloadNetworksUpdateDhcpSample.js][workloadnetworksupdatedhcpsample] | Update a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json | -| [workloadNetworksUpdateDnsServiceSample.js][workloadnetworksupdatednsservicesample] | Update a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService.json | -| [workloadNetworksUpdateDnsZoneSample.js][workloadnetworksupdatednszonesample] | Update a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone.json | -| [workloadNetworksUpdatePortMirroringSample.js][workloadnetworksupdateportmirroringsample] | Update a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdatePortMirroring.json | -| [workloadNetworksUpdateSegmentsSample.js][workloadnetworksupdatesegmentssample] | Update a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json | -| [workloadNetworksUpdateVMGroupSample.js][workloadnetworksupdatevmgroupsample] | Update a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup.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 addonsCreateOrUpdateSample.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 -npx dev-tool run vendored cross-env AVS_SUBSCRIPTION_ID="" AVS_RESOURCE_GROUP="" node addonsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[addonscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/addonsCreateOrUpdateSample.js -[addonsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/addonsDeleteSample.js -[addonsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/addonsGetSample.js -[addonslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/addonsListSample.js -[authorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/authorizationsCreateOrUpdateSample.js -[authorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/authorizationsDeleteSample.js -[authorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/authorizationsGetSample.js -[authorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/authorizationsListSample.js -[cloudlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksCreateOrUpdateSample.js -[cloudlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksDeleteSample.js -[cloudlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksGetSample.js -[cloudlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksListSample.js -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersCreateOrUpdateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersDeleteSample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersGetSample.js -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersListSample.js -[clusterslistzonessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersListZonesSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/clustersUpdateSample.js -[datastorescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/datastoresCreateOrUpdateSample.js -[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/datastoresDeleteSample.js -[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/datastoresGetSample.js -[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/datastoresListSample.js -[globalreachconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsCreateOrUpdateSample.js -[globalreachconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsDeleteSample.js -[globalreachconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsGetSample.js -[globalreachconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsListSample.js -[hcxenterprisesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesCreateOrUpdateSample.js -[hcxenterprisesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesDeleteSample.js -[hcxenterprisesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesGetSample.js -[hcxenterprisesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesListSample.js -[iscsipathscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsCreateOrUpdateSample.js -[iscsipathsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsDeleteSample.js -[iscsipathsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsGetSample.js -[iscsipathslistbyprivatecloudsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsListByPrivateCloudSample.js -[locationscheckquotaavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckQuotaAvailabilitySample.js -[locationschecktrialavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckTrialAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/operationsListSample.js -[placementpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesCreateOrUpdateSample.js -[placementpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesDeleteSample.js -[placementpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesGetSample.js -[placementpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesListSample.js -[placementpoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesUpdateSample.js -[privatecloudscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsCreateOrUpdateSample.js -[privatecloudsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsDeleteSample.js -[privatecloudsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsGetSample.js -[privatecloudslistadmincredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListAdminCredentialsSample.js -[privatecloudslistinsubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListInSubscriptionSample.js -[privatecloudslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListSample.js -[privatecloudsrotatensxtpasswordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateNsxtPasswordSample.js -[privatecloudsrotatevcenterpasswordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateVcenterPasswordSample.js -[privatecloudsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsUpdateSample.js -[scriptcmdletsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsGetSample.js -[scriptcmdletslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsListSample.js -[scriptexecutionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsCreateOrUpdateSample.js -[scriptexecutionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsDeleteSample.js -[scriptexecutionsgetexecutionlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetExecutionLogsSample.js -[scriptexecutionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetSample.js -[scriptexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsListSample.js -[scriptpackagesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesGetSample.js -[scriptpackageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesListSample.js -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesGetSample.js -[virtualmachineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesListSample.js -[virtualmachinesrestrictmovementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesRestrictMovementSample.js -[workloadnetworkscreatedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDhcpSample.js -[workloadnetworkscreatednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsServiceSample.js -[workloadnetworkscreatednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsZoneSample.js -[workloadnetworkscreateportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePortMirroringSample.js -[workloadnetworkscreatepublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePublicIPSample.js -[workloadnetworkscreatesegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateSegmentsSample.js -[workloadnetworkscreatevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateVMGroupSample.js -[workloadnetworksdeletedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDhcpSample.js -[workloadnetworksdeletednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsServiceSample.js -[workloadnetworksdeletednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsZoneSample.js -[workloadnetworksdeleteportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePortMirroringSample.js -[workloadnetworksdeletepublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePublicIPSample.js -[workloadnetworksdeletesegmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteSegmentSample.js -[workloadnetworksdeletevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteVMGroupSample.js -[workloadnetworksgetdhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDhcpSample.js -[workloadnetworksgetdnsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsServiceSample.js -[workloadnetworksgetdnszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsZoneSample.js -[workloadnetworksgetgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetGatewaySample.js -[workloadnetworksgetportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPortMirroringSample.js -[workloadnetworksgetpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPublicIPSample.js -[workloadnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSample.js -[workloadnetworksgetsegmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSegmentSample.js -[workloadnetworksgetvmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVMGroupSample.js -[workloadnetworksgetvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVirtualMachineSample.js -[workloadnetworkslistdhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDhcpSample.js -[workloadnetworkslistdnsservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsServicesSample.js -[workloadnetworkslistdnszonessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsZonesSample.js -[workloadnetworkslistgatewayssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListGatewaysSample.js -[workloadnetworkslistportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPortMirroringSample.js -[workloadnetworkslistpublicipssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPublicIPsSample.js -[workloadnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSample.js -[workloadnetworkslistsegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSegmentsSample.js -[workloadnetworkslistvmgroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVMGroupsSample.js -[workloadnetworkslistvirtualmachinessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVirtualMachinesSample.js -[workloadnetworksupdatedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDhcpSample.js -[workloadnetworksupdatednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsServiceSample.js -[workloadnetworksupdatednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsZoneSample.js -[workloadnetworksupdateportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdatePortMirroringSample.js -[workloadnetworksupdatesegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateSegmentsSample.js -[workloadnetworksupdatevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateVMGroupSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-avs -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs/README.md diff --git a/sdk/avs/arm-avs/samples/v6/javascript/addonsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/addonsCreateOrUpdateSample.js deleted file mode 100644 index b5cd9c484db1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/addonsCreateOrUpdateSample.js +++ /dev/null @@ -1,134 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json - */ -async function addonsCreateOrUpdateArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const addon = { - properties: { - addonType: "Arc", - vCenter: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json - */ -async function addonsCreateOrUpdateHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const addon = { - properties: { - addonType: "HCX", - offer: "VMware MaaS Cloud Provider (Enterprise)", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json - */ -async function addonsCreateOrUpdateSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const addon = { - properties: { - addonType: "SRM", - licenseKey: "41915178-A8FF-4A4D-B683-6D735AF5E3F5", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json - */ -async function addonsCreateOrUpdateVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const addon = { properties: { addonType: "VR", vrsCount: 1 } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -async function main() { - addonsCreateOrUpdateArcReg(); - addonsCreateOrUpdateHcx(); - addonsCreateOrUpdateSrm(); - addonsCreateOrUpdateVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/addonsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/addonsDeleteSample.js deleted file mode 100644 index 087f58ed659e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/addonsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Addon - * - * @summary Delete a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json - */ -async function addonsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -async function main() { - addonsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/addonsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/addonsGetSample.js deleted file mode 100644 index b73b4f30d154..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/addonsGetSample.js +++ /dev/null @@ -1,94 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json - */ -async function addonsGetArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json - */ -async function addonsGetHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json - */ -async function addonsGetSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json - */ -async function addonsGetVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); - console.log(result); -} - -async function main() { - addonsGetArcReg(); - addonsGetHcx(); - addonsGetSrm(); - addonsGetVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/addonsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/addonsListSample.js deleted file mode 100644 index 5d82a52d8b0f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/addonsListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List Addon resources by PrivateCloud - * - * @summary List Addon resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json - */ -async function addonsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.addons.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - addonsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/authorizationsCreateOrUpdateSample.js deleted file mode 100644 index 06d5a1cf5bd2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a ExpressRouteAuthorization - * - * @summary Create a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json - */ -async function authorizationsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const authorization = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - authorization, - ); - console.log(result); -} - -async function main() { - authorizationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/authorizationsDeleteSample.js deleted file mode 100644 index 60c04e88af65..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a ExpressRouteAuthorization - * - * @summary Delete a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json - */ -async function authorizationsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/authorizationsGetSample.js deleted file mode 100644 index 6af94a4b1fb6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a ExpressRouteAuthorization - * - * @summary Get a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json - */ -async function authorizationsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.get( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/authorizationsListSample.js deleted file mode 100644 index 8b9e0fcb2194..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/authorizationsListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List ExpressRouteAuthorization resources by PrivateCloud - * - * @summary List ExpressRouteAuthorization resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json - */ -async function authorizationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizations.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - authorizationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksCreateOrUpdateSample.js deleted file mode 100644 index abd7bb7c3f9a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a CloudLink - * - * @summary Create a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json - */ -async function cloudLinksCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const cloudLink = { - linkedCloud: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - cloudLink, - ); - console.log(result); -} - -async function main() { - cloudLinksCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksDeleteSample.js deleted file mode 100644 index 4e2f064c5a99..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a CloudLink - * - * @summary Delete a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json - */ -async function cloudLinksDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - ); - console.log(result); -} - -async function main() { - cloudLinksDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksGetSample.js deleted file mode 100644 index b5e5eefacc8b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksGetSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a CloudLink - * - * @summary Get a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json - */ -async function cloudLinksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.get(resourceGroupName, privateCloudName, cloudLinkName); - console.log(result); -} - -async function main() { - cloudLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksListSample.js deleted file mode 100644 index 85974a3bd3be..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/cloudLinksListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List CloudLink resources by PrivateCloud - * - * @summary List CloudLink resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json - */ -async function cloudLinksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudLinks.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - cloudLinksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersCreateOrUpdateSample.js deleted file mode 100644 index 0788e72a5c6f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a Cluster - * - * @summary Create a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json - */ -async function clustersCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const cluster = { clusterSize: 3, sku: { name: "AV20" } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - cluster, - ); - console.log(result); -} - -async function main() { - clustersCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersDeleteSample.js deleted file mode 100644 index 5ec6cd60c4c2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Cluster - * - * @summary Delete a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json - */ -async function clustersDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersGetSample.js deleted file mode 100644 index 95b4d462afb4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersGetSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Cluster - * - * @summary Get a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json - */ -async function clustersGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, privateCloudName, clusterName); - console.log(result); -} - -async function main() { - clustersGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersListSample.js deleted file mode 100644 index 4488daf64c86..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List Cluster resources by PrivateCloud - * - * @summary List Cluster resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json - */ -async function clustersList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clustersList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersListZonesSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersListZonesSample.js deleted file mode 100644 index 55540ac1c50f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersListZonesSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json - */ -async function clustersListZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones(resourceGroupName, privateCloudName, clusterName); - console.log(result); -} - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json - */ -async function clustersListZonesStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones(resourceGroupName, privateCloudName, clusterName); - console.log(result); -} - -async function main() { - clustersListZones(); - clustersListZonesStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/clustersUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/clustersUpdateSample.js deleted file mode 100644 index 77902099f0b4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/clustersUpdateSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a Cluster - * - * @summary Update a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json - */ -async function clustersUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const clusterUpdate = { clusterSize: 4 }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - clusterUpdate, - ); - console.log(result); -} - -async function main() { - clustersUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/datastoresCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/datastoresCreateOrUpdateSample.js deleted file mode 100644 index c3c1be391d7b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/datastoresCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a Datastore - * - * @summary Create a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json - */ -async function datastoresCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const datastore = { - netAppVolume: { - id: "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - datastore, - ); - console.log(result); -} - -async function main() { - datastoresCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/datastoresDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/datastoresDeleteSample.js deleted file mode 100644 index da4cc1a641ee..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/datastoresDeleteSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Datastore - * - * @summary Delete a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json - */ -async function datastoresDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/datastoresGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/datastoresGetSample.js deleted file mode 100644 index 6f16cb1ae6a1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/datastoresGetSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Datastore - * - * @summary Get a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json - */ -async function datastoresGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.get( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/datastoresListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/datastoresListSample.js deleted file mode 100644 index 5018cda3f96d..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/datastoresListSample.js +++ /dev/null @@ -1,40 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List Datastore resources by Cluster - * - * @summary List Datastore resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json - */ -async function datastoresList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.datastores.list(resourceGroupName, privateCloudName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - datastoresList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 29213753a513..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a GlobalReachConnection - * - * @summary Create a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json - */ -async function globalReachConnectionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const globalReachConnection = { - authorizationKey: "01010101-0101-0101-0101-010101010101", - peerExpressRouteCircuit: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - globalReachConnection, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsDeleteSample.js deleted file mode 100644 index c4c66e317631..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a GlobalReachConnection - * - * @summary Delete a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json - */ -async function globalReachConnectionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsGetSample.js deleted file mode 100644 index 1c9a9ae3c918..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a GlobalReachConnection - * - * @summary Get a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json - */ -async function globalReachConnectionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.get( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsListSample.js deleted file mode 100644 index 288155d6657f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/globalReachConnectionsListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List GlobalReachConnection resources by PrivateCloud - * - * @summary List GlobalReachConnection resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json - */ -async function globalReachConnectionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.globalReachConnections.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - globalReachConnectionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesCreateOrUpdateSample.js deleted file mode 100644 index e2d7c57c94fc..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a HcxEnterpriseSite - * - * @summary Create a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json - */ -async function hcxEnterpriseSitesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const hcxEnterpriseSite = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.createOrUpdate( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - hcxEnterpriseSite, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesDeleteSample.js deleted file mode 100644 index 456d7733fe05..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a HcxEnterpriseSite - * - * @summary Delete a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json - */ -async function hcxEnterpriseSitesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.delete( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesGetSample.js deleted file mode 100644 index 5b46d4e1fceb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a HcxEnterpriseSite - * - * @summary Get a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json - */ -async function hcxEnterpriseSitesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.get( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesListSample.js deleted file mode 100644 index d69cd62ec4f8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/hcxEnterpriseSitesListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List HcxEnterpriseSite resources by PrivateCloud - * - * @summary List HcxEnterpriseSite resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json - */ -async function hcxEnterpriseSitesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hcxEnterpriseSites.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hcxEnterpriseSitesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsCreateOrUpdateSample.js deleted file mode 100644 index e3296b5a3b40..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a IscsiPath - * - * @summary Create a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json - */ -async function iscsiPathsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const resource = { networkBlock: "192.168.0.0/24" }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - resource, - ); - console.log(result); -} - -async function main() { - iscsiPathsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsDeleteSample.js deleted file mode 100644 index 27e57e6334a7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsDeleteSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a IscsiPath - * - * @summary Delete a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json - */ -async function iscsiPathsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginDeleteAndWait(resourceGroupName, privateCloudName); - console.log(result); -} - -async function main() { - iscsiPathsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsGetSample.js deleted file mode 100644 index 67ecbd69790b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsGetSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a IscsiPath - * - * @summary Get a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json - */ -async function iscsiPathsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.get(resourceGroupName, privateCloudName); - console.log(result); -} - -async function main() { - iscsiPathsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsListByPrivateCloudSample.js b/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsListByPrivateCloudSample.js deleted file mode 100644 index d617ed7f0ed2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/iscsiPathsListByPrivateCloudSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List IscsiPath resources by PrivateCloud - * - * @summary List IscsiPath resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json - */ -async function iscsiPathsListByPrivateCloud() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.iscsiPaths.listByPrivateCloud( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - iscsiPathsListByPrivateCloud(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckQuotaAvailabilitySample.js b/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckQuotaAvailabilitySample.js deleted file mode 100644 index 6e19e7f32efb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckQuotaAvailabilitySample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Return quota for subscription by region - * - * @summary Return quota for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json - */ -async function locationsCheckQuotaAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkQuotaAvailability(location); - console.log(result); -} - -async function main() { - locationsCheckQuotaAvailability(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckTrialAvailabilitySample.js b/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckTrialAvailabilitySample.js deleted file mode 100644 index d1f946321285..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/locationsCheckTrialAvailabilitySample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json - */ -async function locationsCheckTrialAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability(location); - console.log(result); -} - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailabilityWithSku.json - */ -async function locationsCheckTrialAvailabilityWithSku() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const sku = { name: "avs52t" }; - const options = { sku }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability(location, options); - console.log(result); -} - -async function main() { - locationsCheckTrialAvailability(); - locationsCheckTrialAvailabilityWithSku(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/operationsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/operationsListSample.js deleted file mode 100644 index 6218f2d9a1c6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json - */ -async function operationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/package.json b/sdk/avs/arm-avs/samples/v6/javascript/package.json deleted file mode 100644 index 3739af216612..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-avs-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/avs/arm-avs" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs", - "dependencies": { - "@azure/arm-avs": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 01fbc915900f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a PlacementPolicy - * - * @summary Create a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json - */ -async function placementPoliciesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicy = { - properties: { - type: "VmHost", - affinityStrength: "Must", - affinityType: "AntiAffinity", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicy, - ); - console.log(result); -} - -async function main() { - placementPoliciesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesDeleteSample.js deleted file mode 100644 index 9860756dc286..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesDeleteSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a PlacementPolicy - * - * @summary Delete a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json - */ -async function placementPoliciesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesGetSample.js deleted file mode 100644 index e277a389c862..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesGetSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a PlacementPolicy - * - * @summary Get a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json - */ -async function placementPoliciesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.get( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesListSample.js deleted file mode 100644 index 2da710a5db63..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesListSample.js +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List PlacementPolicy resources by Cluster - * - * @summary List PlacementPolicy resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json - */ -async function placementPoliciesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.placementPolicies.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - placementPoliciesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesUpdateSample.js deleted file mode 100644 index 853905f637ab..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/placementPoliciesUpdateSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a PlacementPolicy - * - * @summary Update a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json - */ -async function placementPoliciesUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicyUpdate = { - affinityStrength: "Must", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - state: "Disabled", - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicyUpdate, - ); - console.log(result); -} - -async function main() { - placementPoliciesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsCreateOrUpdateSample.js deleted file mode 100644 index ef99dae6d3dd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsCreateOrUpdateSample.js +++ /dev/null @@ -1,78 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json - */ -async function privateCloudsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud = { - identity: { type: "SystemAssigned" }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json - */ -async function privateCloudsCreateOrUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud = { - availability: { secondaryZone: 2, strategy: "DualZone", zone: 1 }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -async function main() { - privateCloudsCreateOrUpdate(); - privateCloudsCreateOrUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsDeleteSample.js deleted file mode 100644 index 29ef797040bc..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsDeleteSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a PrivateCloud - * - * @summary Delete a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json - */ -async function privateCloudsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginDeleteAndWait(resourceGroupName, privateCloudName); - console.log(result); -} - -async function main() { - privateCloudsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsGetSample.js deleted file mode 100644 index 071f874db238..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsGetSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json - */ -async function privateCloudsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get(resourceGroupName, privateCloudName); - console.log(result); -} - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json - */ -async function privateCloudsGetStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get(resourceGroupName, privateCloudName); - console.log(result); -} - -async function main() { - privateCloudsGet(); - privateCloudsGetStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListAdminCredentialsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListAdminCredentialsSample.js deleted file mode 100644 index a37f6a5cfcb4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListAdminCredentialsSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the admin credentials for the private cloud - * - * @summary List the admin credentials for the private cloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials.json - */ -async function privateCloudsListAdminCredentials() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.listAdminCredentials( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsListAdminCredentials(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListInSubscriptionSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListInSubscriptionSample.js deleted file mode 100644 index d4282c051489..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListInSubscriptionSample.js +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json - */ -async function privateCloudsListInSubscription() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription_Stretched.json - */ -async function privateCloudsListInSubscriptionStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsListInSubscription(); - privateCloudsListInSubscriptionStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListSample.js deleted file mode 100644 index d462b1876bbd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsListSample.js +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json - */ -async function privateCloudsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json - */ -async function privateCloudsListStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsList(); - privateCloudsListStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateNsxtPasswordSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateNsxtPasswordSample.js deleted file mode 100644 index 556e20940a37..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateNsxtPasswordSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Rotate the NSX-T Manager password - * - * @summary Rotate the NSX-T Manager password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword.json - */ -async function privateCloudsRotateNsxtPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateNsxtPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateNsxtPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateVcenterPasswordSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateVcenterPasswordSample.js deleted file mode 100644 index 884b45897eda..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsRotateVcenterPasswordSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Rotate the vCenter password - * - * @summary Rotate the vCenter password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateVcenterPassword.json - */ -async function privateCloudsRotateVcenterPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateVcenterPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateVcenterPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsUpdateSample.js deleted file mode 100644 index c1de0eba41b4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/privateCloudsUpdateSample.js +++ /dev/null @@ -1,77 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json - */ -async function privateCloudsUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate = { - encryption: { - keyVaultProperties: { - keyName: "keyname1", - keyVaultUrl: "https://keyvault1-kmip-kvault.vault.azure.net/", - keyVersion: "ver1.0", - }, - status: "Enabled", - }, - identity: { type: "None" }, - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched.json - */ -async function privateCloudsUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate = { - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -async function main() { - privateCloudsUpdate(); - privateCloudsUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/sample.env b/sdk/avs/arm-avs/samples/v6/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsGetSample.js deleted file mode 100644 index 958a8e2e16d3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsGetSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a ScriptCmdlet - * - * @summary Get a ScriptCmdlet - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json - */ -async function scriptCmdletsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const scriptCmdletName = "New-ExternalSsoDomain"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptCmdlets.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - ); - console.log(result); -} - -async function main() { - scriptCmdletsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsListSample.js deleted file mode 100644 index a4367302e52b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptCmdletsListSample.js +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List ScriptCmdlet resources by ScriptPackage - * - * @summary List ScriptCmdlet resources by ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json - */ -async function scriptCmdletsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptCmdlets.list( - resourceGroupName, - privateCloudName, - scriptPackageName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptCmdletsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsCreateOrUpdateSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsCreateOrUpdateSample.js deleted file mode 100644 index e8d12fa1e577..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsCreateOrUpdateSample.js +++ /dev/null @@ -1,63 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a ScriptExecution - * - * @summary Create a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json - */ -async function scriptExecutionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptExecution = { - hiddenParameters: [ - { - name: "Password", - type: "SecureValue", - secureValue: "PlaceholderPassword", - }, - ], - parameters: [ - { name: "DomainName", type: "Value", value: "placeholderDomain.local" }, - { - name: "BaseUserDN", - type: "Value", - value: "DC=placeholder, DC=placeholder", - }, - ], - retention: "P0Y0M60DT0H60M60S", - scriptCmdletId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource", - timeout: "P0Y0M0DT0H60M60S", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - scriptExecution, - ); - console.log(result); -} - -async function main() { - scriptExecutionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsDeleteSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsDeleteSample.js deleted file mode 100644 index 4f9bcaee937a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsDeleteSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a ScriptExecution - * - * @summary Delete a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json - */ -async function scriptExecutionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetExecutionLogsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetExecutionLogsSample.js deleted file mode 100644 index 40d2961cb24e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetExecutionLogsSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Return the logs for a script execution resource - * - * @summary Return the logs for a script execution resource - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json - */ -async function scriptExecutionsGetExecutionLogs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptOutputStreamType = ["Information", "Warnings", "Errors", "Output"]; - const options = { - scriptOutputStreamType, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.getExecutionLogs( - resourceGroupName, - privateCloudName, - scriptExecutionName, - options, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGetExecutionLogs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetSample.js deleted file mode 100644 index 819c95008ccf..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a ScriptExecution - * - * @summary Get a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json - */ -async function scriptExecutionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.get( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsListSample.js deleted file mode 100644 index df69adde1a2e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptExecutionsListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List ScriptExecution resources by PrivateCloud - * - * @summary List ScriptExecution resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json - */ -async function scriptExecutionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptExecutions.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptExecutionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesGetSample.js deleted file mode 100644 index 94b5f37832d5..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesGetSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a ScriptPackage - * - * @summary Get a ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json - */ -async function scriptPackagesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "Microsoft.AVS.Management@3.0.48"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptPackages.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - ); - console.log(result); -} - -async function main() { - scriptPackagesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesListSample.js deleted file mode 100644 index 9bf963dd01c1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/scriptPackagesListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List ScriptPackage resources by PrivateCloud - * - * @summary List ScriptPackage resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json - */ -async function scriptPackagesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptPackages.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptPackagesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesGetSample.js deleted file mode 100644 index c136fbae1dcb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesGetSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a VirtualMachine - * - * @summary Get a VirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json - */ -async function virtualMachinesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - virtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesListSample.js deleted file mode 100644 index b3d22331fb70..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesListSample.js +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List VirtualMachine resources by Cluster - * - * @summary List VirtualMachine resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json - */ -async function virtualMachinesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachinesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesRestrictMovementSample.js b/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesRestrictMovementSample.js deleted file mode 100644 index 6590cd05d1b2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/virtualMachinesRestrictMovementSample.js +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Enable or disable DRS-driven VM movement restriction - * - * @summary Enable or disable DRS-driven VM movement restriction - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement.json - */ -async function virtualMachinesRestrictMovement() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const restrictMovement = { - restrictMovement: "Enabled", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginRestrictMovementAndWait( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - ); - console.log(result); -} - -async function main() { - virtualMachinesRestrictMovement(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDhcpSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDhcpSample.js deleted file mode 100644 index a8aa375b3840..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDhcpSample.js +++ /dev/null @@ -1,51 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDhcp - * - * @summary Create a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json - */ -async function workloadNetworksCreateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - displayName: "dhcpConfigurations1", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsServiceSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsServiceSample.js deleted file mode 100644 index 1876cc82e110..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsServiceSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsService - * - * @summary Create a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService.json - */ -async function workloadNetworksCreateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsZoneSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsZoneSample.js deleted file mode 100644 index bf938c73e1f4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateDnsZoneSample.js +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsZone - * - * @summary Create a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone.json - */ -async function workloadNetworksCreateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePortMirroringSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePortMirroringSample.js deleted file mode 100644 index 466fd677d3e6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePortMirroringSample.js +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPortMirroring - * - * @summary Create a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePortMirroring.json - */ -async function workloadNetworksCreatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - displayName: "portMirroring1", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePublicIPSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePublicIPSample.js deleted file mode 100644 index 0a8c6509ca51..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreatePublicIPSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPublicIP - * - * @summary Create a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP.json - */ -async function workloadNetworksCreatePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const workloadNetworkPublicIP = { - displayName: "publicIP1", - numberOfPublicIPs: 32, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePublicIPAndWait( - resourceGroupName, - privateCloudName, - publicIPId, - workloadNetworkPublicIP, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateSegmentsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateSegmentsSample.js deleted file mode 100644 index d35861b95c03..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateSegmentsSample.js +++ /dev/null @@ -1,51 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkSegment - * - * @summary Create a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json - */ -async function workloadNetworksCreateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - displayName: "segment1", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateVMGroupSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateVMGroupSample.js deleted file mode 100644 index 1d35bb1f31d0..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksCreateVMGroupSample.js +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkVMGroup - * - * @summary Create a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup.json - */ -async function workloadNetworksCreateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup = { - displayName: "vmGroup1", - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDhcpSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDhcpSample.js deleted file mode 100644 index 92138c18f489..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDhcpSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDhcp - * - * @summary Delete a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json - */ -async function workloadNetworksDeleteDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsServiceSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsServiceSample.js deleted file mode 100644 index ec952dc3a8f9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsServiceSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsService - * - * @summary Delete a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService.json - */ -async function workloadNetworksDeleteDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsServiceId = "dnsService1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsServiceAndWait( - resourceGroupName, - dnsServiceId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsZoneSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsZoneSample.js deleted file mode 100644 index 2885362c4d6e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteDnsZoneSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsZone - * - * @summary Delete a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone.json - */ -async function workloadNetworksDeleteDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsZoneId = "dnsZone1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsZoneAndWait( - resourceGroupName, - dnsZoneId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePortMirroringSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePortMirroringSample.js deleted file mode 100644 index b84c18a025e5..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePortMirroringSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPortMirroring - * - * @summary Delete a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePortMirroring.json - */ -async function workloadNetworksDeletePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const portMirroringId = "portMirroring1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePortMirroringAndWait( - resourceGroupName, - portMirroringId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePublicIPSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePublicIPSample.js deleted file mode 100644 index 38cb866369aa..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeletePublicIPSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPublicIP - * - * @summary Delete a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP.json - */ -async function workloadNetworksDeletePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const publicIPId = "publicIP1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePublicIPAndWait( - resourceGroupName, - publicIPId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteSegmentSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteSegmentSample.js deleted file mode 100644 index 8232b11c2edd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteSegmentSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkSegment - * - * @summary Delete a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json - */ -async function workloadNetworksDeleteSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteSegmentAndWait( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteVMGroupSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteVMGroupSample.js deleted file mode 100644 index 4a5651b7a2d3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksDeleteVMGroupSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkVMGroup - * - * @summary Delete a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup.json - */ -async function workloadNetworksDeleteVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const vmGroupId = "vmGroup1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteVMGroupAndWait( - resourceGroupName, - vmGroupId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDhcpSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDhcpSample.js deleted file mode 100644 index 4d8854f695f6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDhcpSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDhcp - * - * @summary Get a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json - */ -async function workloadNetworksGetDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dhcpId = "dhcp1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDhcp(resourceGroupName, dhcpId, privateCloudName); - console.log(result); -} - -async function main() { - workloadNetworksGetDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsServiceSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsServiceSample.js deleted file mode 100644 index 1d57e20affb2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsServiceSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsService - * - * @summary Get a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService.json - */ -async function workloadNetworksGetDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsService( - resourceGroupName, - privateCloudName, - dnsServiceId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsZoneSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsZoneSample.js deleted file mode 100644 index fe37d17219eb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetDnsZoneSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsZone - * - * @summary Get a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json - */ -async function workloadNetworksGetDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsZone( - resourceGroupName, - privateCloudName, - dnsZoneId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetGatewaySample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetGatewaySample.js deleted file mode 100644 index aec805c32d2e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetGatewaySample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkGateway - * - * @summary Get a WorkloadNetworkGateway - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json - */ -async function workloadNetworksGetGateway() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const gatewayId = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getGateway( - resourceGroupName, - privateCloudName, - gatewayId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPortMirroringSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPortMirroringSample.js deleted file mode 100644 index 0ba9b905da51..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPortMirroringSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPortMirroring - * - * @summary Get a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring.json - */ -async function workloadNetworksGetPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPortMirroring( - resourceGroupName, - privateCloudName, - portMirroringId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPublicIPSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPublicIPSample.js deleted file mode 100644 index 787507395597..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetPublicIPSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPublicIP - * - * @summary Get a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json - */ -async function workloadNetworksGetPublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPublicIP( - resourceGroupName, - privateCloudName, - publicIPId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSample.js deleted file mode 100644 index 3fa4c2856748..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetwork - * - * @summary Get a WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json - */ -async function workloadNetworksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.get(resourceGroupName, privateCloudName); - console.log(result); -} - -async function main() { - workloadNetworksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSegmentSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSegmentSample.js deleted file mode 100644 index f9e881551f66..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetSegmentSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkSegment - * - * @summary Get a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json - */ -async function workloadNetworksGetSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getSegment( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVMGroupSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVMGroupSample.js deleted file mode 100644 index dc93afa58461..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVMGroupSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVMGroup - * - * @summary Get a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json - */ -async function workloadNetworksGetVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVMGroup( - resourceGroupName, - privateCloudName, - vmGroupId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVirtualMachineSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVirtualMachineSample.js deleted file mode 100644 index 4d13b87f0e39..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksGetVirtualMachineSample.js +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVirtualMachine - * - * @summary Get a WorkloadNetworkVirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json - */ -async function workloadNetworksGetVirtualMachine() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const virtualMachineId = "vm1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVirtualMachine( - resourceGroupName, - privateCloudName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDhcpSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDhcpSample.js deleted file mode 100644 index c5b435d58f97..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDhcpSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDhcp resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDhcp resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json - */ -async function workloadNetworksListDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDhcp(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsServicesSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsServicesSample.js deleted file mode 100644 index 5faac59a0502..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsServicesSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsService resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsService resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices.json - */ -async function workloadNetworksListDnsServices() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsServices( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsServices(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsZonesSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsZonesSample.js deleted file mode 100644 index 52fc01865548..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListDnsZonesSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsZone resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsZone resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json - */ -async function workloadNetworksListDnsZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsZones( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsZones(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListGatewaysSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListGatewaysSample.js deleted file mode 100644 index 93bac59c87c1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListGatewaysSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkGateway resources by WorkloadNetwork - * - * @summary List WorkloadNetworkGateway resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json - */ -async function workloadNetworksListGateways() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listGateways( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListGateways(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPortMirroringSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPortMirroringSample.js deleted file mode 100644 index c2ea3f734da6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPortMirroringSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring.json - */ -async function workloadNetworksListPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPortMirroring( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPublicIPsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPublicIPsSample.js deleted file mode 100644 index 5182c169df39..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListPublicIPsSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPublicIP resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPublicIP resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs.json - */ -async function workloadNetworksListPublicIPs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPublicIPs( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPublicIPs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSample.js deleted file mode 100644 index 64525b96423d..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetwork resources by PrivateCloud - * - * @summary List WorkloadNetwork resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json - */ -async function workloadNetworksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.list(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSegmentsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSegmentsSample.js deleted file mode 100644 index a27a485e5fd7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListSegmentsSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkSegment resources by WorkloadNetwork - * - * @summary List WorkloadNetworkSegment resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json - */ -async function workloadNetworksListSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listSegments( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVMGroupsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVMGroupsSample.js deleted file mode 100644 index 4155ab810bea..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVMGroupsSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVMGroup resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVMGroup resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json - */ -async function workloadNetworksListVMGroups() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVMGroups( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVMGroups(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVirtualMachinesSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVirtualMachinesSample.js deleted file mode 100644 index 799bce3da3f7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksListVirtualMachinesSample.js +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json - */ -async function workloadNetworksListVirtualMachines() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVirtualMachines( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVirtualMachines(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDhcpSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDhcpSample.js deleted file mode 100644 index d848748a556c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDhcpSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDhcp - * - * @summary Update a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json - */ -async function workloadNetworksUpdateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsServiceSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsServiceSample.js deleted file mode 100644 index 997baa13b243..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsServiceSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsService - * - * @summary Update a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService.json - */ -async function workloadNetworksUpdateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsZoneSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsZoneSample.js deleted file mode 100644 index 318b52eca34f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateDnsZoneSample.js +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsZone - * - * @summary Update a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone.json - */ -async function workloadNetworksUpdateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdatePortMirroringSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdatePortMirroringSample.js deleted file mode 100644 index f4a565d5b7f7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdatePortMirroringSample.js +++ /dev/null @@ -1,48 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkPortMirroring - * - * @summary Update a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdatePortMirroring.json - */ -async function workloadNetworksUpdatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateSegmentsSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateSegmentsSample.js deleted file mode 100644 index 7466f1ace447..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateSegmentsSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkSegment - * - * @summary Update a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json - */ -async function workloadNetworksUpdateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateVMGroupSample.js b/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateVMGroupSample.js deleted file mode 100644 index 1a5fcd7ccd2e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/javascript/workloadNetworksUpdateVMGroupSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { AzureVMwareSolutionAPI } = require("@azure/arm-avs"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkVMGroup - * - * @summary Update a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup.json - */ -async function workloadNetworksUpdateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup = { - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/README.md b/sdk/avs/arm-avs/samples/v6/typescript/README.md deleted file mode 100644 index 81be2d8bf50f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/README.md +++ /dev/null @@ -1,267 +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** | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [addonsCreateOrUpdateSample.ts][addonscreateorupdatesample] | Create a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json | -| [addonsDeleteSample.ts][addonsdeletesample] | Delete a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json | -| [addonsGetSample.ts][addonsgetsample] | Get a Addon x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json | -| [addonsListSample.ts][addonslistsample] | List Addon resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json | -| [authorizationsCreateOrUpdateSample.ts][authorizationscreateorupdatesample] | Create a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json | -| [authorizationsDeleteSample.ts][authorizationsdeletesample] | Delete a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json | -| [authorizationsGetSample.ts][authorizationsgetsample] | Get a ExpressRouteAuthorization x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json | -| [authorizationsListSample.ts][authorizationslistsample] | List ExpressRouteAuthorization resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json | -| [cloudLinksCreateOrUpdateSample.ts][cloudlinkscreateorupdatesample] | Create a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json | -| [cloudLinksDeleteSample.ts][cloudlinksdeletesample] | Delete a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json | -| [cloudLinksGetSample.ts][cloudlinksgetsample] | Get a CloudLink x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json | -| [cloudLinksListSample.ts][cloudlinkslistsample] | List CloudLink resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json | -| [clustersCreateOrUpdateSample.ts][clusterscreateorupdatesample] | Create a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json | -| [clustersDeleteSample.ts][clustersdeletesample] | Delete a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json | -| [clustersGetSample.ts][clustersgetsample] | Get a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json | -| [clustersListSample.ts][clusterslistsample] | List Cluster resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json | -| [clustersListZonesSample.ts][clusterslistzonessample] | List hosts by zone in a cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json | -| [clustersUpdateSample.ts][clustersupdatesample] | Update a Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json | -| [datastoresCreateOrUpdateSample.ts][datastorescreateorupdatesample] | Create a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json | -| [datastoresDeleteSample.ts][datastoresdeletesample] | Delete a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json | -| [datastoresGetSample.ts][datastoresgetsample] | Get a Datastore x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json | -| [datastoresListSample.ts][datastoreslistsample] | List Datastore resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json | -| [globalReachConnectionsCreateOrUpdateSample.ts][globalreachconnectionscreateorupdatesample] | Create a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json | -| [globalReachConnectionsDeleteSample.ts][globalreachconnectionsdeletesample] | Delete a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json | -| [globalReachConnectionsGetSample.ts][globalreachconnectionsgetsample] | Get a GlobalReachConnection x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json | -| [globalReachConnectionsListSample.ts][globalreachconnectionslistsample] | List GlobalReachConnection resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json | -| [hcxEnterpriseSitesCreateOrUpdateSample.ts][hcxenterprisesitescreateorupdatesample] | Create a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json | -| [hcxEnterpriseSitesDeleteSample.ts][hcxenterprisesitesdeletesample] | Delete a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json | -| [hcxEnterpriseSitesGetSample.ts][hcxenterprisesitesgetsample] | Get a HcxEnterpriseSite x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json | -| [hcxEnterpriseSitesListSample.ts][hcxenterprisesiteslistsample] | List HcxEnterpriseSite resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json | -| [iscsiPathsCreateOrUpdateSample.ts][iscsipathscreateorupdatesample] | Create a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json | -| [iscsiPathsDeleteSample.ts][iscsipathsdeletesample] | Delete a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json | -| [iscsiPathsGetSample.ts][iscsipathsgetsample] | Get a IscsiPath x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json | -| [iscsiPathsListByPrivateCloudSample.ts][iscsipathslistbyprivatecloudsample] | List IscsiPath resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json | -| [locationsCheckQuotaAvailabilitySample.ts][locationscheckquotaavailabilitysample] | Return quota for subscription by region x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json | -| [locationsCheckTrialAvailabilitySample.ts][locationschecktrialavailabilitysample] | Return trial status for subscription by region x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json | -| [operationsListSample.ts][operationslistsample] | List the operations for the provider x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json | -| [placementPoliciesCreateOrUpdateSample.ts][placementpoliciescreateorupdatesample] | Create a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json | -| [placementPoliciesDeleteSample.ts][placementpoliciesdeletesample] | Delete a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json | -| [placementPoliciesGetSample.ts][placementpoliciesgetsample] | Get a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json | -| [placementPoliciesListSample.ts][placementpolicieslistsample] | List PlacementPolicy resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json | -| [placementPoliciesUpdateSample.ts][placementpoliciesupdatesample] | Update a PlacementPolicy x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json | -| [privateCloudsCreateOrUpdateSample.ts][privatecloudscreateorupdatesample] | Create a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json | -| [privateCloudsDeleteSample.ts][privatecloudsdeletesample] | Delete a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json | -| [privateCloudsGetSample.ts][privatecloudsgetsample] | Get a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json | -| [privateCloudsListAdminCredentialsSample.ts][privatecloudslistadmincredentialssample] | List the admin credentials for the private cloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials.json | -| [privateCloudsListInSubscriptionSample.ts][privatecloudslistinsubscriptionsample] | List PrivateCloud resources by subscription ID x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json | -| [privateCloudsListSample.ts][privatecloudslistsample] | List PrivateCloud resources by resource group x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json | -| [privateCloudsRotateNsxtPasswordSample.ts][privatecloudsrotatensxtpasswordsample] | Rotate the NSX-T Manager password x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword.json | -| [privateCloudsRotateVcenterPasswordSample.ts][privatecloudsrotatevcenterpasswordsample] | Rotate the vCenter password x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateVcenterPassword.json | -| [privateCloudsUpdateSample.ts][privatecloudsupdatesample] | Update a PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json | -| [scriptCmdletsGetSample.ts][scriptcmdletsgetsample] | Get a ScriptCmdlet x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json | -| [scriptCmdletsListSample.ts][scriptcmdletslistsample] | List ScriptCmdlet resources by ScriptPackage x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json | -| [scriptExecutionsCreateOrUpdateSample.ts][scriptexecutionscreateorupdatesample] | Create a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json | -| [scriptExecutionsDeleteSample.ts][scriptexecutionsdeletesample] | Delete a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json | -| [scriptExecutionsGetExecutionLogsSample.ts][scriptexecutionsgetexecutionlogssample] | Return the logs for a script execution resource x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json | -| [scriptExecutionsGetSample.ts][scriptexecutionsgetsample] | Get a ScriptExecution x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json | -| [scriptExecutionsListSample.ts][scriptexecutionslistsample] | List ScriptExecution resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json | -| [scriptPackagesGetSample.ts][scriptpackagesgetsample] | Get a ScriptPackage x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json | -| [scriptPackagesListSample.ts][scriptpackageslistsample] | List ScriptPackage resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json | -| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Get a VirtualMachine x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json | -| [virtualMachinesListSample.ts][virtualmachineslistsample] | List VirtualMachine resources by Cluster x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json | -| [virtualMachinesRestrictMovementSample.ts][virtualmachinesrestrictmovementsample] | Enable or disable DRS-driven VM movement restriction x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement.json | -| [workloadNetworksCreateDhcpSample.ts][workloadnetworkscreatedhcpsample] | Create a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json | -| [workloadNetworksCreateDnsServiceSample.ts][workloadnetworkscreatednsservicesample] | Create a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService.json | -| [workloadNetworksCreateDnsZoneSample.ts][workloadnetworkscreatednszonesample] | Create a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone.json | -| [workloadNetworksCreatePortMirroringSample.ts][workloadnetworkscreateportmirroringsample] | Create a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePortMirroring.json | -| [workloadNetworksCreatePublicIPSample.ts][workloadnetworkscreatepublicipsample] | Create a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP.json | -| [workloadNetworksCreateSegmentsSample.ts][workloadnetworkscreatesegmentssample] | Create a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json | -| [workloadNetworksCreateVMGroupSample.ts][workloadnetworkscreatevmgroupsample] | Create a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup.json | -| [workloadNetworksDeleteDhcpSample.ts][workloadnetworksdeletedhcpsample] | Delete a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json | -| [workloadNetworksDeleteDnsServiceSample.ts][workloadnetworksdeletednsservicesample] | Delete a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService.json | -| [workloadNetworksDeleteDnsZoneSample.ts][workloadnetworksdeletednszonesample] | Delete a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone.json | -| [workloadNetworksDeletePortMirroringSample.ts][workloadnetworksdeleteportmirroringsample] | Delete a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePortMirroring.json | -| [workloadNetworksDeletePublicIPSample.ts][workloadnetworksdeletepublicipsample] | Delete a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP.json | -| [workloadNetworksDeleteSegmentSample.ts][workloadnetworksdeletesegmentsample] | Delete a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json | -| [workloadNetworksDeleteVMGroupSample.ts][workloadnetworksdeletevmgroupsample] | Delete a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup.json | -| [workloadNetworksGetDhcpSample.ts][workloadnetworksgetdhcpsample] | Get a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json | -| [workloadNetworksGetDnsServiceSample.ts][workloadnetworksgetdnsservicesample] | Get a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService.json | -| [workloadNetworksGetDnsZoneSample.ts][workloadnetworksgetdnszonesample] | Get a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json | -| [workloadNetworksGetGatewaySample.ts][workloadnetworksgetgatewaysample] | Get a WorkloadNetworkGateway x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json | -| [workloadNetworksGetPortMirroringSample.ts][workloadnetworksgetportmirroringsample] | Get a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring.json | -| [workloadNetworksGetPublicIPSample.ts][workloadnetworksgetpublicipsample] | Get a WorkloadNetworkPublicIP x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json | -| [workloadNetworksGetSample.ts][workloadnetworksgetsample] | Get a WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json | -| [workloadNetworksGetSegmentSample.ts][workloadnetworksgetsegmentsample] | Get a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json | -| [workloadNetworksGetVMGroupSample.ts][workloadnetworksgetvmgroupsample] | Get a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json | -| [workloadNetworksGetVirtualMachineSample.ts][workloadnetworksgetvirtualmachinesample] | Get a WorkloadNetworkVirtualMachine x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json | -| [workloadNetworksListDhcpSample.ts][workloadnetworkslistdhcpsample] | List WorkloadNetworkDhcp resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json | -| [workloadNetworksListDnsServicesSample.ts][workloadnetworkslistdnsservicessample] | List WorkloadNetworkDnsService resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices.json | -| [workloadNetworksListDnsZonesSample.ts][workloadnetworkslistdnszonessample] | List WorkloadNetworkDnsZone resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json | -| [workloadNetworksListGatewaysSample.ts][workloadnetworkslistgatewayssample] | List WorkloadNetworkGateway resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json | -| [workloadNetworksListPortMirroringSample.ts][workloadnetworkslistportmirroringsample] | List WorkloadNetworkPortMirroring resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring.json | -| [workloadNetworksListPublicIPsSample.ts][workloadnetworkslistpublicipssample] | List WorkloadNetworkPublicIP resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs.json | -| [workloadNetworksListSample.ts][workloadnetworkslistsample] | List WorkloadNetwork resources by PrivateCloud x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json | -| [workloadNetworksListSegmentsSample.ts][workloadnetworkslistsegmentssample] | List WorkloadNetworkSegment resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json | -| [workloadNetworksListVMGroupsSample.ts][workloadnetworkslistvmgroupssample] | List WorkloadNetworkVMGroup resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json | -| [workloadNetworksListVirtualMachinesSample.ts][workloadnetworkslistvirtualmachinessample] | List WorkloadNetworkVirtualMachine resources by WorkloadNetwork x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json | -| [workloadNetworksUpdateDhcpSample.ts][workloadnetworksupdatedhcpsample] | Update a WorkloadNetworkDhcp x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json | -| [workloadNetworksUpdateDnsServiceSample.ts][workloadnetworksupdatednsservicesample] | Update a WorkloadNetworkDnsService x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService.json | -| [workloadNetworksUpdateDnsZoneSample.ts][workloadnetworksupdatednszonesample] | Update a WorkloadNetworkDnsZone x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone.json | -| [workloadNetworksUpdatePortMirroringSample.ts][workloadnetworksupdateportmirroringsample] | Update a WorkloadNetworkPortMirroring x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdatePortMirroring.json | -| [workloadNetworksUpdateSegmentsSample.ts][workloadnetworksupdatesegmentssample] | Update a WorkloadNetworkSegment x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json | -| [workloadNetworksUpdateVMGroupSample.ts][workloadnetworksupdatevmgroupsample] | Update a WorkloadNetworkVMGroup x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup.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/addonsCreateOrUpdateSample.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 -npx dev-tool run vendored cross-env AVS_SUBSCRIPTION_ID="" AVS_RESOURCE_GROUP="" node dist/addonsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[addonscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/addonsCreateOrUpdateSample.ts -[addonsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/addonsDeleteSample.ts -[addonsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/addonsGetSample.ts -[addonslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/addonsListSample.ts -[authorizationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsCreateOrUpdateSample.ts -[authorizationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsDeleteSample.ts -[authorizationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsGetSample.ts -[authorizationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsListSample.ts -[cloudlinkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksCreateOrUpdateSample.ts -[cloudlinksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksDeleteSample.ts -[cloudlinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksGetSample.ts -[cloudlinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksListSample.ts -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersCreateOrUpdateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersDeleteSample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersGetSample.ts -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListSample.ts -[clusterslistzonessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListZonesSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/clustersUpdateSample.ts -[datastorescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresCreateOrUpdateSample.ts -[datastoresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresDeleteSample.ts -[datastoresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresGetSample.ts -[datastoreslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresListSample.ts -[globalreachconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsCreateOrUpdateSample.ts -[globalreachconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsDeleteSample.ts -[globalreachconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsGetSample.ts -[globalreachconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsListSample.ts -[hcxenterprisesitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesCreateOrUpdateSample.ts -[hcxenterprisesitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesDeleteSample.ts -[hcxenterprisesitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesGetSample.ts -[hcxenterprisesiteslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesListSample.ts -[iscsipathscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsCreateOrUpdateSample.ts -[iscsipathsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsDeleteSample.ts -[iscsipathsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsGetSample.ts -[iscsipathslistbyprivatecloudsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsListByPrivateCloudSample.ts -[locationscheckquotaavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckQuotaAvailabilitySample.ts -[locationschecktrialavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckTrialAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/operationsListSample.ts -[placementpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesCreateOrUpdateSample.ts -[placementpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesDeleteSample.ts -[placementpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesGetSample.ts -[placementpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesListSample.ts -[placementpoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesUpdateSample.ts -[privatecloudscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsCreateOrUpdateSample.ts -[privatecloudsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsDeleteSample.ts -[privatecloudsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsGetSample.ts -[privatecloudslistadmincredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListAdminCredentialsSample.ts -[privatecloudslistinsubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListInSubscriptionSample.ts -[privatecloudslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListSample.ts -[privatecloudsrotatensxtpasswordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateNsxtPasswordSample.ts -[privatecloudsrotatevcenterpasswordsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateVcenterPasswordSample.ts -[privatecloudsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsUpdateSample.ts -[scriptcmdletsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsGetSample.ts -[scriptcmdletslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsListSample.ts -[scriptexecutionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsCreateOrUpdateSample.ts -[scriptexecutionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsDeleteSample.ts -[scriptexecutionsgetexecutionlogssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetExecutionLogsSample.ts -[scriptexecutionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetSample.ts -[scriptexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsListSample.ts -[scriptpackagesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesGetSample.ts -[scriptpackageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesListSample.ts -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesGetSample.ts -[virtualmachineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesListSample.ts -[virtualmachinesrestrictmovementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesRestrictMovementSample.ts -[workloadnetworkscreatedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDhcpSample.ts -[workloadnetworkscreatednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsServiceSample.ts -[workloadnetworkscreatednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsZoneSample.ts -[workloadnetworkscreateportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePortMirroringSample.ts -[workloadnetworkscreatepublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePublicIPSample.ts -[workloadnetworkscreatesegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateSegmentsSample.ts -[workloadnetworkscreatevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateVMGroupSample.ts -[workloadnetworksdeletedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDhcpSample.ts -[workloadnetworksdeletednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsServiceSample.ts -[workloadnetworksdeletednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsZoneSample.ts -[workloadnetworksdeleteportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePortMirroringSample.ts -[workloadnetworksdeletepublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePublicIPSample.ts -[workloadnetworksdeletesegmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteSegmentSample.ts -[workloadnetworksdeletevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteVMGroupSample.ts -[workloadnetworksgetdhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDhcpSample.ts -[workloadnetworksgetdnsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsServiceSample.ts -[workloadnetworksgetdnszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsZoneSample.ts -[workloadnetworksgetgatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetGatewaySample.ts -[workloadnetworksgetportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPortMirroringSample.ts -[workloadnetworksgetpublicipsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPublicIPSample.ts -[workloadnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSample.ts -[workloadnetworksgetsegmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSegmentSample.ts -[workloadnetworksgetvmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVMGroupSample.ts -[workloadnetworksgetvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVirtualMachineSample.ts -[workloadnetworkslistdhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDhcpSample.ts -[workloadnetworkslistdnsservicessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsServicesSample.ts -[workloadnetworkslistdnszonessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsZonesSample.ts -[workloadnetworkslistgatewayssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListGatewaysSample.ts -[workloadnetworkslistportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPortMirroringSample.ts -[workloadnetworkslistpublicipssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPublicIPsSample.ts -[workloadnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSample.ts -[workloadnetworkslistsegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSegmentsSample.ts -[workloadnetworkslistvmgroupssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVMGroupsSample.ts -[workloadnetworkslistvirtualmachinessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVirtualMachinesSample.ts -[workloadnetworksupdatedhcpsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDhcpSample.ts -[workloadnetworksupdatednsservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsServiceSample.ts -[workloadnetworksupdatednszonesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsZoneSample.ts -[workloadnetworksupdateportmirroringsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdatePortMirroringSample.ts -[workloadnetworksupdatesegmentssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateSegmentsSample.ts -[workloadnetworksupdatevmgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateVMGroupSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-avs -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/avs/arm-avs/samples/v6/typescript/package.json b/sdk/avs/arm-avs/samples/v6/typescript/package.json deleted file mode 100644 index d560cc8b1a06..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-avs-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/avs/arm-avs" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs", - "dependencies": { - "@azure/arm-avs": "latest", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/avs/arm-avs/samples/v6/typescript/sample.env b/sdk/avs/arm-avs/samples/v6/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/addonsCreateOrUpdateSample.ts deleted file mode 100644 index 2e69da4d4d9f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsCreateOrUpdateSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Addon, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json - */ -async function addonsCreateOrUpdateArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const addon: Addon = { - properties: { - addonType: "Arc", - vCenter: - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json - */ -async function addonsCreateOrUpdateHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const addon: Addon = { - properties: { - addonType: "HCX", - offer: "VMware MaaS Cloud Provider (Enterprise)", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json - */ -async function addonsCreateOrUpdateSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const addon: Addon = { - properties: { - addonType: "SRM", - licenseKey: "41915178-A8FF-4A4D-B683-6D735AF5E3F5", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a Addon - * - * @summary Create a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json - */ -async function addonsCreateOrUpdateVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const addon: Addon = { properties: { addonType: "VR", vrsCount: 1 } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); - console.log(result); -} - -async function main() { - addonsCreateOrUpdateArcReg(); - addonsCreateOrUpdateHcx(); - addonsCreateOrUpdateSrm(); - addonsCreateOrUpdateVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/addonsDeleteSample.ts deleted file mode 100644 index a918c59e56db..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Addon - * - * @summary Delete a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json - */ -async function addonsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -async function main() { - addonsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/addonsGetSample.ts deleted file mode 100644 index 2d7c331c1296..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsGetSample.ts +++ /dev/null @@ -1,116 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json - */ -async function addonsGetArcReg() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "arc"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json - */ -async function addonsGetHcx() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "hcx"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json - */ -async function addonsGetSrm() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "srm"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a Addon - * - * @summary Get a Addon - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json - */ -async function addonsGetVr() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const addonName = "vr"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get( - resourceGroupName, - privateCloudName, - addonName, - ); - console.log(result); -} - -async function main() { - addonsGetArcReg(); - addonsGetHcx(); - addonsGetSrm(); - addonsGetVr(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/addonsListSample.ts deleted file mode 100644 index bbb92b11b6cc..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Addon resources by PrivateCloud - * - * @summary List Addon resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json - */ -async function addonsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.addons.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - addonsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsCreateOrUpdateSample.ts deleted file mode 100644 index c9830fd6bee3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ExpressRouteAuthorization, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a ExpressRouteAuthorization - * - * @summary Create a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json - */ -async function authorizationsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const authorization: ExpressRouteAuthorization = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - authorization, - ); - console.log(result); -} - -async function main() { - authorizationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsDeleteSample.ts deleted file mode 100644 index 53948819a084..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a ExpressRouteAuthorization - * - * @summary Delete a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json - */ -async function authorizationsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsGetSample.ts deleted file mode 100644 index 7bc9ad8ad7e8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ExpressRouteAuthorization - * - * @summary Get a ExpressRouteAuthorization - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json - */ -async function authorizationsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const authorizationName = "authorization1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.authorizations.get( - resourceGroupName, - privateCloudName, - authorizationName, - ); - console.log(result); -} - -async function main() { - authorizationsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsListSample.ts deleted file mode 100644 index a06d1752ea0b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ExpressRouteAuthorization resources by PrivateCloud - * - * @summary List ExpressRouteAuthorization resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json - */ -async function authorizationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.authorizations.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - authorizationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksCreateOrUpdateSample.ts deleted file mode 100644 index 8aa26537c80a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudLink, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a CloudLink - * - * @summary Create a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json - */ -async function cloudLinksCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const cloudLink: CloudLink = { - linkedCloud: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - cloudLink, - ); - console.log(result); -} - -async function main() { - cloudLinksCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksDeleteSample.ts deleted file mode 100644 index 0364aa7f9315..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a CloudLink - * - * @summary Delete a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json - */ -async function cloudLinksDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - cloudLinkName, - ); - console.log(result); -} - -async function main() { - cloudLinksDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksGetSample.ts deleted file mode 100644 index a1d1d30d872d..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a CloudLink - * - * @summary Get a CloudLink - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json - */ -async function cloudLinksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const cloudLinkName = "cloudLink1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.cloudLinks.get( - resourceGroupName, - privateCloudName, - cloudLinkName, - ); - console.log(result); -} - -async function main() { - cloudLinksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksListSample.ts deleted file mode 100644 index f7170cf0fc26..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List CloudLink resources by PrivateCloud - * - * @summary List CloudLink resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json - */ -async function cloudLinksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudLinks.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - cloudLinksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersCreateOrUpdateSample.ts deleted file mode 100644 index ab0efec93552..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Cluster, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Cluster - * - * @summary Create a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json - */ -async function clustersCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const cluster: Cluster = { clusterSize: 3, sku: { name: "AV20" } }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - cluster, - ); - console.log(result); -} - -async function main() { - clustersCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersDeleteSample.ts deleted file mode 100644 index 1662ed323aae..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Cluster - * - * @summary Delete a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json - */ -async function clustersDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersGetSample.ts deleted file mode 100644 index fe8a81736afa..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Cluster - * - * @summary Get a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json - */ -async function clustersGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.get( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListSample.ts deleted file mode 100644 index 2748f95a10e4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Cluster resources by PrivateCloud - * - * @summary List Cluster resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json - */ -async function clustersList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clustersList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListZonesSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListZonesSample.ts deleted file mode 100644 index b9ee0b2bc0e7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListZonesSample.ts +++ /dev/null @@ -1,68 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json - */ -async function clustersListZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to List hosts by zone in a cluster - * - * @summary List hosts by zone in a cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json - */ -async function clustersListZonesStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.listZones( - resourceGroupName, - privateCloudName, - clusterName, - ); - console.log(result); -} - -async function main() { - clustersListZones(); - clustersListZonesStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/clustersUpdateSample.ts deleted file mode 100644 index 954c859d0496..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ClusterUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a Cluster - * - * @summary Update a Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json - */ -async function clustersUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const clusterUpdate: ClusterUpdate = { clusterSize: 4 }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - clusterUpdate, - ); - console.log(result); -} - -async function main() { - clustersUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresCreateOrUpdateSample.ts deleted file mode 100644 index cde4d34c0438..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Datastore, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a Datastore - * - * @summary Create a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json - */ -async function datastoresCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const datastore: Datastore = { - netAppVolume: { - id: "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - datastore, - ); - console.log(result); -} - -async function main() { - datastoresCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresDeleteSample.ts deleted file mode 100644 index 484031fb0977..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresDeleteSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a Datastore - * - * @summary Delete a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json - */ -async function datastoresDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresGetSample.ts deleted file mode 100644 index 6e0b8b433ac8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a Datastore - * - * @summary Get a Datastore - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json - */ -async function datastoresGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const datastoreName = "datastore1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.datastores.get( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - ); - console.log(result); -} - -async function main() { - datastoresGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresListSample.ts deleted file mode 100644 index fbdeb76d7a61..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List Datastore resources by Cluster - * - * @summary List Datastore resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json - */ -async function datastoresList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.datastores.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - datastoresList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 743d223fa17b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { GlobalReachConnection, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a GlobalReachConnection - * - * @summary Create a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json - */ -async function globalReachConnectionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const globalReachConnection: GlobalReachConnection = { - authorizationKey: "01010101-0101-0101-0101-010101010101", - peerExpressRouteCircuit: - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - globalReachConnection, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsDeleteSample.ts deleted file mode 100644 index 3615ec251e9a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a GlobalReachConnection - * - * @summary Delete a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json - */ -async function globalReachConnectionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsGetSample.ts deleted file mode 100644 index cd0c749e2c5d..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a GlobalReachConnection - * - * @summary Get a GlobalReachConnection - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json - */ -async function globalReachConnectionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const globalReachConnectionName = "connection1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.globalReachConnections.get( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - ); - console.log(result); -} - -async function main() { - globalReachConnectionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsListSample.ts deleted file mode 100644 index c1ae83cd5970..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List GlobalReachConnection resources by PrivateCloud - * - * @summary List GlobalReachConnection resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json - */ -async function globalReachConnectionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.globalReachConnections.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - globalReachConnectionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesCreateOrUpdateSample.ts deleted file mode 100644 index 33b40ba742fa..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HcxEnterpriseSite, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a HcxEnterpriseSite - * - * @summary Create a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json - */ -async function hcxEnterpriseSitesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const hcxEnterpriseSite: HcxEnterpriseSite = {}; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.createOrUpdate( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - hcxEnterpriseSite, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesDeleteSample.ts deleted file mode 100644 index 7c811da35595..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a HcxEnterpriseSite - * - * @summary Delete a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json - */ -async function hcxEnterpriseSitesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.delete( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesGetSample.ts deleted file mode 100644 index 4efe65414717..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a HcxEnterpriseSite - * - * @summary Get a HcxEnterpriseSite - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json - */ -async function hcxEnterpriseSitesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const hcxEnterpriseSiteName = "site1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.hcxEnterpriseSites.get( - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - ); - console.log(result); -} - -async function main() { - hcxEnterpriseSitesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesListSample.ts deleted file mode 100644 index b034393caee3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List HcxEnterpriseSite resources by PrivateCloud - * - * @summary List HcxEnterpriseSite resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json - */ -async function hcxEnterpriseSitesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.hcxEnterpriseSites.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hcxEnterpriseSitesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsCreateOrUpdateSample.ts deleted file mode 100644 index 307f6798b804..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsCreateOrUpdateSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { IscsiPath, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a IscsiPath - * - * @summary Create a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json - */ -async function iscsiPathsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const resource: IscsiPath = { networkBlock: "192.168.0.0/24" }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - resource, - ); - console.log(result); -} - -async function main() { - iscsiPathsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsDeleteSample.ts deleted file mode 100644 index a2e60d4bd9f6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsDeleteSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a IscsiPath - * - * @summary Delete a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json - */ -async function iscsiPathsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - iscsiPathsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsGetSample.ts deleted file mode 100644 index df7e8cd56203..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsGetSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a IscsiPath - * - * @summary Get a IscsiPath - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json - */ -async function iscsiPathsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.iscsiPaths.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - iscsiPathsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsListByPrivateCloudSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsListByPrivateCloudSample.ts deleted file mode 100644 index a92c540200a9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsListByPrivateCloudSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List IscsiPath resources by PrivateCloud - * - * @summary List IscsiPath resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json - */ -async function iscsiPathsListByPrivateCloud() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.iscsiPaths.listByPrivateCloud( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - iscsiPathsListByPrivateCloud(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckQuotaAvailabilitySample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckQuotaAvailabilitySample.ts deleted file mode 100644 index 144591ba227f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckQuotaAvailabilitySample.ts +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return quota for subscription by region - * - * @summary Return quota for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json - */ -async function locationsCheckQuotaAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkQuotaAvailability(location); - console.log(result); -} - -async function main() { - locationsCheckQuotaAvailability(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckTrialAvailabilitySample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckTrialAvailabilitySample.ts deleted file mode 100644 index 2ae660306879..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckTrialAvailabilitySample.ts +++ /dev/null @@ -1,65 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Sku, - LocationsCheckTrialAvailabilityOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json - */ -async function locationsCheckTrialAvailability() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability(location); - console.log(result); -} - -/** - * This sample demonstrates how to Return trial status for subscription by region - * - * @summary Return trial status for subscription by region - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailabilityWithSku.json - */ -async function locationsCheckTrialAvailabilityWithSku() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const sku: Sku = { name: "avs52t" }; - const options: LocationsCheckTrialAvailabilityOptionalParams = { sku }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.locations.checkTrialAvailability( - location, - options, - ); - console.log(result); -} - -async function main() { - locationsCheckTrialAvailability(); - locationsCheckTrialAvailabilityWithSku(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/operationsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/operationsListSample.ts deleted file mode 100644 index 87a8a49055bd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the operations for the provider - * - * @summary List the operations for the provider - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json - */ -async function operationsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operationsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b037596809c9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlacementPolicy, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a PlacementPolicy - * - * @summary Create a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json - */ -async function placementPoliciesCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicy: PlacementPolicy = { - properties: { - type: "VmHost", - affinityStrength: "Must", - affinityType: "AntiAffinity", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicy, - ); - console.log(result); -} - -async function main() { - placementPoliciesCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesDeleteSample.ts deleted file mode 100644 index 1aa96b4eca1c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesDeleteSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a PlacementPolicy - * - * @summary Delete a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json - */ -async function placementPoliciesDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesGetSample.ts deleted file mode 100644 index 7630777c1837..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a PlacementPolicy - * - * @summary Get a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json - */ -async function placementPoliciesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.get( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - ); - console.log(result); -} - -async function main() { - placementPoliciesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesListSample.ts deleted file mode 100644 index 4801a7470ba5..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PlacementPolicy resources by Cluster - * - * @summary List PlacementPolicy resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json - */ -async function placementPoliciesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.placementPolicies.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - placementPoliciesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesUpdateSample.ts deleted file mode 100644 index b6f16ef14f63..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesUpdateSample.ts +++ /dev/null @@ -1,61 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PlacementPolicyUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a PlacementPolicy - * - * @summary Update a PlacementPolicy - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json - */ -async function placementPoliciesUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const placementPolicyName = "policy1"; - const placementPolicyUpdate: PlacementPolicyUpdate = { - affinityStrength: "Must", - azureHybridBenefitType: "SqlHost", - hostMembers: [ - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center", - ], - state: "Disabled", - vmMembers: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256", - ], - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.placementPolicies.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicyUpdate, - ); - console.log(result); -} - -async function main() { - placementPoliciesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsCreateOrUpdateSample.ts deleted file mode 100644 index d1be41ce029e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateCloud, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json - */ -async function privateCloudsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud: PrivateCloud = { - identity: { type: "SystemAssigned" }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a PrivateCloud - * - * @summary Create a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json - */ -async function privateCloudsCreateOrUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloud: PrivateCloud = { - availability: { secondaryZone: 2, strategy: "DualZone", zone: 1 }, - location: "eastus2", - managementCluster: { clusterSize: 4 }, - networkBlock: "192.168.48.0/22", - sku: { name: "AV36" }, - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloud, - ); - console.log(result); -} - -async function main() { - privateCloudsCreateOrUpdate(); - privateCloudsCreateOrUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsDeleteSample.ts deleted file mode 100644 index 2ee2fe082201..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsDeleteSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a PrivateCloud - * - * @summary Delete a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json - */ -async function privateCloudsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsGetSample.ts deleted file mode 100644 index d4f4d784e0a7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsGetSample.ts +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json - */ -async function privateCloudsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get a PrivateCloud - * - * @summary Get a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json - */ -async function privateCloudsGetStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsGet(); - privateCloudsGetStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListAdminCredentialsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListAdminCredentialsSample.ts deleted file mode 100644 index e5b77fa10c2b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListAdminCredentialsSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the admin credentials for the private cloud - * - * @summary List the admin credentials for the private cloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials.json - */ -async function privateCloudsListAdminCredentials() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.listAdminCredentials( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsListAdminCredentials(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListInSubscriptionSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListInSubscriptionSample.ts deleted file mode 100644 index 7b28945edcd8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListInSubscriptionSample.ts +++ /dev/null @@ -1,60 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json - */ -async function privateCloudsListInSubscription() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by subscription ID - * - * @summary List PrivateCloud resources by subscription ID - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription_Stretched.json - */ -async function privateCloudsListInSubscriptionStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsListInSubscription(); - privateCloudsListInSubscriptionStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListSample.ts deleted file mode 100644 index 3d90a48925fa..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListSample.ts +++ /dev/null @@ -1,62 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json - */ -async function privateCloudsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to List PrivateCloud resources by resource group - * - * @summary List PrivateCloud resources by resource group - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json - */ -async function privateCloudsListStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateClouds.list(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateCloudsList(); - privateCloudsListStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateNsxtPasswordSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateNsxtPasswordSample.ts deleted file mode 100644 index d38d74e61ac8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateNsxtPasswordSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Rotate the NSX-T Manager password - * - * @summary Rotate the NSX-T Manager password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword.json - */ -async function privateCloudsRotateNsxtPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateNsxtPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateNsxtPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateVcenterPasswordSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateVcenterPasswordSample.ts deleted file mode 100644 index d57f39e89e23..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateVcenterPasswordSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Rotate the vCenter password - * - * @summary Rotate the vCenter password - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateVcenterPassword.json - */ -async function privateCloudsRotateVcenterPassword() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginRotateVcenterPasswordAndWait( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - privateCloudsRotateVcenterPassword(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsUpdateSample.ts deleted file mode 100644 index ea579663305c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsUpdateSample.ts +++ /dev/null @@ -1,81 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateCloudUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json - */ -async function privateCloudsUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate: PrivateCloudUpdate = { - encryption: { - keyVaultProperties: { - keyName: "keyname1", - keyVaultUrl: "https://keyvault1-kmip-kvault.vault.azure.net/", - keyVersion: "ver1.0", - }, - status: "Enabled", - }, - identity: { type: "None" }, - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update a PrivateCloud - * - * @summary Update a PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched.json - */ -async function privateCloudsUpdateStretched() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const privateCloudUpdate: PrivateCloudUpdate = { - managementCluster: { clusterSize: 4 }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.privateClouds.beginUpdateAndWait( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - ); - console.log(result); -} - -async function main() { - privateCloudsUpdate(); - privateCloudsUpdateStretched(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsGetSample.ts deleted file mode 100644 index 4ba80dd752ea..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptCmdlet - * - * @summary Get a ScriptCmdlet - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json - */ -async function scriptCmdletsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const scriptCmdletName = "New-ExternalSsoDomain"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptCmdlets.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - ); - console.log(result); -} - -async function main() { - scriptCmdletsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsListSample.ts deleted file mode 100644 index af20e74967a8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptCmdlet resources by ScriptPackage - * - * @summary List ScriptCmdlet resources by ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json - */ -async function scriptCmdletsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "package@1.0.2"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptCmdlets.list( - resourceGroupName, - privateCloudName, - scriptPackageName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptCmdletsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsCreateOrUpdateSample.ts deleted file mode 100644 index 7119b63b053a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,66 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScriptExecution, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a ScriptExecution - * - * @summary Create a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json - */ -async function scriptExecutionsCreateOrUpdate() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptExecution: ScriptExecution = { - hiddenParameters: [ - { - name: "Password", - type: "SecureValue", - secureValue: "PlaceholderPassword", - }, - ], - parameters: [ - { name: "DomainName", type: "Value", value: "placeholderDomain.local" }, - { - name: "BaseUserDN", - type: "Value", - value: "DC=placeholder, DC=placeholder", - }, - ], - retention: "P0Y0M60DT0H60M60S", - scriptCmdletId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource", - timeout: "P0Y0M0DT0H60M60S", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - scriptExecution, - ); - console.log(result); -} - -async function main() { - scriptExecutionsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsDeleteSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsDeleteSample.ts deleted file mode 100644 index 6471eeeb5756..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsDeleteSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a ScriptExecution - * - * @summary Delete a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json - */ -async function scriptExecutionsDelete() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.beginDeleteAndWait( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsDelete(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetExecutionLogsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetExecutionLogsSample.ts deleted file mode 100644 index 5706d2eabebb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetExecutionLogsSample.ts +++ /dev/null @@ -1,58 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ScriptOutputStreamType, - ScriptExecutionsGetExecutionLogsOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Return the logs for a script execution resource - * - * @summary Return the logs for a script execution resource - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json - */ -async function scriptExecutionsGetExecutionLogs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const scriptOutputStreamType: ScriptOutputStreamType[] = [ - "Information", - "Warnings", - "Errors", - "Output", - ]; - const options: ScriptExecutionsGetExecutionLogsOptionalParams = { - scriptOutputStreamType, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.getExecutionLogs( - resourceGroupName, - privateCloudName, - scriptExecutionName, - options, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGetExecutionLogs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetSample.ts deleted file mode 100644 index d352f654bab4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptExecution - * - * @summary Get a ScriptExecution - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json - */ -async function scriptExecutionsGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptExecutionName = "addSsoServer"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptExecutions.get( - resourceGroupName, - privateCloudName, - scriptExecutionName, - ); - console.log(result); -} - -async function main() { - scriptExecutionsGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsListSample.ts deleted file mode 100644 index 3a89710388ad..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptExecution resources by PrivateCloud - * - * @summary List ScriptExecution resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json - */ -async function scriptExecutionsList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptExecutions.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptExecutionsList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesGetSample.ts deleted file mode 100644 index ee730017f5b2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesGetSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a ScriptPackage - * - * @summary Get a ScriptPackage - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json - */ -async function scriptPackagesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const scriptPackageName = "Microsoft.AVS.Management@3.0.48"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.scriptPackages.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - ); - console.log(result); -} - -async function main() { - scriptPackagesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesListSample.ts deleted file mode 100644 index 070066ab5574..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List ScriptPackage resources by PrivateCloud - * - * @summary List ScriptPackage resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json - */ -async function scriptPackagesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scriptPackages.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - scriptPackagesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesGetSample.ts deleted file mode 100644 index bee127ec27f3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesGetSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a VirtualMachine - * - * @summary Get a VirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json - */ -async function virtualMachinesGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - virtualMachinesGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesListSample.ts deleted file mode 100644 index f30647ca8736..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesListSample.ts +++ /dev/null @@ -1,47 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List VirtualMachine resources by Cluster - * - * @summary List VirtualMachine resources by Cluster - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json - */ -async function virtualMachinesList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - virtualMachinesList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesRestrictMovementSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesRestrictMovementSample.ts deleted file mode 100644 index 81874d580749..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesRestrictMovementSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VirtualMachineRestrictMovement, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable or disable DRS-driven VM movement restriction - * - * @summary Enable or disable DRS-driven VM movement restriction - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement.json - */ -async function virtualMachinesRestrictMovement() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const clusterName = "cluster1"; - const virtualMachineId = "vm-209"; - const restrictMovement: VirtualMachineRestrictMovement = { - restrictMovement: "Enabled", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.virtualMachines.beginRestrictMovementAndWait( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - ); - console.log(result); -} - -async function main() { - virtualMachinesRestrictMovement(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDhcpSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDhcpSample.ts deleted file mode 100644 index f5e78cba30af..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDhcpSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDhcp - * - * @summary Create a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json - */ -async function workloadNetworksCreateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp: WorkloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - displayName: "dhcpConfigurations1", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsServiceSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsServiceSample.ts deleted file mode 100644 index 90f6eee69857..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsServiceSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsService - * - * @summary Create a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService.json - */ -async function workloadNetworksCreateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService: WorkloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsZoneSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsZoneSample.ts deleted file mode 100644 index e0aabd12d8f4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsZoneSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkDnsZone - * - * @summary Create a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone.json - */ -async function workloadNetworksCreateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone: WorkloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePortMirroringSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePortMirroringSample.ts deleted file mode 100644 index 6c0f7f26c2ea..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePortMirroringSample.ts +++ /dev/null @@ -1,55 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPortMirroring - * - * @summary Create a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePortMirroring.json - */ -async function workloadNetworksCreatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring: WorkloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - displayName: "portMirroring1", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePublicIPSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePublicIPSample.ts deleted file mode 100644 index 831d65e6f264..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePublicIPSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPublicIP, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkPublicIP - * - * @summary Create a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP.json - */ -async function workloadNetworksCreatePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const workloadNetworkPublicIP: WorkloadNetworkPublicIP = { - displayName: "publicIP1", - numberOfPublicIPs: 32, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreatePublicIPAndWait( - resourceGroupName, - privateCloudName, - publicIPId, - workloadNetworkPublicIP, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreatePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateSegmentsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateSegmentsSample.ts deleted file mode 100644 index 5b437b057181..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateSegmentsSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkSegment - * - * @summary Create a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json - */ -async function workloadNetworksCreateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment: WorkloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - displayName: "segment1", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateVMGroupSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateVMGroupSample.ts deleted file mode 100644 index c6f543798dc5..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateVMGroupSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a WorkloadNetworkVMGroup - * - * @summary Create a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup.json - */ -async function workloadNetworksCreateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup: WorkloadNetworkVMGroup = { - displayName: "vmGroup1", - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginCreateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksCreateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDhcpSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDhcpSample.ts deleted file mode 100644 index 88bd3730dd66..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDhcpSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDhcp - * - * @summary Delete a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json - */ -async function workloadNetworksDeleteDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsServiceSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsServiceSample.ts deleted file mode 100644 index 33eb3448f360..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsServiceSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsService - * - * @summary Delete a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService.json - */ -async function workloadNetworksDeleteDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsServiceId = "dnsService1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsServiceAndWait( - resourceGroupName, - dnsServiceId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsZoneSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsZoneSample.ts deleted file mode 100644 index b092101ce3b6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsZoneSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkDnsZone - * - * @summary Delete a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone.json - */ -async function workloadNetworksDeleteDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dnsZoneId = "dnsZone1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteDnsZoneAndWait( - resourceGroupName, - dnsZoneId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePortMirroringSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePortMirroringSample.ts deleted file mode 100644 index e26f9ecbf692..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePortMirroringSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPortMirroring - * - * @summary Delete a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePortMirroring.json - */ -async function workloadNetworksDeletePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const portMirroringId = "portMirroring1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePortMirroringAndWait( - resourceGroupName, - portMirroringId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePublicIPSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePublicIPSample.ts deleted file mode 100644 index 0ab8b562b428..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePublicIPSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkPublicIP - * - * @summary Delete a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP.json - */ -async function workloadNetworksDeletePublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const publicIPId = "publicIP1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeletePublicIPAndWait( - resourceGroupName, - publicIPId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeletePublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteSegmentSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteSegmentSample.ts deleted file mode 100644 index d20186d214b8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteSegmentSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkSegment - * - * @summary Delete a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json - */ -async function workloadNetworksDeleteSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteSegmentAndWait( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteVMGroupSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteVMGroupSample.ts deleted file mode 100644 index 5073f4a03d82..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteVMGroupSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a WorkloadNetworkVMGroup - * - * @summary Delete a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup.json - */ -async function workloadNetworksDeleteVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const vmGroupId = "vmGroup1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginDeleteVMGroupAndWait( - resourceGroupName, - vmGroupId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksDeleteVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDhcpSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDhcpSample.ts deleted file mode 100644 index 23d52348e012..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDhcpSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDhcp - * - * @summary Get a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json - */ -async function workloadNetworksGetDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const dhcpId = "dhcp1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDhcp( - resourceGroupName, - dhcpId, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsServiceSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsServiceSample.ts deleted file mode 100644 index 7d54c1db2cab..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsServiceSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsService - * - * @summary Get a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService.json - */ -async function workloadNetworksGetDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsService( - resourceGroupName, - privateCloudName, - dnsServiceId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsZoneSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsZoneSample.ts deleted file mode 100644 index 578c8031b1a9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsZoneSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkDnsZone - * - * @summary Get a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json - */ -async function workloadNetworksGetDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getDnsZone( - resourceGroupName, - privateCloudName, - dnsZoneId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetGatewaySample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetGatewaySample.ts deleted file mode 100644 index a1aaf3b17f1c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetGatewaySample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkGateway - * - * @summary Get a WorkloadNetworkGateway - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json - */ -async function workloadNetworksGetGateway() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const gatewayId = "gateway1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getGateway( - resourceGroupName, - privateCloudName, - gatewayId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPortMirroringSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPortMirroringSample.ts deleted file mode 100644 index c1d64d2caede..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPortMirroringSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPortMirroring - * - * @summary Get a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring.json - */ -async function workloadNetworksGetPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPortMirroring( - resourceGroupName, - privateCloudName, - portMirroringId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPublicIPSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPublicIPSample.ts deleted file mode 100644 index 3485a027a27f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPublicIPSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkPublicIP - * - * @summary Get a WorkloadNetworkPublicIP - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json - */ -async function workloadNetworksGetPublicIP() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const publicIPId = "publicIP1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getPublicIP( - resourceGroupName, - privateCloudName, - publicIPId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetPublicIP(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSample.ts deleted file mode 100644 index d10f427e6c9b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetwork - * - * @summary Get a WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json - */ -async function workloadNetworksGet() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.get( - resourceGroupName, - privateCloudName, - ); - console.log(result); -} - -async function main() { - workloadNetworksGet(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSegmentSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSegmentSample.ts deleted file mode 100644 index e77abf4733a2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSegmentSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkSegment - * - * @summary Get a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json - */ -async function workloadNetworksGetSegment() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getSegment( - resourceGroupName, - privateCloudName, - segmentId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetSegment(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVMGroupSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVMGroupSample.ts deleted file mode 100644 index 8d9e3a23806c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVMGroupSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVMGroup - * - * @summary Get a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json - */ -async function workloadNetworksGetVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVMGroup( - resourceGroupName, - privateCloudName, - vmGroupId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVirtualMachineSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVirtualMachineSample.ts deleted file mode 100644 index a223402fe2d6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVirtualMachineSample.ts +++ /dev/null @@ -1,44 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a WorkloadNetworkVirtualMachine - * - * @summary Get a WorkloadNetworkVirtualMachine - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json - */ -async function workloadNetworksGetVirtualMachine() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const virtualMachineId = "vm1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.getVirtualMachine( - resourceGroupName, - privateCloudName, - virtualMachineId, - ); - console.log(result); -} - -async function main() { - workloadNetworksGetVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDhcpSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDhcpSample.ts deleted file mode 100644 index a78823d022af..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDhcpSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDhcp resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDhcp resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json - */ -async function workloadNetworksListDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDhcp( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsServicesSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsServicesSample.ts deleted file mode 100644 index 6f1895661570..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsServicesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsService resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsService resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices.json - */ -async function workloadNetworksListDnsServices() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsServices( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsServices(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsZonesSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsZonesSample.ts deleted file mode 100644 index e2f5d35a0675..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsZonesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkDnsZone resources by WorkloadNetwork - * - * @summary List WorkloadNetworkDnsZone resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json - */ -async function workloadNetworksListDnsZones() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listDnsZones( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListDnsZones(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListGatewaysSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListGatewaysSample.ts deleted file mode 100644 index acec4e800629..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListGatewaysSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkGateway resources by WorkloadNetwork - * - * @summary List WorkloadNetworkGateway resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json - */ -async function workloadNetworksListGateways() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listGateways( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListGateways(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPortMirroringSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPortMirroringSample.ts deleted file mode 100644 index 7353acadf9e2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPortMirroringSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring.json - */ -async function workloadNetworksListPortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPortMirroring( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPublicIPsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPublicIPsSample.ts deleted file mode 100644 index 8cffff6c1c98..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPublicIPsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkPublicIP resources by WorkloadNetwork - * - * @summary List WorkloadNetworkPublicIP resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs.json - */ -async function workloadNetworksListPublicIPs() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listPublicIPs( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListPublicIPs(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSample.ts deleted file mode 100644 index 37870a16fe55..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetwork resources by PrivateCloud - * - * @summary List WorkloadNetwork resources by PrivateCloud - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json - */ -async function workloadNetworksList() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.list( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksList(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSegmentsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSegmentsSample.ts deleted file mode 100644 index 825475c385fd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSegmentsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkSegment resources by WorkloadNetwork - * - * @summary List WorkloadNetworkSegment resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json - */ -async function workloadNetworksListSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listSegments( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVMGroupsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVMGroupsSample.ts deleted file mode 100644 index 9de1ba946e25..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVMGroupsSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVMGroup resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVMGroup resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json - */ -async function workloadNetworksListVMGroups() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVMGroups( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVMGroups(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVirtualMachinesSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVirtualMachinesSample.ts deleted file mode 100644 index 77de1085e666..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVirtualMachinesSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * - * @summary List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json - */ -async function workloadNetworksListVirtualMachines() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.workloadNetworks.listVirtualMachines( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - workloadNetworksListVirtualMachines(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDhcpSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDhcpSample.ts deleted file mode 100644 index 3ae89440ad11..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDhcpSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDhcp - * - * @summary Update a WorkloadNetworkDhcp - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json - */ -async function workloadNetworksUpdateDhcp() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dhcpId = "dhcp1"; - const workloadNetworkDhcp: WorkloadNetworkDhcp = { - properties: { - dhcpType: "SERVER", - leaseTime: 86400, - revision: 1, - serverAddress: "40.1.5.1/24", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDhcpAndWait( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDhcp(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsServiceSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsServiceSample.ts deleted file mode 100644 index 8ea067878e73..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsServiceSample.ts +++ /dev/null @@ -1,56 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsService - * - * @summary Update a WorkloadNetworkDnsService - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService.json - */ -async function workloadNetworksUpdateDnsService() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsServiceId = "dnsService1"; - const workloadNetworkDnsService: WorkloadNetworkDnsService = { - defaultDnsZone: "defaultDnsZone1", - displayName: "dnsService1", - dnsServiceIp: "5.5.5.5", - fqdnZones: ["fqdnZone1"], - logLevel: "INFO", - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsServiceAndWait( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsService(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsZoneSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsZoneSample.ts deleted file mode 100644 index 38c1059ed03f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsZoneSample.ts +++ /dev/null @@ -1,52 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkDnsZone - * - * @summary Update a WorkloadNetworkDnsZone - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone.json - */ -async function workloadNetworksUpdateDnsZone() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const dnsZoneId = "dnsZone1"; - const workloadNetworkDnsZone: WorkloadNetworkDnsZone = { - displayName: "dnsZone1", - dnsServerIps: ["1.1.1.1"], - domain: [], - revision: 1, - sourceIp: "8.8.8.8", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateDnsZoneAndWait( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateDnsZone(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdatePortMirroringSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdatePortMirroringSample.ts deleted file mode 100644 index 3d437baa3fbc..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdatePortMirroringSample.ts +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkPortMirroring - * - * @summary Update a WorkloadNetworkPortMirroring - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdatePortMirroring.json - */ -async function workloadNetworksUpdatePortMirroring() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const portMirroringId = "portMirroring1"; - const workloadNetworkPortMirroring: WorkloadNetworkPortMirroring = { - destination: "vmGroup2", - direction: "BIDIRECTIONAL", - revision: 1, - source: "vmGroup1", - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdatePortMirroringAndWait( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdatePortMirroring(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateSegmentsSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateSegmentsSample.ts deleted file mode 100644 index 01b132432003..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateSegmentsSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkSegment - * - * @summary Update a WorkloadNetworkSegment - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json - */ -async function workloadNetworksUpdateSegments() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const segmentId = "segment1"; - const workloadNetworkSegment: WorkloadNetworkSegment = { - connectedGateway: "/infra/tier-1s/gateway", - revision: 1, - subnet: { - dhcpRanges: ["40.20.0.0-40.20.0.1"], - gatewayAddress: "40.20.20.20/16", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateSegmentsAndWait( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateSegments(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateVMGroupSample.ts b/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateVMGroupSample.ts deleted file mode 100644 index ddc3f9234a3b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateVMGroupSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a WorkloadNetworkVMGroup - * - * @summary Update a WorkloadNetworkVMGroup - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup.json - */ -async function workloadNetworksUpdateVMGroup() { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1"; - const privateCloudName = "cloud1"; - const vmGroupId = "vmGroup1"; - const workloadNetworkVMGroup: WorkloadNetworkVMGroup = { - members: ["564d43da-fefc-2a3b-1d92-42855622fa50"], - revision: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.workloadNetworks.beginUpdateVMGroupAndWait( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - ); - console.log(result); -} - -async function main() { - workloadNetworksUpdateVMGroup(); -} - -main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples/v6/typescript/tsconfig.json b/sdk/avs/arm-avs/samples/v6/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/avs/arm-avs/src/api/addons/index.ts b/sdk/avs/arm-avs/src/api/addons/index.ts new file mode 100644 index 000000000000..ef86538a3847 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/addons/index.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AddonsCreateOrUpdateOptionalParams, + AddonsDeleteOptionalParams, + AddonsGetOptionalParams, + AddonsListOptionalParams, + AvsContext as Client, +} from "../index.js"; +import { + _AddonList, + _addonListDeserializer, + Addon, + addonSerializer, + addonDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _addonsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: AddonsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _addonsListDeserialize( + result: PathUncheckedResponse, +): Promise<_AddonList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _addonListDeserializer(result.body); +} + +/** List Addon resources by PrivateCloud */ +export function addonsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: AddonsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _addonsListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _addonsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _addonsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _addonsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return addonDeserializer(result.body); +} + +/** Get a Addon */ +export async function addonsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _addonsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + options, + ); + return _addonsGetDeserialize(result); +} + +export function _addonsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options: AddonsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: addonSerializer(addon), + }); +} + +export async function _addonsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return addonDeserializer(result.body); +} + +/** Create a Addon */ +export function addonsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options: AddonsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Addon> { + return getLongRunningPoller( + context, + _addonsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _addonsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + addon, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, Addon>; +} + +export function _addonsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _addonsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Addon */ +export function addonsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _addonsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _addonsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/authorizations/index.ts b/sdk/avs/arm-avs/src/api/authorizations/index.ts new file mode 100644 index 000000000000..7f02b255186a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/authorizations/index.ts @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsDeleteOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsListOptionalParams, + AvsContext as Client, +} from "../index.js"; +import { + _ExpressRouteAuthorizationList, + _expressRouteAuthorizationListDeserializer, + ExpressRouteAuthorization, + expressRouteAuthorizationSerializer, + expressRouteAuthorizationDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _authorizationsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: AuthorizationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _authorizationsListDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteAuthorizationList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _expressRouteAuthorizationListDeserializer(result.body); +} + +/** List ExpressRouteAuthorization resources by PrivateCloud */ +export function authorizationsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: AuthorizationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _authorizationsListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _authorizationsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _authorizationsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _authorizationsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return expressRouteAuthorizationDeserializer(result.body); +} + +/** Get a ExpressRouteAuthorization */ +export async function authorizationsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _authorizationsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + options, + ); + return _authorizationsGetDeserialize(result); +} + +export function _authorizationsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options: AuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: expressRouteAuthorizationSerializer(authorization), + }); +} + +export async function _authorizationsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return expressRouteAuthorizationDeserializer(result.body); +} + +/** Create a ExpressRouteAuthorization */ +export function authorizationsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options: AuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ExpressRouteAuthorization +> { + return getLongRunningPoller( + context, + _authorizationsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _authorizationsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + authorization, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + ExpressRouteAuthorization + >; +} + +export function _authorizationsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _authorizationsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a ExpressRouteAuthorization */ +export function authorizationsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _authorizationsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _authorizationsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/avsContext.ts b/sdk/avs/arm-avs/src/api/avsContext.ts new file mode 100644 index 000000000000..1bbdb433ff8b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/avsContext.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +export interface AvsContext extends Client {} + +/** Optional parameters for the client. */ +export interface AvsClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +export function createAvs( + credential: TokenCredential, + options: AvsClientOptionalParams = {}, +): AvsContext { + const endpointUrl = + options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-avs/1.0.0-beta.1`; + 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); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2023-09-01"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return clientContext; +} diff --git a/sdk/avs/arm-avs/src/api/cloudLinks/index.ts b/sdk/avs/arm-avs/src/api/cloudLinks/index.ts new file mode 100644 index 000000000000..f3265e90657f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/cloudLinks/index.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksDeleteOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksListOptionalParams, +} from "../index.js"; +import { + _CloudLinkList, + _cloudLinkListDeserializer, + CloudLink, + cloudLinkSerializer, + cloudLinkDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _cloudLinksListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: CloudLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _cloudLinksListDeserialize( + result: PathUncheckedResponse, +): Promise<_CloudLinkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _cloudLinkListDeserializer(result.body); +} + +/** List CloudLink resources by PrivateCloud */ +export function cloudLinksList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: CloudLinksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _cloudLinksListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _cloudLinksListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _cloudLinksGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _cloudLinksGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return cloudLinkDeserializer(result.body); +} + +/** Get a CloudLink */ +export async function cloudLinksGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _cloudLinksGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + options, + ); + return _cloudLinksGetDeserialize(result); +} + +export function _cloudLinksCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options: CloudLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: cloudLinkSerializer(cloudLink), + }); +} + +export async function _cloudLinksCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return cloudLinkDeserializer(result.body); +} + +/** Create a CloudLink */ +export function cloudLinksCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options: CloudLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, CloudLink> { + return getLongRunningPoller( + context, + _cloudLinksCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cloudLinksCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + cloudLink, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, CloudLink>; +} + +export function _cloudLinksDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _cloudLinksDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a CloudLink */ +export function cloudLinksDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _cloudLinksDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cloudLinksDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/clusters/index.ts b/sdk/avs/arm-avs/src/api/clusters/index.ts new file mode 100644 index 000000000000..a06ae4edc384 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/clusters/index.ts @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + ClustersCreateOrUpdateOptionalParams, + ClustersDeleteOptionalParams, + ClustersGetOptionalParams, + ClustersListOptionalParams, + ClustersListZonesOptionalParams, + ClustersUpdateOptionalParams, +} from "../index.js"; +import { + _ClusterList, + _clusterListDeserializer, + Cluster, + clusterSerializer, + clusterDeserializer, + ClusterUpdate, + clusterUpdateSerializer, + ClusterZoneList, + clusterZoneListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _clustersListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ClustersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _clustersListDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _clusterListDeserializer(result.body); +} + +/** List Cluster resources by PrivateCloud */ +export function clustersList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ClustersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _clustersListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _clustersListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _clustersGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _clustersGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return clusterDeserializer(result.body); +} + +/** Get a Cluster */ +export async function clustersGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _clustersGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ); + return _clustersGetDeserialize(result); +} + +export function _clustersCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: clusterSerializer(cluster), + }); +} + +export async function _clustersCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return clusterDeserializer(result.body); +} + +/** Create a Cluster */ +export function clustersCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cluster> { + return getLongRunningPoller( + context, + _clustersCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _clustersCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + cluster, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, Cluster>; +} + +export function _clustersUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: clusterUpdateSerializer(clusterUpdate), + }); +} + +export async function _clustersUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Update a Cluster */ +export function clustersUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _clustersUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _clustersUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + clusterUpdate, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _clustersDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _clustersDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Cluster */ +export function clustersDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _clustersDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _clustersDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _clustersListZonesSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersListZonesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _clustersListZonesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return clusterZoneListDeserializer(result.body); +} + +/** List hosts by zone in a cluster */ +export async function clustersListZones( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersListZonesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _clustersListZonesSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ); + return _clustersListZonesDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/datastores/index.ts b/sdk/avs/arm-avs/src/api/datastores/index.ts new file mode 100644 index 000000000000..c0b682849f45 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/datastores/index.ts @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + DatastoresCreateOrUpdateOptionalParams, + DatastoresDeleteOptionalParams, + DatastoresGetOptionalParams, + DatastoresListOptionalParams, +} from "../index.js"; +import { + _DatastoreList, + _datastoreListDeserializer, + Datastore, + datastoreSerializer, + datastoreDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _datastoresListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: DatastoresListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _datastoresListDeserialize( + result: PathUncheckedResponse, +): Promise<_DatastoreList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _datastoreListDeserializer(result.body); +} + +/** List Datastore resources by Cluster */ +export function datastoresList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: DatastoresListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _datastoresListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + _datastoresListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _datastoresGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _datastoresGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return datastoreDeserializer(result.body); +} + +/** Get a Datastore */ +export async function datastoresGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _datastoresGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ); + return _datastoresGetDeserialize(result); +} + +export function _datastoresCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options: DatastoresCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: datastoreSerializer(datastore), + }); +} + +export async function _datastoresCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return datastoreDeserializer(result.body); +} + +/** Create a Datastore */ +export function datastoresCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options: DatastoresCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Datastore> { + return getLongRunningPoller( + context, + _datastoresCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _datastoresCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + datastore, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, Datastore>; +} + +export function _datastoresDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _datastoresDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a Datastore */ +export function datastoresDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _datastoresDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _datastoresDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/globalReachConnections/index.ts b/sdk/avs/arm-avs/src/api/globalReachConnections/index.ts new file mode 100644 index 000000000000..29512fe1759a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/globalReachConnections/index.ts @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsDeleteOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsListOptionalParams, +} from "../index.js"; +import { + _GlobalReachConnectionList, + _globalReachConnectionListDeserializer, + GlobalReachConnection, + globalReachConnectionSerializer, + globalReachConnectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _globalReachConnectionsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: GlobalReachConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _globalReachConnectionsListDeserialize( + result: PathUncheckedResponse, +): Promise<_GlobalReachConnectionList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _globalReachConnectionListDeserializer(result.body); +} + +/** List GlobalReachConnection resources by PrivateCloud */ +export function globalReachConnectionsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: GlobalReachConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _globalReachConnectionsListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _globalReachConnectionsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _globalReachConnectionsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _globalReachConnectionsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return globalReachConnectionDeserializer(result.body); +} + +/** Get a GlobalReachConnection */ +export async function globalReachConnectionsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _globalReachConnectionsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ); + return _globalReachConnectionsGetDeserialize(result); +} + +export function _globalReachConnectionsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options: GlobalReachConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: globalReachConnectionSerializer(globalReachConnection), + }); +} + +export async function _globalReachConnectionsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return globalReachConnectionDeserializer(result.body); +} + +/** Create a GlobalReachConnection */ +export function globalReachConnectionsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options: GlobalReachConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, GlobalReachConnection> { + return getLongRunningPoller( + context, + _globalReachConnectionsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _globalReachConnectionsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + globalReachConnection, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, GlobalReachConnection>; +} + +export function _globalReachConnectionsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _globalReachConnectionsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a GlobalReachConnection */ +export function globalReachConnectionsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _globalReachConnectionsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _globalReachConnectionsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/index.ts b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/index.ts new file mode 100644 index 000000000000..7bc5efd9747b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/index.ts @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesDeleteOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesListOptionalParams, +} from "../index.js"; +import { + _HcxEnterpriseSiteList, + _hcxEnterpriseSiteListDeserializer, + HcxEnterpriseSite, + hcxEnterpriseSiteSerializer, + hcxEnterpriseSiteDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _hcxEnterpriseSitesListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: HcxEnterpriseSitesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _hcxEnterpriseSitesListDeserialize( + result: PathUncheckedResponse, +): Promise<_HcxEnterpriseSiteList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _hcxEnterpriseSiteListDeserializer(result.body); +} + +/** List HcxEnterpriseSite resources by PrivateCloud */ +export function hcxEnterpriseSitesList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: HcxEnterpriseSitesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _hcxEnterpriseSitesListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _hcxEnterpriseSitesListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _hcxEnterpriseSitesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _hcxEnterpriseSitesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return hcxEnterpriseSiteDeserializer(result.body); +} + +/** Get a HcxEnterpriseSite */ +export async function hcxEnterpriseSitesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _hcxEnterpriseSitesGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ); + return _hcxEnterpriseSitesGetDeserialize(result); +} + +export function _hcxEnterpriseSitesCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options: HcxEnterpriseSitesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: hcxEnterpriseSiteSerializer(hcxEnterpriseSite), + }); +} + +export async function _hcxEnterpriseSitesCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return hcxEnterpriseSiteDeserializer(result.body); +} + +/** Create a HcxEnterpriseSite */ +export async function hcxEnterpriseSitesCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options: HcxEnterpriseSitesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _hcxEnterpriseSitesCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + hcxEnterpriseSite, + options, + ); + return _hcxEnterpriseSitesCreateOrUpdateDeserialize(result); +} + +export function _hcxEnterpriseSitesDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _hcxEnterpriseSitesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a HcxEnterpriseSite */ +export async function hcxEnterpriseSitesDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _hcxEnterpriseSitesDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ); + return _hcxEnterpriseSitesDeleteDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/index.ts b/sdk/avs/arm-avs/src/api/index.ts new file mode 100644 index 000000000000..f078f2aa4fca --- /dev/null +++ b/sdk/avs/arm-avs/src/api/index.ts @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + createAvs, + AvsContext, + AvsClientOptionalParams, +} from "./avsContext.js"; +export { + OperationsListOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, + LocationsCheckQuotaAvailabilityOptionalParams, + PrivateCloudsListOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsListAdminCredentialsOptionalParams, + ClustersListOptionalParams, + ClustersGetOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersUpdateOptionalParams, + ClustersDeleteOptionalParams, + ClustersListZonesOptionalParams, + DatastoresListOptionalParams, + DatastoresGetOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresDeleteOptionalParams, + HcxEnterpriseSitesListOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesDeleteOptionalParams, + AuthorizationsListOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsDeleteOptionalParams, + GlobalReachConnectionsListOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsDeleteOptionalParams, + CloudLinksListOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksDeleteOptionalParams, + AddonsListOptionalParams, + AddonsGetOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsDeleteOptionalParams, + VirtualMachinesListOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesRestrictMovementOptionalParams, + PlacementPoliciesListOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesDeleteOptionalParams, + ScriptPackagesListOptionalParams, + ScriptPackagesGetOptionalParams, + ScriptCmdletsListOptionalParams, + ScriptCmdletsGetOptionalParams, + ScriptExecutionsListOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsGetExecutionLogsOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsDeleteOptionalParams, + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, + WorkloadNetworksListSegmentsOptionalParams, + WorkloadNetworksGetSegmentOptionalParams, + WorkloadNetworksCreateSegmentOptionalParams, + WorkloadNetworksUpdateSegmentOptionalParams, + WorkloadNetworksDeleteSegmentOptionalParams, + WorkloadNetworksListDhcpOptionalParams, + WorkloadNetworksGetDhcpOptionalParams, + WorkloadNetworksCreateDhcpOptionalParams, + WorkloadNetworksUpdateDhcpOptionalParams, + WorkloadNetworksDeleteDhcpOptionalParams, + WorkloadNetworksListGatewaysOptionalParams, + WorkloadNetworksGetGatewayOptionalParams, + WorkloadNetworksListPortMirroringOptionalParams, + WorkloadNetworksGetPortMirroringOptionalParams, + WorkloadNetworksCreatePortMirroringOptionalParams, + WorkloadNetworksUpdatePortMirroringOptionalParams, + WorkloadNetworksDeletePortMirroringOptionalParams, + WorkloadNetworksListVMGroupsOptionalParams, + WorkloadNetworksGetVMGroupOptionalParams, + WorkloadNetworksCreateVMGroupOptionalParams, + WorkloadNetworksUpdateVMGroupOptionalParams, + WorkloadNetworksDeleteVMGroupOptionalParams, + WorkloadNetworksListVirtualMachinesOptionalParams, + WorkloadNetworksGetVirtualMachineOptionalParams, + WorkloadNetworksListDnsServicesOptionalParams, + WorkloadNetworksGetDnsServiceOptionalParams, + WorkloadNetworksCreateDnsServiceOptionalParams, + WorkloadNetworksUpdateDnsServiceOptionalParams, + WorkloadNetworksDeleteDnsServiceOptionalParams, + WorkloadNetworksListDnsZonesOptionalParams, + WorkloadNetworksGetDnsZoneOptionalParams, + WorkloadNetworksCreateDnsZoneOptionalParams, + WorkloadNetworksUpdateDnsZoneOptionalParams, + WorkloadNetworksDeleteDnsZoneOptionalParams, + WorkloadNetworksListPublicIPsOptionalParams, + WorkloadNetworksGetPublicIPOptionalParams, + WorkloadNetworksCreatePublicIPOptionalParams, + WorkloadNetworksDeletePublicIPOptionalParams, +} from "./options.js"; +export { + addonsList, + addonsGet, + addonsCreateOrUpdate, + addonsDelete, +} from "./addons/index.js"; +export { + authorizationsList, + authorizationsGet, + authorizationsCreateOrUpdate, + authorizationsDelete, +} from "./authorizations/index.js"; +export { + cloudLinksList, + cloudLinksGet, + cloudLinksCreateOrUpdate, + cloudLinksDelete, +} from "./cloudLinks/index.js"; +export { + clustersList, + clustersGet, + clustersCreateOrUpdate, + clustersUpdate, + clustersDelete, + clustersListZones, +} from "./clusters/index.js"; +export { + datastoresList, + datastoresGet, + datastoresCreateOrUpdate, + datastoresDelete, +} from "./datastores/index.js"; +export { + globalReachConnectionsList, + globalReachConnectionsGet, + globalReachConnectionsCreateOrUpdate, + globalReachConnectionsDelete, +} from "./globalReachConnections/index.js"; +export { + hcxEnterpriseSitesList, + hcxEnterpriseSitesGet, + hcxEnterpriseSitesCreateOrUpdate, + hcxEnterpriseSitesDelete, +} from "./hcxEnterpriseSites/index.js"; +export { + iscsiPathsListByPrivateCloud, + iscsiPathsGet, + iscsiPathsCreateOrUpdate, + iscsiPathsDelete, +} from "./iscsiPaths/index.js"; +export { + locationsCheckTrialAvailability, + locationsCheckQuotaAvailability, +} from "./locations/index.js"; +export { operationsList } from "./operations/index.js"; +export { + placementPoliciesList, + placementPoliciesGet, + placementPoliciesCreateOrUpdate, + placementPoliciesUpdate, + placementPoliciesDelete, +} from "./placementPolicies/index.js"; +export { + privateCloudsList, + privateCloudsListInSubscription, + privateCloudsGet, + privateCloudsCreateOrUpdate, + privateCloudsUpdate, + privateCloudsDelete, + privateCloudsRotateVcenterPassword, + privateCloudsRotateNsxtPassword, + privateCloudsListAdminCredentials, +} from "./privateClouds/index.js"; +export { scriptCmdletsList, scriptCmdletsGet } from "./scriptCmdlets/index.js"; +export { + scriptExecutionsList, + scriptExecutionsGet, + scriptExecutionsCreateOrUpdate, + scriptExecutionsDelete, + scriptExecutionsGetExecutionLogs, +} from "./scriptExecutions/index.js"; +export { + scriptPackagesList, + scriptPackagesGet, +} from "./scriptPackages/index.js"; +export { + virtualMachinesList, + virtualMachinesGet, + virtualMachinesRestrictMovement, +} from "./virtualMachines/index.js"; +export { + workloadNetworksList, + workloadNetworksGet, + workloadNetworksListSegments, + workloadNetworksGetSegment, + workloadNetworksCreateSegment, + workloadNetworksUpdateSegment, + workloadNetworksDeleteSegment, + workloadNetworksListDhcp, + workloadNetworksGetDhcp, + workloadNetworksCreateDhcp, + workloadNetworksUpdateDhcp, + workloadNetworksDeleteDhcp, + workloadNetworksListGateways, + workloadNetworksGetGateway, + workloadNetworksListPortMirroring, + workloadNetworksGetPortMirroring, + workloadNetworksCreatePortMirroring, + workloadNetworksUpdatePortMirroring, + workloadNetworksDeletePortMirroring, + workloadNetworksListVMGroups, + workloadNetworksGetVMGroup, + workloadNetworksCreateVMGroup, + workloadNetworksUpdateVMGroup, + workloadNetworksDeleteVMGroup, + workloadNetworksListVirtualMachines, + workloadNetworksGetVirtualMachine, + workloadNetworksListDnsServices, + workloadNetworksGetDnsService, + workloadNetworksCreateDnsService, + workloadNetworksUpdateDnsService, + workloadNetworksDeleteDnsService, + workloadNetworksListDnsZones, + workloadNetworksGetDnsZone, + workloadNetworksCreateDnsZone, + workloadNetworksUpdateDnsZone, + workloadNetworksDeleteDnsZone, + workloadNetworksListPublicIPs, + workloadNetworksGetPublicIP, + workloadNetworksCreatePublicIP, + workloadNetworksDeletePublicIP, +} from "./workloadNetworks/index.js"; diff --git a/sdk/avs/arm-avs/src/api/iscsiPaths/index.ts b/sdk/avs/arm-avs/src/api/iscsiPaths/index.ts new file mode 100644 index 000000000000..8979856acbcc --- /dev/null +++ b/sdk/avs/arm-avs/src/api/iscsiPaths/index.ts @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsDeleteOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, +} from "../index.js"; +import { + _IscsiPathListResult, + _iscsiPathListResultDeserializer, + IscsiPath, + iscsiPathSerializer, + iscsiPathDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _iscsiPathsListByPrivateCloudSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsListByPrivateCloudOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _iscsiPathsListByPrivateCloudDeserialize( + result: PathUncheckedResponse, +): Promise<_IscsiPathListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _iscsiPathListResultDeserializer(result.body); +} + +/** List IscsiPath resources by PrivateCloud */ +export function iscsiPathsListByPrivateCloud( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsListByPrivateCloudOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _iscsiPathsListByPrivateCloudSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _iscsiPathsListByPrivateCloudDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _iscsiPathsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options: IscsiPathsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}", + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _iscsiPathsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return iscsiPathDeserializer(result.body); +} + +/** Get a IscsiPath */ +export async function iscsiPathsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options: IscsiPathsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _iscsiPathsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + options, + ); + return _iscsiPathsGetDeserialize(result); +} + +export function _iscsiPathsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + resource: IscsiPath, + options: IscsiPathsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}", + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: iscsiPathSerializer(resource), + }); +} + +export async function _iscsiPathsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return iscsiPathDeserializer(result.body); +} + +/** Create a IscsiPath */ +export function iscsiPathsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + resource: IscsiPath, + options: IscsiPathsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IscsiPath> { + return getLongRunningPoller( + context, + _iscsiPathsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _iscsiPathsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, IscsiPath>; +} + +export function _iscsiPathsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options: IscsiPathsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}", + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _iscsiPathsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a IscsiPath */ +export function iscsiPathsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options: IscsiPathsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _iscsiPathsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _iscsiPathsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/locations/index.ts b/sdk/avs/arm-avs/src/api/locations/index.ts new file mode 100644 index 000000000000..4ced025fa729 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/locations/index.ts @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + LocationsCheckQuotaAvailabilityOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, +} from "../index.js"; +import { + skuSerializer, + Trial, + trialDeserializer, + Quota, + quotaDeserializer, +} from "../../models/models.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _locationsCheckTrialAvailabilitySend( + context: Client, + subscriptionId: string, + location: string, + options: LocationsCheckTrialAvailabilityOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", + subscriptionId, + location, + ) + .post({ + ...operationOptionsToRequestParameters(options), + body: !options["sku"] ? options["sku"] : skuSerializer(options["sku"]), + }); +} + +export async function _locationsCheckTrialAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return trialDeserializer(result.body); +} + +/** Return trial status for subscription by region */ +export async function locationsCheckTrialAvailability( + context: Client, + subscriptionId: string, + location: string, + options: LocationsCheckTrialAvailabilityOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _locationsCheckTrialAvailabilitySend( + context, + subscriptionId, + location, + options, + ); + return _locationsCheckTrialAvailabilityDeserialize(result); +} + +export function _locationsCheckQuotaAvailabilitySend( + context: Client, + subscriptionId: string, + location: string, + options: LocationsCheckQuotaAvailabilityOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", + subscriptionId, + location, + ) + .post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _locationsCheckQuotaAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return quotaDeserializer(result.body); +} + +/** Return quota for subscription by region */ +export async function locationsCheckQuotaAvailability( + context: Client, + subscriptionId: string, + location: string, + options: LocationsCheckQuotaAvailabilityOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _locationsCheckQuotaAvailabilitySend( + context, + subscriptionId, + location, + options, + ); + return _locationsCheckQuotaAvailabilityDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/operations/index.ts b/sdk/avs/arm-avs/src/api/operations/index.ts new file mode 100644 index 000000000000..e5c598dc6560 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/operations/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + OperationsListOptionalParams, +} from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationsListSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path("/providers/Microsoft.AVS/operations") + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _operationsListDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function operationsList( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _operationsListSend(context, options), + _operationsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/options.ts b/sdk/avs/arm-avs/src/api/options.ts new file mode 100644 index 000000000000..5428bbacec8e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/options.ts @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; +import { Sku, ScriptOutputStreamType } from "../models/models.js"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LocationsCheckTrialAvailabilityOptionalParams + extends OperationOptions { + /** Optionally, check for a specific SKU */ + sku?: Sku; +} + +/** Optional parameters. */ +export interface LocationsCheckQuotaAvailabilityOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsListInSubscriptionOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsRotateVcenterPasswordOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsRotateNsxtPasswordOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsListAdminCredentialsOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface ClustersListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClustersGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClustersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersListZonesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DatastoresListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DatastoresGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DatastoresCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DatastoresDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesListOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesCreateOrUpdateOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesDeleteOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationsCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AuthorizationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GlobalReachConnectionsListOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface GlobalReachConnectionsGetOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface GlobalReachConnectionsCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GlobalReachConnectionsDeleteOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudLinksListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudLinksGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudLinksCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudLinksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AddonsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AddonsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AddonsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AddonsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachinesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachinesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachinesRestrictMovementOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PlacementPoliciesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PlacementPoliciesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PlacementPoliciesCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PlacementPoliciesUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PlacementPoliciesDeleteOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ScriptPackagesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptPackagesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptCmdletsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptCmdletsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptExecutionsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptExecutionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptExecutionsCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ScriptExecutionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ScriptExecutionsGetExecutionLogsOptionalParams + extends OperationOptions { + /** Name of the desired output stream to return. If not provided, will return all. An empty array will return nothing. */ + scriptOutputStreamType?: ScriptOutputStreamType[]; +} + +/** Optional parameters. */ +export interface IscsiPathsListByPrivateCloudOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface IscsiPathsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IscsiPathsCreateOrUpdateOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IscsiPathsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksListSegmentsOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetSegmentOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreateSegmentOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdateSegmentOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeleteSegmentOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListDhcpOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetDhcpOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreateDhcpOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdateDhcpOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeleteDhcpOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListGatewaysOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetGatewayOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksListPortMirroringOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetPortMirroringOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreatePortMirroringOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdatePortMirroringOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeletePortMirroringOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListVMGroupsOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetVMGroupOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreateVMGroupOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdateVMGroupOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeleteVMGroupOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListVirtualMachinesOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetVirtualMachineOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksListDnsServicesOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetDnsServiceOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreateDnsServiceOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdateDnsServiceOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeleteDnsServiceOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListDnsZonesOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetDnsZoneOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreateDnsZoneOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksUpdateDnsZoneOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeleteDnsZoneOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksListPublicIPsOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetPublicIPOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksCreatePublicIPOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworksDeletePublicIPOptionalParams + extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/avs/arm-avs/src/api/placementPolicies/index.ts b/sdk/avs/arm-avs/src/api/placementPolicies/index.ts new file mode 100644 index 000000000000..250763c655e6 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/placementPolicies/index.ts @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesDeleteOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesListOptionalParams, + PlacementPoliciesUpdateOptionalParams, +} from "../index.js"; +import { + _PlacementPoliciesList, + _placementPoliciesListDeserializer, + PlacementPolicy, + placementPolicySerializer, + placementPolicyDeserializer, + PlacementPolicyUpdate, + placementPolicyUpdateSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _placementPoliciesListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: PlacementPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _placementPoliciesListDeserialize( + result: PathUncheckedResponse, +): Promise<_PlacementPoliciesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _placementPoliciesListDeserializer(result.body); +} + +/** List PlacementPolicy resources by Cluster */ +export function placementPoliciesList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: PlacementPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _placementPoliciesListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + _placementPoliciesListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _placementPoliciesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _placementPoliciesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return placementPolicyDeserializer(result.body); +} + +/** Get a PlacementPolicy */ +export async function placementPoliciesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _placementPoliciesGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ); + return _placementPoliciesGetDeserialize(result); +} + +export function _placementPoliciesCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options: PlacementPoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: placementPolicySerializer(placementPolicy), + }); +} + +export async function _placementPoliciesCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return placementPolicyDeserializer(result.body); +} + +/** Create a PlacementPolicy */ +export function placementPoliciesCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options: PlacementPoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PlacementPolicy> { + return getLongRunningPoller( + context, + _placementPoliciesCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _placementPoliciesCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicy, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, PlacementPolicy>; +} + +export function _placementPoliciesUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options: PlacementPoliciesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: placementPolicyUpdateSerializer(placementPolicyUpdate), + }); +} + +export async function _placementPoliciesUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Update a PlacementPolicy */ +export function placementPoliciesUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options: PlacementPoliciesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _placementPoliciesUpdateDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _placementPoliciesUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicyUpdate, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _placementPoliciesDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _placementPoliciesDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a PlacementPolicy */ +export function placementPoliciesDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _placementPoliciesDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _placementPoliciesDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/privateClouds/index.ts b/sdk/avs/arm-avs/src/api/privateClouds/index.ts new file mode 100644 index 000000000000..cc7e49803b8c --- /dev/null +++ b/sdk/avs/arm-avs/src/api/privateClouds/index.ts @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsListAdminCredentialsOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsListOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsUpdateOptionalParams, +} from "../index.js"; +import { + _PrivateCloudList, + _privateCloudListDeserializer, + PrivateCloud, + privateCloudSerializer, + privateCloudDeserializer, + PrivateCloudUpdate, + privateCloudUpdateSerializer, + AdminCredentials, + adminCredentialsDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _privateCloudsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: PrivateCloudsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", + subscriptionId, + resourceGroupName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsListDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateCloudList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _privateCloudListDeserializer(result.body); +} + +/** List PrivateCloud resources by resource group */ +export function privateCloudsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + options: PrivateCloudsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _privateCloudsListSend( + context, + subscriptionId, + resourceGroupName, + options, + ), + _privateCloudsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _privateCloudsListInSubscriptionSend( + context: Client, + subscriptionId: string, + options: PrivateCloudsListInSubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", + subscriptionId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsListInSubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateCloudList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _privateCloudListDeserializer(result.body); +} + +/** List PrivateCloud resources by subscription ID */ +export function privateCloudsListInSubscription( + context: Client, + subscriptionId: string, + options: PrivateCloudsListInSubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _privateCloudsListInSubscriptionSend(context, subscriptionId, options), + _privateCloudsListInSubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _privateCloudsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return privateCloudDeserializer(result.body); +} + +/** Get a PrivateCloud */ +export async function privateCloudsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _privateCloudsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ); + return _privateCloudsGetDeserialize(result); +} + +export function _privateCloudsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options: PrivateCloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: privateCloudSerializer(privateCloud), + }); +} + +export async function _privateCloudsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return privateCloudDeserializer(result.body); +} + +/** Create a PrivateCloud */ +export function privateCloudsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options: PrivateCloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateCloud> { + return getLongRunningPoller( + context, + _privateCloudsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _privateCloudsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + privateCloud, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, PrivateCloud>; +} + +export function _privateCloudsUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options: PrivateCloudsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: privateCloudUpdateSerializer(privateCloudUpdate), + }); +} + +export async function _privateCloudsUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Update a PrivateCloud */ +export function privateCloudsUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options: PrivateCloudsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _privateCloudsUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _privateCloudsUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + privateCloudUpdate, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _privateCloudsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a PrivateCloud */ +export function privateCloudsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _privateCloudsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _privateCloudsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _privateCloudsRotateVcenterPasswordSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateVcenterPasswordOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsRotateVcenterPasswordDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Rotate the vCenter password */ +export function privateCloudsRotateVcenterPassword( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateVcenterPasswordOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _privateCloudsRotateVcenterPasswordDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _privateCloudsRotateVcenterPasswordSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _privateCloudsRotateNsxtPasswordSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateNsxtPasswordOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsRotateNsxtPasswordDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Rotate the NSX-T Manager password */ +export function privateCloudsRotateNsxtPassword( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateNsxtPasswordOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _privateCloudsRotateNsxtPasswordDeserialize, + ["202", "204", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _privateCloudsRotateNsxtPasswordSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _privateCloudsListAdminCredentialsSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsListAdminCredentialsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _privateCloudsListAdminCredentialsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return adminCredentialsDeserializer(result.body); +} + +/** List the admin credentials for the private cloud */ +export async function privateCloudsListAdminCredentials( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsListAdminCredentialsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _privateCloudsListAdminCredentialsSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ); + return _privateCloudsListAdminCredentialsDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/scriptCmdlets/index.ts b/sdk/avs/arm-avs/src/api/scriptCmdlets/index.ts new file mode 100644 index 000000000000..943cee167ccb --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptCmdlets/index.ts @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + ScriptCmdletsGetOptionalParams, + ScriptCmdletsListOptionalParams, +} from "../index.js"; +import { + _ScriptCmdletsList, + _scriptCmdletsListDeserializer, + ScriptCmdlet, + scriptCmdletDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _scriptCmdletsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptCmdletsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptCmdletsListDeserialize( + result: PathUncheckedResponse, +): Promise<_ScriptCmdletsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _scriptCmdletsListDeserializer(result.body); +} + +/** List ScriptCmdlet resources by ScriptPackage */ +export function scriptCmdletsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptCmdletsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _scriptCmdletsListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + options, + ), + _scriptCmdletsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _scriptCmdletsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options: ScriptCmdletsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptCmdletsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return scriptCmdletDeserializer(result.body); +} + +/** Get a ScriptCmdlet */ +export async function scriptCmdletsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options: ScriptCmdletsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _scriptCmdletsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + options, + ); + return _scriptCmdletsGetDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/scriptExecutions/index.ts b/sdk/avs/arm-avs/src/api/scriptExecutions/index.ts new file mode 100644 index 000000000000..52636e2d2134 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptExecutions/index.ts @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsGetExecutionLogsOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsListOptionalParams, +} from "../index.js"; +import { + _ScriptExecutionsList, + _scriptExecutionsListDeserializer, + ScriptExecution, + scriptExecutionSerializer, + scriptExecutionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _scriptExecutionsListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ScriptExecutionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptExecutionsListDeserialize( + result: PathUncheckedResponse, +): Promise<_ScriptExecutionsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _scriptExecutionsListDeserializer(result.body); +} + +/** List ScriptExecution resources by PrivateCloud */ +export function scriptExecutionsList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ScriptExecutionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _scriptExecutionsListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _scriptExecutionsListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _scriptExecutionsGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptExecutionsGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return scriptExecutionDeserializer(result.body); +} + +/** Get a ScriptExecution */ +export async function scriptExecutionsGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _scriptExecutionsGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ); + return _scriptExecutionsGetDeserialize(result); +} + +export function _scriptExecutionsCreateOrUpdateSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options: ScriptExecutionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: scriptExecutionSerializer(scriptExecution), + }); +} + +export async function _scriptExecutionsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return scriptExecutionDeserializer(result.body); +} + +/** Create a ScriptExecution */ +export function scriptExecutionsCreateOrUpdate( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options: ScriptExecutionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, ScriptExecution> { + return getLongRunningPoller( + context, + _scriptExecutionsCreateOrUpdateDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _scriptExecutionsCreateOrUpdateSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + scriptExecution, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, ScriptExecution>; +} + +export function _scriptExecutionsDeleteSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptExecutionsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a ScriptExecution */ +export function scriptExecutionsDelete( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _scriptExecutionsDeleteDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _scriptExecutionsDeleteSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _scriptExecutionsGetExecutionLogsSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetExecutionLogsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + body: !options["scriptOutputStreamType"] + ? options["scriptOutputStreamType"] + : !options["scriptOutputStreamType"] + ? options["scriptOutputStreamType"] + : options["scriptOutputStreamType"].map((p: any) => { + return p; + }), + }); +} + +export async function _scriptExecutionsGetExecutionLogsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return scriptExecutionDeserializer(result.body); +} + +/** Return the logs for a script execution resource */ +export async function scriptExecutionsGetExecutionLogs( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetExecutionLogsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _scriptExecutionsGetExecutionLogsSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ); + return _scriptExecutionsGetExecutionLogsDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/scriptPackages/index.ts b/sdk/avs/arm-avs/src/api/scriptPackages/index.ts new file mode 100644 index 000000000000..5177f0d10ec9 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptPackages/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + ScriptPackagesGetOptionalParams, + ScriptPackagesListOptionalParams, +} from "../index.js"; +import { + _ScriptPackagesList, + _scriptPackagesListDeserializer, + ScriptPackage, + scriptPackageDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _scriptPackagesListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ScriptPackagesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptPackagesListDeserialize( + result: PathUncheckedResponse, +): Promise<_ScriptPackagesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _scriptPackagesListDeserializer(result.body); +} + +/** List ScriptPackage resources by PrivateCloud */ +export function scriptPackagesList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: ScriptPackagesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _scriptPackagesListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _scriptPackagesListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _scriptPackagesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptPackagesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _scriptPackagesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return scriptPackageDeserializer(result.body); +} + +/** Get a ScriptPackage */ +export async function scriptPackagesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptPackagesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _scriptPackagesGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + options, + ); + return _scriptPackagesGetDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/virtualMachines/index.ts b/sdk/avs/arm-avs/src/api/virtualMachines/index.ts new file mode 100644 index 000000000000..38e41ef40a2a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/virtualMachines/index.ts @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + VirtualMachinesGetOptionalParams, + VirtualMachinesListOptionalParams, + VirtualMachinesRestrictMovementOptionalParams, +} from "../index.js"; +import { + _VirtualMachinesList, + _virtualMachinesListDeserializer, + VirtualMachine, + virtualMachineDeserializer, + VirtualMachineRestrictMovement, + virtualMachineRestrictMovementSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _virtualMachinesListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: VirtualMachinesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _virtualMachinesListDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachinesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _virtualMachinesListDeserializer(result.body); +} + +/** List VirtualMachine resources by Cluster */ +export function virtualMachinesList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: VirtualMachinesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _virtualMachinesListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + _virtualMachinesListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _virtualMachinesGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _virtualMachinesGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return virtualMachineDeserializer(result.body); +} + +/** Get a VirtualMachine */ +export async function virtualMachinesGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _virtualMachinesGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + options, + ); + return _virtualMachinesGetDeserialize(result); +} + +export function _virtualMachinesRestrictMovementSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options: VirtualMachinesRestrictMovementOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + ) + .post({ + ...operationOptionsToRequestParameters(options), + body: virtualMachineRestrictMovementSerializer(restrictMovementParameter), + }); +} + +export async function _virtualMachinesRestrictMovementDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Enable or disable DRS-driven VM movement restriction */ +export function virtualMachinesRestrictMovement( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options: VirtualMachinesRestrictMovementOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _virtualMachinesRestrictMovementDeserialize, + ["202", "200"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _virtualMachinesRestrictMovementSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + restrictMovementParameter, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworks/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworks/index.ts new file mode 100644 index 000000000000..f209f357596a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworks/index.ts @@ -0,0 +1,2637 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + AvsContext as Client, + WorkloadNetworksCreateDhcpOptionalParams, + WorkloadNetworksCreateDnsServiceOptionalParams, + WorkloadNetworksCreateDnsZoneOptionalParams, + WorkloadNetworksCreatePortMirroringOptionalParams, + WorkloadNetworksCreatePublicIPOptionalParams, + WorkloadNetworksCreateSegmentOptionalParams, + WorkloadNetworksCreateVMGroupOptionalParams, + WorkloadNetworksDeleteDhcpOptionalParams, + WorkloadNetworksDeleteDnsServiceOptionalParams, + WorkloadNetworksDeleteDnsZoneOptionalParams, + WorkloadNetworksDeletePortMirroringOptionalParams, + WorkloadNetworksDeletePublicIPOptionalParams, + WorkloadNetworksDeleteSegmentOptionalParams, + WorkloadNetworksDeleteVMGroupOptionalParams, + WorkloadNetworksGetDhcpOptionalParams, + WorkloadNetworksGetDnsServiceOptionalParams, + WorkloadNetworksGetDnsZoneOptionalParams, + WorkloadNetworksGetGatewayOptionalParams, + WorkloadNetworksGetOptionalParams, + WorkloadNetworksGetPortMirroringOptionalParams, + WorkloadNetworksGetPublicIPOptionalParams, + WorkloadNetworksGetSegmentOptionalParams, + WorkloadNetworksGetVirtualMachineOptionalParams, + WorkloadNetworksGetVMGroupOptionalParams, + WorkloadNetworksListDhcpOptionalParams, + WorkloadNetworksListDnsServicesOptionalParams, + WorkloadNetworksListDnsZonesOptionalParams, + WorkloadNetworksListGatewaysOptionalParams, + WorkloadNetworksListOptionalParams, + WorkloadNetworksListPortMirroringOptionalParams, + WorkloadNetworksListPublicIPsOptionalParams, + WorkloadNetworksListSegmentsOptionalParams, + WorkloadNetworksListVirtualMachinesOptionalParams, + WorkloadNetworksListVMGroupsOptionalParams, + WorkloadNetworksUpdateDhcpOptionalParams, + WorkloadNetworksUpdateDnsServiceOptionalParams, + WorkloadNetworksUpdateDnsZoneOptionalParams, + WorkloadNetworksUpdatePortMirroringOptionalParams, + WorkloadNetworksUpdateSegmentOptionalParams, + WorkloadNetworksUpdateVMGroupOptionalParams, +} from "../index.js"; +import { + _WorkloadNetworkList, + _workloadNetworkListDeserializer, + WorkloadNetwork, + workloadNetworkDeserializer, + _WorkloadNetworkSegmentsList, + _workloadNetworkSegmentsListDeserializer, + WorkloadNetworkSegment, + workloadNetworkSegmentSerializer, + workloadNetworkSegmentDeserializer, + _WorkloadNetworkDhcpList, + _workloadNetworkDhcpListDeserializer, + WorkloadNetworkDhcp, + workloadNetworkDhcpSerializer, + workloadNetworkDhcpDeserializer, + _WorkloadNetworkGatewayList, + _workloadNetworkGatewayListDeserializer, + WorkloadNetworkGateway, + workloadNetworkGatewayDeserializer, + _WorkloadNetworkPortMirroringList, + _workloadNetworkPortMirroringListDeserializer, + WorkloadNetworkPortMirroring, + workloadNetworkPortMirroringSerializer, + workloadNetworkPortMirroringDeserializer, + _WorkloadNetworkVMGroupsList, + _workloadNetworkVMGroupsListDeserializer, + WorkloadNetworkVMGroup, + workloadNetworkVMGroupSerializer, + workloadNetworkVMGroupDeserializer, + _WorkloadNetworkVirtualMachinesList, + _workloadNetworkVirtualMachinesListDeserializer, + WorkloadNetworkVirtualMachine, + workloadNetworkVirtualMachineDeserializer, + _WorkloadNetworkDnsServicesList, + _workloadNetworkDnsServicesListDeserializer, + WorkloadNetworkDnsService, + workloadNetworkDnsServiceSerializer, + workloadNetworkDnsServiceDeserializer, + _WorkloadNetworkDnsZonesList, + _workloadNetworkDnsZonesListDeserializer, + WorkloadNetworkDnsZone, + workloadNetworkDnsZoneSerializer, + workloadNetworkDnsZoneDeserializer, + _WorkloadNetworkPublicIPsList, + _workloadNetworkPublicIPsListDeserializer, + WorkloadNetworkPublicIP, + workloadNetworkPublicIPSerializer, + workloadNetworkPublicIPDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _workloadNetworksListSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks", + subscriptionId, + resourceGroupName, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkListDeserializer(result.body); +} + +/** List WorkloadNetwork resources by PrivateCloud */ +export function workloadNetworksList( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + _workloadNetworksListDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDeserializer(result.body); +} + +/** Get a WorkloadNetwork */ +export async function workloadNetworksGet( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ); + return _workloadNetworksGetDeserialize(result); +} + +export function _workloadNetworksListSegmentsSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListSegmentsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListSegmentsDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkSegmentsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkSegmentsListDeserializer(result.body); +} + +/** List WorkloadNetworkSegment resources by WorkloadNetwork */ +export function workloadNetworksListSegments( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListSegmentsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListSegmentsSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListSegmentsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetSegmentSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options: WorkloadNetworksGetSegmentOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetSegmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Get a WorkloadNetworkSegment */ +export async function workloadNetworksGetSegment( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options: WorkloadNetworksGetSegmentOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetSegmentSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + options, + ); + return _workloadNetworksGetSegmentDeserialize(result); +} + +export function _workloadNetworksCreateSegmentSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworksCreateSegmentOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkSegmentSerializer(workloadNetworkSegment), + }); +} + +export async function _workloadNetworksCreateSegmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Create a WorkloadNetworkSegment */ +export function workloadNetworksCreateSegment( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworksCreateSegmentOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkSegment> { + return getLongRunningPoller( + context, + _workloadNetworksCreateSegmentDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreateSegmentSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + workloadNetworkSegment, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkSegment + >; +} + +export function _workloadNetworksUpdateSegmentSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworksUpdateSegmentOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkSegmentSerializer(workloadNetworkSegment), + }); +} + +export async function _workloadNetworksUpdateSegmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Update a WorkloadNetworkSegment */ +export function workloadNetworksUpdateSegment( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworksUpdateSegmentOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkSegment> { + return getLongRunningPoller( + context, + _workloadNetworksUpdateSegmentDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdateSegmentSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + workloadNetworkSegment, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkSegment + >; +} + +export function _workloadNetworksDeleteSegmentSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options: WorkloadNetworksDeleteSegmentOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeleteSegmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkSegment */ +export function workloadNetworksDeleteSegment( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options: WorkloadNetworksDeleteSegmentOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeleteSegmentDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeleteSegmentSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListDhcpSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDhcpOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListDhcpDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDhcpList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkDhcpListDeserializer(result.body); +} + +/** List WorkloadNetworkDhcp resources by WorkloadNetwork */ +export function workloadNetworksListDhcp( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDhcpOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListDhcpSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListDhcpDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetDhcpSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options: WorkloadNetworksGetDhcpOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + subscriptionId, + resourceGroupName, + dhcpId, + privateCloudName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetDhcpDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Get a WorkloadNetworkDhcp */ +export async function workloadNetworksGetDhcp( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options: WorkloadNetworksGetDhcpOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetDhcpSend( + context, + subscriptionId, + resourceGroupName, + dhcpId, + privateCloudName, + options, + ); + return _workloadNetworksGetDhcpDeserialize(result); +} + +export function _workloadNetworksCreateDhcpSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworksCreateDhcpOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDhcpSerializer(workloadNetworkDhcp), + }); +} + +export async function _workloadNetworksCreateDhcpDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Create a WorkloadNetworkDhcp */ +export function workloadNetworksCreateDhcp( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworksCreateDhcpOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDhcp> { + return getLongRunningPoller( + context, + _workloadNetworksCreateDhcpDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreateDhcpSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + workloadNetworkDhcp, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, WorkloadNetworkDhcp>; +} + +export function _workloadNetworksUpdateDhcpSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworksUpdateDhcpOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDhcpSerializer(workloadNetworkDhcp), + }); +} + +export async function _workloadNetworksUpdateDhcpDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Update a WorkloadNetworkDhcp */ +export function workloadNetworksUpdateDhcp( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworksUpdateDhcpOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDhcp> { + return getLongRunningPoller( + context, + _workloadNetworksUpdateDhcpDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdateDhcpSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + workloadNetworkDhcp, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, WorkloadNetworkDhcp>; +} + +export function _workloadNetworksDeleteDhcpSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + options: WorkloadNetworksDeleteDhcpOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeleteDhcpDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkDhcp */ +export function workloadNetworksDeleteDhcp( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + options: WorkloadNetworksDeleteDhcpOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeleteDhcpDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeleteDhcpSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListGatewaysSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListGatewaysOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListGatewaysDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkGatewayList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkGatewayListDeserializer(result.body); +} + +/** List WorkloadNetworkGateway resources by WorkloadNetwork */ +export function workloadNetworksListGateways( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListGatewaysOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListGatewaysSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListGatewaysDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetGatewaySend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + gatewayId: string, + options: WorkloadNetworksGetGatewayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways/{gatewayId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + gatewayId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetGatewayDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkGatewayDeserializer(result.body); +} + +/** Get a WorkloadNetworkGateway */ +export async function workloadNetworksGetGateway( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + gatewayId: string, + options: WorkloadNetworksGetGatewayOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetGatewaySend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + gatewayId, + options, + ); + return _workloadNetworksGetGatewayDeserialize(result); +} + +export function _workloadNetworksListPortMirroringSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListPortMirroringOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListPortMirroringDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkPortMirroringList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkPortMirroringListDeserializer(result.body); +} + +/** List WorkloadNetworkPortMirroring resources by WorkloadNetwork */ +export function workloadNetworksListPortMirroring( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListPortMirroringOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListPortMirroringSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListPortMirroringDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetPortMirroringSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + options: WorkloadNetworksGetPortMirroringOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetPortMirroringDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Get a WorkloadNetworkPortMirroring */ +export async function workloadNetworksGetPortMirroring( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + options: WorkloadNetworksGetPortMirroringOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _workloadNetworksGetPortMirroringSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + options, + ); + return _workloadNetworksGetPortMirroringDeserialize(result); +} + +export function _workloadNetworksCreatePortMirroringSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworksCreatePortMirroringOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkPortMirroringSerializer( + workloadNetworkPortMirroring, + ), + }); +} + +export async function _workloadNetworksCreatePortMirroringDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Create a WorkloadNetworkPortMirroring */ +export function workloadNetworksCreatePortMirroring( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworksCreatePortMirroringOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + WorkloadNetworkPortMirroring +> { + return getLongRunningPoller( + context, + _workloadNetworksCreatePortMirroringDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreatePortMirroringSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkPortMirroring + >; +} + +export function _workloadNetworksUpdatePortMirroringSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworksUpdatePortMirroringOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkPortMirroringSerializer( + workloadNetworkPortMirroring, + ), + }); +} + +export async function _workloadNetworksUpdatePortMirroringDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Update a WorkloadNetworkPortMirroring */ +export function workloadNetworksUpdatePortMirroring( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworksUpdatePortMirroringOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + WorkloadNetworkPortMirroring +> { + return getLongRunningPoller( + context, + _workloadNetworksUpdatePortMirroringDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdatePortMirroringSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkPortMirroring + >; +} + +export function _workloadNetworksDeletePortMirroringSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options: WorkloadNetworksDeletePortMirroringOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + subscriptionId, + resourceGroupName, + portMirroringId, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeletePortMirroringDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkPortMirroring */ +export function workloadNetworksDeletePortMirroring( + context: Client, + subscriptionId: string, + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options: WorkloadNetworksDeletePortMirroringOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeletePortMirroringDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeletePortMirroringSend( + context, + subscriptionId, + resourceGroupName, + portMirroringId, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListVMGroupsSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListVMGroupsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListVMGroupsDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkVMGroupsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkVMGroupsListDeserializer(result.body); +} + +/** List WorkloadNetworkVMGroup resources by WorkloadNetwork */ +export function workloadNetworksListVMGroups( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListVMGroupsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListVMGroupsSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListVMGroupsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetVMGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + options: WorkloadNetworksGetVMGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetVMGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Get a WorkloadNetworkVMGroup */ +export async function workloadNetworksGetVMGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + options: WorkloadNetworksGetVMGroupOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetVMGroupSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + options, + ); + return _workloadNetworksGetVMGroupDeserialize(result); +} + +export function _workloadNetworksCreateVMGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworksCreateVMGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkVMGroupSerializer(workloadNetworkVMGroup), + }); +} + +export async function _workloadNetworksCreateVMGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Create a WorkloadNetworkVMGroup */ +export function workloadNetworksCreateVMGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworksCreateVMGroupOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkVMGroup> { + return getLongRunningPoller( + context, + _workloadNetworksCreateVMGroupDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreateVMGroupSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkVMGroup + >; +} + +export function _workloadNetworksUpdateVMGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworksUpdateVMGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkVMGroupSerializer(workloadNetworkVMGroup), + }); +} + +export async function _workloadNetworksUpdateVMGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Update a WorkloadNetworkVMGroup */ +export function workloadNetworksUpdateVMGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworksUpdateVMGroupOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkVMGroup> { + return getLongRunningPoller( + context, + _workloadNetworksUpdateVMGroupDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdateVMGroupSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkVMGroup + >; +} + +export function _workloadNetworksDeleteVMGroupSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteVMGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + subscriptionId, + resourceGroupName, + vmGroupId, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeleteVMGroupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkVMGroup */ +export function workloadNetworksDeleteVMGroup( + context: Client, + subscriptionId: string, + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteVMGroupOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeleteVMGroupDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeleteVMGroupSend( + context, + subscriptionId, + resourceGroupName, + vmGroupId, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListVirtualMachinesSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListVirtualMachinesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListVirtualMachinesDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkVirtualMachinesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkVirtualMachinesListDeserializer(result.body); +} + +/** List WorkloadNetworkVirtualMachine resources by WorkloadNetwork */ +export function workloadNetworksListVirtualMachines( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListVirtualMachinesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListVirtualMachinesSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListVirtualMachinesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetVirtualMachineSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + virtualMachineId: string, + options: WorkloadNetworksGetVirtualMachineOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines/{virtualMachineId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + virtualMachineId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetVirtualMachineDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkVirtualMachineDeserializer(result.body); +} + +/** Get a WorkloadNetworkVirtualMachine */ +export async function workloadNetworksGetVirtualMachine( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + virtualMachineId: string, + options: WorkloadNetworksGetVirtualMachineOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _workloadNetworksGetVirtualMachineSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + virtualMachineId, + options, + ); + return _workloadNetworksGetVirtualMachineDeserialize(result); +} + +export function _workloadNetworksListDnsServicesSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDnsServicesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListDnsServicesDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDnsServicesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkDnsServicesListDeserializer(result.body); +} + +/** List WorkloadNetworkDnsService resources by WorkloadNetwork */ +export function workloadNetworksListDnsServices( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDnsServicesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListDnsServicesSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListDnsServicesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetDnsServiceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + options: WorkloadNetworksGetDnsServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetDnsServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Get a WorkloadNetworkDnsService */ +export async function workloadNetworksGetDnsService( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + options: WorkloadNetworksGetDnsServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetDnsServiceSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + options, + ); + return _workloadNetworksGetDnsServiceDeserialize(result); +} + +export function _workloadNetworksCreateDnsServiceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworksCreateDnsServiceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDnsServiceSerializer(workloadNetworkDnsService), + }); +} + +export async function _workloadNetworksCreateDnsServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Create a WorkloadNetworkDnsService */ +export function workloadNetworksCreateDnsService( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworksCreateDnsServiceOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + WorkloadNetworkDnsService +> { + return getLongRunningPoller( + context, + _workloadNetworksCreateDnsServiceDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreateDnsServiceSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkDnsService + >; +} + +export function _workloadNetworksUpdateDnsServiceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworksUpdateDnsServiceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDnsServiceSerializer(workloadNetworkDnsService), + }); +} + +export async function _workloadNetworksUpdateDnsServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Update a WorkloadNetworkDnsService */ +export function workloadNetworksUpdateDnsService( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworksUpdateDnsServiceOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + WorkloadNetworkDnsService +> { + return getLongRunningPoller( + context, + _workloadNetworksUpdateDnsServiceDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdateDnsServiceSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkDnsService + >; +} + +export function _workloadNetworksDeleteDnsServiceSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteDnsServiceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + subscriptionId, + resourceGroupName, + dnsServiceId, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeleteDnsServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkDnsService */ +export function workloadNetworksDeleteDnsService( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteDnsServiceOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeleteDnsServiceDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeleteDnsServiceSend( + context, + subscriptionId, + resourceGroupName, + dnsServiceId, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListDnsZonesSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDnsZonesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListDnsZonesDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDnsZonesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkDnsZonesListDeserializer(result.body); +} + +/** List WorkloadNetworkDnsZone resources by WorkloadNetwork */ +export function workloadNetworksListDnsZones( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListDnsZonesOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListDnsZonesSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListDnsZonesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetDnsZoneSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + options: WorkloadNetworksGetDnsZoneOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetDnsZoneDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Get a WorkloadNetworkDnsZone */ +export async function workloadNetworksGetDnsZone( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + options: WorkloadNetworksGetDnsZoneOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetDnsZoneSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + options, + ); + return _workloadNetworksGetDnsZoneDeserialize(result); +} + +export function _workloadNetworksCreateDnsZoneSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworksCreateDnsZoneOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDnsZoneSerializer(workloadNetworkDnsZone), + }); +} + +export async function _workloadNetworksCreateDnsZoneDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Create a WorkloadNetworkDnsZone */ +export function workloadNetworksCreateDnsZone( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworksCreateDnsZoneOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDnsZone> { + return getLongRunningPoller( + context, + _workloadNetworksCreateDnsZoneDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreateDnsZoneSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkDnsZone + >; +} + +export function _workloadNetworksUpdateDnsZoneSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworksUpdateDnsZoneOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkDnsZoneSerializer(workloadNetworkDnsZone), + }); +} + +export async function _workloadNetworksUpdateDnsZoneDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Update a WorkloadNetworkDnsZone */ +export function workloadNetworksUpdateDnsZone( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworksUpdateDnsZoneOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDnsZone> { + return getLongRunningPoller( + context, + _workloadNetworksUpdateDnsZoneDeserialize, + ["200", "202"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksUpdateDnsZoneSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkDnsZone + >; +} + +export function _workloadNetworksDeleteDnsZoneSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteDnsZoneOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + subscriptionId, + resourceGroupName, + dnsZoneId, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeleteDnsZoneDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkDnsZone */ +export function workloadNetworksDeleteDnsZone( + context: Client, + subscriptionId: string, + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options: WorkloadNetworksDeleteDnsZoneOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeleteDnsZoneDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeleteDnsZoneSend( + context, + subscriptionId, + resourceGroupName, + dnsZoneId, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _workloadNetworksListPublicIPsSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListPublicIPsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksListPublicIPsDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkPublicIPsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return _workloadNetworkPublicIPsListDeserializer(result.body); +} + +/** List WorkloadNetworkPublicIP resources by WorkloadNetwork */ +export function workloadNetworksListPublicIPs( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options: WorkloadNetworksListPublicIPsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _workloadNetworksListPublicIPsSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + _workloadNetworksListPublicIPsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _workloadNetworksGetPublicIPSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + options: WorkloadNetworksGetPublicIPOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + ) + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksGetPublicIPDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkPublicIPDeserializer(result.body); +} + +/** Get a WorkloadNetworkPublicIP */ +export async function workloadNetworksGetPublicIP( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + options: WorkloadNetworksGetPublicIPOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _workloadNetworksGetPublicIPSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + options, + ); + return _workloadNetworksGetPublicIPDeserialize(result); +} + +export function _workloadNetworksCreatePublicIPSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options: WorkloadNetworksCreatePublicIPOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}", + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + ) + .put({ + ...operationOptionsToRequestParameters(options), + body: workloadNetworkPublicIPSerializer(workloadNetworkPublicIP), + }); +} + +export async function _workloadNetworksCreatePublicIPDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return workloadNetworkPublicIPDeserializer(result.body); +} + +/** Create a WorkloadNetworkPublicIP */ +export function workloadNetworksCreatePublicIP( + context: Client, + subscriptionId: string, + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options: WorkloadNetworksCreatePublicIPOptionalParams = { + requestOptions: {}, + }, +): PollerLike< + OperationState, + WorkloadNetworkPublicIP +> { + return getLongRunningPoller( + context, + _workloadNetworksCreatePublicIPDeserialize, + ["200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksCreatePublicIPSend( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + workloadNetworkPublicIP, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike< + OperationState, + WorkloadNetworkPublicIP + >; +} + +export function _workloadNetworksDeletePublicIPSend( + context: Client, + subscriptionId: string, + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options: WorkloadNetworksDeletePublicIPOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + subscriptionId, + resourceGroupName, + publicIPId, + privateCloudName, + ) + .delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _workloadNetworksDeletePublicIPDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return; +} + +/** Delete a WorkloadNetworkPublicIP */ +export function workloadNetworksDeletePublicIP( + context: Client, + subscriptionId: string, + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options: WorkloadNetworksDeletePublicIPOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller( + context, + _workloadNetworksDeletePublicIPDeserialize, + ["200", "202", "204"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _workloadNetworksDeletePublicIPSend( + context, + subscriptionId, + resourceGroupName, + publicIPId, + privateCloudName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} diff --git a/sdk/avs/arm-avs/src/avsClient.ts b/sdk/avs/arm-avs/src/avsClient.ts new file mode 100644 index 000000000000..4a454bd4a6e6 --- /dev/null +++ b/sdk/avs/arm-avs/src/avsClient.ts @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + getOperationsOperations, + OperationsOperations, +} from "./classic/operations/index.js"; +import { + getLocationsOperations, + LocationsOperations, +} from "./classic/locations/index.js"; +import { + getPrivateCloudsOperations, + PrivateCloudsOperations, +} from "./classic/privateClouds/index.js"; +import { + getClustersOperations, + ClustersOperations, +} from "./classic/clusters/index.js"; +import { + getDatastoresOperations, + DatastoresOperations, +} from "./classic/datastores/index.js"; +import { + getHcxEnterpriseSitesOperations, + HcxEnterpriseSitesOperations, +} from "./classic/hcxEnterpriseSites/index.js"; +import { + getAuthorizationsOperations, + AuthorizationsOperations, +} from "./classic/authorizations/index.js"; +import { + getGlobalReachConnectionsOperations, + GlobalReachConnectionsOperations, +} from "./classic/globalReachConnections/index.js"; +import { + getCloudLinksOperations, + CloudLinksOperations, +} from "./classic/cloudLinks/index.js"; +import { + getAddonsOperations, + AddonsOperations, +} from "./classic/addons/index.js"; +import { + getVirtualMachinesOperations, + VirtualMachinesOperations, +} from "./classic/virtualMachines/index.js"; +import { + getPlacementPoliciesOperations, + PlacementPoliciesOperations, +} from "./classic/placementPolicies/index.js"; +import { + getScriptPackagesOperations, + ScriptPackagesOperations, +} from "./classic/scriptPackages/index.js"; +import { + getScriptCmdletsOperations, + ScriptCmdletsOperations, +} from "./classic/scriptCmdlets/index.js"; +import { + getScriptExecutionsOperations, + ScriptExecutionsOperations, +} from "./classic/scriptExecutions/index.js"; +import { + getIscsiPathsOperations, + IscsiPathsOperations, +} from "./classic/iscsiPaths/index.js"; +import { + getWorkloadNetworksOperations, + WorkloadNetworksOperations, +} from "./classic/workloadNetworks/index.js"; +import { createAvs, AvsContext, AvsClientOptionalParams } from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { AvsClientOptionalParams } from "./api/avsContext.js"; + +export class AvsClient { + private _client: AvsContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + constructor( + credential: TokenCredential, + subscriptionId: string, + options: AvsClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createAvs(credential, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.operations = getOperationsOperations(this._client); + this.locations = getLocationsOperations(this._client, subscriptionId); + this.privateClouds = getPrivateCloudsOperations( + this._client, + subscriptionId, + ); + this.clusters = getClustersOperations(this._client, subscriptionId); + this.datastores = getDatastoresOperations(this._client, subscriptionId); + this.hcxEnterpriseSites = getHcxEnterpriseSitesOperations( + this._client, + subscriptionId, + ); + this.authorizations = getAuthorizationsOperations( + this._client, + subscriptionId, + ); + this.globalReachConnections = getGlobalReachConnectionsOperations( + this._client, + subscriptionId, + ); + this.cloudLinks = getCloudLinksOperations(this._client, subscriptionId); + this.addons = getAddonsOperations(this._client, subscriptionId); + this.virtualMachines = getVirtualMachinesOperations( + this._client, + subscriptionId, + ); + this.placementPolicies = getPlacementPoliciesOperations( + this._client, + subscriptionId, + ); + this.scriptPackages = getScriptPackagesOperations( + this._client, + subscriptionId, + ); + this.scriptCmdlets = getScriptCmdletsOperations( + this._client, + subscriptionId, + ); + this.scriptExecutions = getScriptExecutionsOperations( + this._client, + subscriptionId, + ); + this.iscsiPaths = getIscsiPathsOperations(this._client, subscriptionId); + this.workloadNetworks = getWorkloadNetworksOperations( + this._client, + subscriptionId, + ); + } + + /** The operation groups for Operations */ + public readonly operations: OperationsOperations; + /** The operation groups for Locations */ + public readonly locations: LocationsOperations; + /** The operation groups for PrivateClouds */ + public readonly privateClouds: PrivateCloudsOperations; + /** The operation groups for Clusters */ + public readonly clusters: ClustersOperations; + /** The operation groups for Datastores */ + public readonly datastores: DatastoresOperations; + /** The operation groups for HcxEnterpriseSites */ + public readonly hcxEnterpriseSites: HcxEnterpriseSitesOperations; + /** The operation groups for Authorizations */ + public readonly authorizations: AuthorizationsOperations; + /** The operation groups for GlobalReachConnections */ + public readonly globalReachConnections: GlobalReachConnectionsOperations; + /** The operation groups for CloudLinks */ + public readonly cloudLinks: CloudLinksOperations; + /** The operation groups for Addons */ + public readonly addons: AddonsOperations; + /** The operation groups for VirtualMachines */ + public readonly virtualMachines: VirtualMachinesOperations; + /** The operation groups for PlacementPolicies */ + public readonly placementPolicies: PlacementPoliciesOperations; + /** The operation groups for ScriptPackages */ + public readonly scriptPackages: ScriptPackagesOperations; + /** The operation groups for ScriptCmdlets */ + public readonly scriptCmdlets: ScriptCmdletsOperations; + /** The operation groups for ScriptExecutions */ + public readonly scriptExecutions: ScriptExecutionsOperations; + /** The operation groups for IscsiPaths */ + public readonly iscsiPaths: IscsiPathsOperations; + /** The operation groups for WorkloadNetworks */ + public readonly workloadNetworks: WorkloadNetworksOperations; +} diff --git a/sdk/avs/arm-avs/src/azureVMwareSolutionAPI.ts b/sdk/avs/arm-avs/src/azureVMwareSolutionAPI.ts deleted file mode 100644 index 0a7fbad93d2d..000000000000 --- a/sdk/avs/arm-avs/src/azureVMwareSolutionAPI.ts +++ /dev/null @@ -1,209 +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 * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - OperationsImpl, - LocationsImpl, - PrivateCloudsImpl, - AddonsImpl, - AuthorizationsImpl, - CloudLinksImpl, - ClustersImpl, - DatastoresImpl, - PlacementPoliciesImpl, - VirtualMachinesImpl, - GlobalReachConnectionsImpl, - HcxEnterpriseSitesImpl, - IscsiPathsImpl, - ScriptExecutionsImpl, - ScriptPackagesImpl, - ScriptCmdletsImpl, - WorkloadNetworksImpl, -} from "./operations"; -import { - Operations, - Locations, - PrivateClouds, - Addons, - Authorizations, - CloudLinks, - Clusters, - Datastores, - PlacementPolicies, - VirtualMachines, - GlobalReachConnections, - HcxEnterpriseSites, - IscsiPaths, - ScriptExecutions, - ScriptPackages, - ScriptCmdlets, - WorkloadNetworks, -} from "./operationsInterfaces"; -import { AzureVMwareSolutionAPIOptionalParams } from "./models"; - -export class AzureVMwareSolutionAPI extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId: string; - - /** - * Initializes a new instance of the AzureVMwareSolutionAPI 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 - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: AzureVMwareSolutionAPIOptionalParams, - ) { - 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: AzureVMwareSolutionAPIOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-avs/6.0.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...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 || "2023-09-01"; - this.operations = new OperationsImpl(this); - this.locations = new LocationsImpl(this); - this.privateClouds = new PrivateCloudsImpl(this); - this.addons = new AddonsImpl(this); - this.authorizations = new AuthorizationsImpl(this); - this.cloudLinks = new CloudLinksImpl(this); - this.clusters = new ClustersImpl(this); - this.datastores = new DatastoresImpl(this); - this.placementPolicies = new PlacementPoliciesImpl(this); - this.virtualMachines = new VirtualMachinesImpl(this); - this.globalReachConnections = new GlobalReachConnectionsImpl(this); - this.hcxEnterpriseSites = new HcxEnterpriseSitesImpl(this); - this.iscsiPaths = new IscsiPathsImpl(this); - this.scriptExecutions = new ScriptExecutionsImpl(this); - this.scriptPackages = new ScriptPackagesImpl(this); - this.scriptCmdlets = new ScriptCmdletsImpl(this); - this.workloadNetworks = new WorkloadNetworksImpl(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); - } - - operations: Operations; - locations: Locations; - privateClouds: PrivateClouds; - addons: Addons; - authorizations: Authorizations; - cloudLinks: CloudLinks; - clusters: Clusters; - datastores: Datastores; - placementPolicies: PlacementPolicies; - virtualMachines: VirtualMachines; - globalReachConnections: GlobalReachConnections; - hcxEnterpriseSites: HcxEnterpriseSites; - iscsiPaths: IscsiPaths; - scriptExecutions: ScriptExecutions; - scriptPackages: ScriptPackages; - scriptCmdlets: ScriptCmdlets; - workloadNetworks: WorkloadNetworks; -} diff --git a/sdk/avs/arm-avs/src/classic/addons/index.ts b/sdk/avs/arm-avs/src/classic/addons/index.ts new file mode 100644 index 000000000000..a63b549bcb5c --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/addons/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + addonsList, + addonsGet, + addonsCreateOrUpdate, + addonsDelete, +} from "../../api/addons/index.js"; +import { Addon } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AddonsListOptionalParams, + AddonsGetOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsDeleteOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Addons operations. */ +export interface AddonsOperations { + /** List Addon resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AddonsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a Addon */ + get: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsGetOptionalParams, + ) => Promise; + /** Create a Addon */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options?: AddonsCreateOrUpdateOptionalParams, + ) => PollerLike, Addon>; + /** Delete a Addon */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getAddons(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AddonsListOptionalParams, + ) => + addonsList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsGetOptionalParams, + ) => + addonsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options?: AddonsCreateOrUpdateOptionalParams, + ) => + addonsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + addon, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsDeleteOptionalParams, + ) => + addonsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + addonName, + options, + ), + }; +} + +export function getAddonsOperations( + context: AvsContext, + subscriptionId: string, +): AddonsOperations { + return { + ...getAddons(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/authorizations/index.ts b/sdk/avs/arm-avs/src/classic/authorizations/index.ts new file mode 100644 index 000000000000..8ac13e3199a8 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/authorizations/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + authorizationsList, + authorizationsGet, + authorizationsCreateOrUpdate, + authorizationsDelete, +} from "../../api/authorizations/index.js"; +import { ExpressRouteAuthorization } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + AuthorizationsListOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsDeleteOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Authorizations operations. */ +export interface AuthorizationsOperations { + /** List ExpressRouteAuthorization resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AuthorizationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a ExpressRouteAuthorization */ + get: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsGetOptionalParams, + ) => Promise; + /** Create a ExpressRouteAuthorization */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options?: AuthorizationsCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + ExpressRouteAuthorization + >; + /** Delete a ExpressRouteAuthorization */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getAuthorizations(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AuthorizationsListOptionalParams, + ) => + authorizationsList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsGetOptionalParams, + ) => + authorizationsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options?: AuthorizationsCreateOrUpdateOptionalParams, + ) => + authorizationsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + authorization, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsDeleteOptionalParams, + ) => + authorizationsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + authorizationName, + options, + ), + }; +} + +export function getAuthorizationsOperations( + context: AvsContext, + subscriptionId: string, +): AuthorizationsOperations { + return { + ...getAuthorizations(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/cloudLinks/index.ts b/sdk/avs/arm-avs/src/classic/cloudLinks/index.ts new file mode 100644 index 000000000000..65cff48c5f2e --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/cloudLinks/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + cloudLinksList, + cloudLinksGet, + cloudLinksCreateOrUpdate, + cloudLinksDelete, +} from "../../api/cloudLinks/index.js"; +import { + CloudLinksListOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksDeleteOptionalParams, +} from "../../api/options.js"; +import { CloudLink } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a CloudLinks operations. */ +export interface CloudLinksOperations { + /** List CloudLink resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: CloudLinksListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a CloudLink */ + get: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksGetOptionalParams, + ) => Promise; + /** Create a CloudLink */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options?: CloudLinksCreateOrUpdateOptionalParams, + ) => PollerLike, CloudLink>; + /** Delete a CloudLink */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getCloudLinks(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: CloudLinksListOptionalParams, + ) => + cloudLinksList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksGetOptionalParams, + ) => + cloudLinksGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options?: CloudLinksCreateOrUpdateOptionalParams, + ) => + cloudLinksCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + cloudLink, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksDeleteOptionalParams, + ) => + cloudLinksDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + cloudLinkName, + options, + ), + }; +} + +export function getCloudLinksOperations( + context: AvsContext, + subscriptionId: string, +): CloudLinksOperations { + return { + ...getCloudLinks(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/clusters/index.ts b/sdk/avs/arm-avs/src/classic/clusters/index.ts new file mode 100644 index 000000000000..2a44fa12ce70 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/clusters/index.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + clustersList, + clustersGet, + clustersCreateOrUpdate, + clustersUpdate, + clustersDelete, + clustersListZones, +} from "../../api/clusters/index.js"; +import { + ClustersListOptionalParams, + ClustersGetOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersUpdateOptionalParams, + ClustersDeleteOptionalParams, + ClustersListZonesOptionalParams, +} from "../../api/options.js"; +import { + Cluster, + ClusterUpdate, + ClusterZoneList, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Clusters operations. */ +export interface ClustersOperations { + /** List Cluster resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ClustersListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a Cluster */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersGetOptionalParams, + ) => Promise; + /** Create a Cluster */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => PollerLike, Cluster>; + /** Update a Cluster */ + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options?: ClustersUpdateOptionalParams, + ) => PollerLike, void>; + /** Delete a Cluster */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => PollerLike, void>; + /** List hosts by zone in a cluster */ + listZones: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersListZonesOptionalParams, + ) => Promise; +} + +export function getClusters(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ClustersListOptionalParams, + ) => + clustersList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersGetOptionalParams, + ) => + clustersGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => + clustersCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + cluster, + options, + ), + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options?: ClustersUpdateOptionalParams, + ) => + clustersUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + clusterUpdate, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => + clustersDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + listZones: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersListZonesOptionalParams, + ) => + clustersListZones( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + }; +} + +export function getClustersOperations( + context: AvsContext, + subscriptionId: string, +): ClustersOperations { + return { + ...getClusters(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/datastores/index.ts b/sdk/avs/arm-avs/src/classic/datastores/index.ts new file mode 100644 index 000000000000..bbbdd4f18ed5 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/datastores/index.ts @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + datastoresList, + datastoresGet, + datastoresCreateOrUpdate, + datastoresDelete, +} from "../../api/datastores/index.js"; +import { + DatastoresListOptionalParams, + DatastoresGetOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresDeleteOptionalParams, +} from "../../api/options.js"; +import { Datastore } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Datastores operations. */ +export interface DatastoresOperations { + /** List Datastore resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: DatastoresListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a Datastore */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresGetOptionalParams, + ) => Promise; + /** Create a Datastore */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options?: DatastoresCreateOrUpdateOptionalParams, + ) => PollerLike, Datastore>; + /** Delete a Datastore */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getDatastores(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: DatastoresListOptionalParams, + ) => + datastoresList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresGetOptionalParams, + ) => + datastoresGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options?: DatastoresCreateOrUpdateOptionalParams, + ) => + datastoresCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + datastore, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresDeleteOptionalParams, + ) => + datastoresDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ), + }; +} + +export function getDatastoresOperations( + context: AvsContext, + subscriptionId: string, +): DatastoresOperations { + return { + ...getDatastores(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/globalReachConnections/index.ts b/sdk/avs/arm-avs/src/classic/globalReachConnections/index.ts new file mode 100644 index 000000000000..5a810188de0d --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/globalReachConnections/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + globalReachConnectionsList, + globalReachConnectionsGet, + globalReachConnectionsCreateOrUpdate, + globalReachConnectionsDelete, +} from "../../api/globalReachConnections/index.js"; +import { + GlobalReachConnectionsListOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsDeleteOptionalParams, +} from "../../api/options.js"; +import { GlobalReachConnection } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a GlobalReachConnections operations. */ +export interface GlobalReachConnectionsOperations { + /** List GlobalReachConnection resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: GlobalReachConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a GlobalReachConnection */ + get: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsGetOptionalParams, + ) => Promise; + /** Create a GlobalReachConnection */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, GlobalReachConnection>; + /** Delete a GlobalReachConnection */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getGlobalReachConnections( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: GlobalReachConnectionsListOptionalParams, + ) => + globalReachConnectionsList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsGetOptionalParams, + ) => + globalReachConnectionsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, + ) => + globalReachConnectionsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + globalReachConnection, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsDeleteOptionalParams, + ) => + globalReachConnectionsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ), + }; +} + +export function getGlobalReachConnectionsOperations( + context: AvsContext, + subscriptionId: string, +): GlobalReachConnectionsOperations { + return { + ...getGlobalReachConnections(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/hcxEnterpriseSites/index.ts b/sdk/avs/arm-avs/src/classic/hcxEnterpriseSites/index.ts new file mode 100644 index 000000000000..08ba7af995a2 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/hcxEnterpriseSites/index.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + hcxEnterpriseSitesList, + hcxEnterpriseSitesGet, + hcxEnterpriseSitesCreateOrUpdate, + hcxEnterpriseSitesDelete, +} from "../../api/hcxEnterpriseSites/index.js"; +import { + HcxEnterpriseSitesListOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesDeleteOptionalParams, +} from "../../api/options.js"; +import { HcxEnterpriseSite } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a HcxEnterpriseSites operations. */ +export interface HcxEnterpriseSitesOperations { + /** List HcxEnterpriseSite resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: HcxEnterpriseSitesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a HcxEnterpriseSite */ + get: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesGetOptionalParams, + ) => Promise; + /** Create a HcxEnterpriseSite */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, + ) => Promise; + /** Delete a HcxEnterpriseSite */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesDeleteOptionalParams, + ) => Promise; +} + +export function getHcxEnterpriseSites( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: HcxEnterpriseSitesListOptionalParams, + ) => + hcxEnterpriseSitesList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesGetOptionalParams, + ) => + hcxEnterpriseSitesGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, + ) => + hcxEnterpriseSitesCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + hcxEnterpriseSite, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesDeleteOptionalParams, + ) => + hcxEnterpriseSitesDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ), + }; +} + +export function getHcxEnterpriseSitesOperations( + context: AvsContext, + subscriptionId: string, +): HcxEnterpriseSitesOperations { + return { + ...getHcxEnterpriseSites(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/index.ts b/sdk/avs/arm-avs/src/classic/index.ts new file mode 100644 index 000000000000..0ef2fe143adc --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/index.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { AddonsOperations } from "./addons/index.js"; +export { AuthorizationsOperations } from "./authorizations/index.js"; +export { CloudLinksOperations } from "./cloudLinks/index.js"; +export { ClustersOperations } from "./clusters/index.js"; +export { DatastoresOperations } from "./datastores/index.js"; +export { GlobalReachConnectionsOperations } from "./globalReachConnections/index.js"; +export { HcxEnterpriseSitesOperations } from "./hcxEnterpriseSites/index.js"; +export { IscsiPathsOperations } from "./iscsiPaths/index.js"; +export { LocationsOperations } from "./locations/index.js"; +export { OperationsOperations } from "./operations/index.js"; +export { PlacementPoliciesOperations } from "./placementPolicies/index.js"; +export { PrivateCloudsOperations } from "./privateClouds/index.js"; +export { ScriptCmdletsOperations } from "./scriptCmdlets/index.js"; +export { ScriptExecutionsOperations } from "./scriptExecutions/index.js"; +export { ScriptPackagesOperations } from "./scriptPackages/index.js"; +export { VirtualMachinesOperations } from "./virtualMachines/index.js"; +export { WorkloadNetworksOperations } from "./workloadNetworks/index.js"; diff --git a/sdk/avs/arm-avs/src/classic/iscsiPaths/index.ts b/sdk/avs/arm-avs/src/classic/iscsiPaths/index.ts new file mode 100644 index 000000000000..f959bb56689f --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/iscsiPaths/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + iscsiPathsListByPrivateCloud, + iscsiPathsGet, + iscsiPathsCreateOrUpdate, + iscsiPathsDelete, +} from "../../api/iscsiPaths/index.js"; +import { + IscsiPathsListByPrivateCloudOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsDeleteOptionalParams, +} from "../../api/options.js"; +import { IscsiPath } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a IscsiPaths operations. */ +export interface IscsiPathsOperations { + /** List IscsiPath resources by PrivateCloud */ + listByPrivateCloud: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsListByPrivateCloudOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a IscsiPath */ + get: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options?: IscsiPathsGetOptionalParams, + ) => Promise; + /** Create a IscsiPath */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + resource: IscsiPath, + options?: IscsiPathsCreateOrUpdateOptionalParams, + ) => PollerLike, IscsiPath>; + /** Delete a IscsiPath */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options?: IscsiPathsDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getIscsiPaths(context: AvsContext, subscriptionId: string) { + return { + listByPrivateCloud: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsListByPrivateCloudOptionalParams, + ) => + iscsiPathsListByPrivateCloud( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options?: IscsiPathsGetOptionalParams, + ) => + iscsiPathsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + resource: IscsiPath, + options?: IscsiPathsCreateOrUpdateOptionalParams, + ) => + iscsiPathsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + resource, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + iscsiPathName: string, + options?: IscsiPathsDeleteOptionalParams, + ) => + iscsiPathsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + iscsiPathName, + options, + ), + }; +} + +export function getIscsiPathsOperations( + context: AvsContext, + subscriptionId: string, +): IscsiPathsOperations { + return { + ...getIscsiPaths(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/locations/index.ts b/sdk/avs/arm-avs/src/classic/locations/index.ts new file mode 100644 index 000000000000..55955bed5798 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/locations/index.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + locationsCheckTrialAvailability, + locationsCheckQuotaAvailability, +} from "../../api/locations/index.js"; +import { + LocationsCheckTrialAvailabilityOptionalParams, + LocationsCheckQuotaAvailabilityOptionalParams, +} from "../../api/options.js"; +import { Trial, Quota } from "../../models/models.js"; + +/** Interface representing a Locations operations. */ +export interface LocationsOperations { + /** Return trial status for subscription by region */ + checkTrialAvailability: ( + location: string, + options?: LocationsCheckTrialAvailabilityOptionalParams, + ) => Promise; + /** Return quota for subscription by region */ + checkQuotaAvailability: ( + location: string, + options?: LocationsCheckQuotaAvailabilityOptionalParams, + ) => Promise; +} + +export function getLocations(context: AvsContext, subscriptionId: string) { + return { + checkTrialAvailability: ( + location: string, + options?: LocationsCheckTrialAvailabilityOptionalParams, + ) => + locationsCheckTrialAvailability( + context, + subscriptionId, + location, + options, + ), + checkQuotaAvailability: ( + location: string, + options?: LocationsCheckQuotaAvailabilityOptionalParams, + ) => + locationsCheckQuotaAvailability( + context, + subscriptionId, + location, + options, + ), + }; +} + +export function getLocationsOperations( + context: AvsContext, + subscriptionId: string, +): LocationsOperations { + return { + ...getLocations(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/operations/index.ts b/sdk/avs/arm-avs/src/classic/operations/index.ts new file mode 100644 index 000000000000..bd9a90328e97 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/operations/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { operationsList } from "../../api/operations/index.js"; +import { OperationsListOptionalParams } from "../../api/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; +} + +export function getOperations(context: AvsContext) { + return { + list: (options?: OperationsListOptionalParams) => + operationsList(context, options), + }; +} + +export function getOperationsOperations( + context: AvsContext, +): OperationsOperations { + return { + ...getOperations(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/placementPolicies/index.ts b/sdk/avs/arm-avs/src/classic/placementPolicies/index.ts new file mode 100644 index 000000000000..fb5180531d33 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/placementPolicies/index.ts @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + PlacementPoliciesListOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesDeleteOptionalParams, +} from "../../api/options.js"; +import { + placementPoliciesList, + placementPoliciesGet, + placementPoliciesCreateOrUpdate, + placementPoliciesUpdate, + placementPoliciesDelete, +} from "../../api/placementPolicies/index.js"; +import { PlacementPolicy, PlacementPolicyUpdate } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PlacementPolicies operations. */ +export interface PlacementPoliciesOperations { + /** List PlacementPolicy resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: PlacementPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a PlacementPolicy */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesGetOptionalParams, + ) => Promise; + /** Create a PlacementPolicy */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options?: PlacementPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, PlacementPolicy>; + /** Update a PlacementPolicy */ + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options?: PlacementPoliciesUpdateOptionalParams, + ) => PollerLike, void>; + /** Delete a PlacementPolicy */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesDeleteOptionalParams, + ) => PollerLike, void>; +} + +export function getPlacementPolicies( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: PlacementPoliciesListOptionalParams, + ) => + placementPoliciesList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesGetOptionalParams, + ) => + placementPoliciesGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options?: PlacementPoliciesCreateOrUpdateOptionalParams, + ) => + placementPoliciesCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicy, + options, + ), + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options?: PlacementPoliciesUpdateOptionalParams, + ) => + placementPoliciesUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicyUpdate, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesDeleteOptionalParams, + ) => + placementPoliciesDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ), + }; +} + +export function getPlacementPoliciesOperations( + context: AvsContext, + subscriptionId: string, +): PlacementPoliciesOperations { + return { + ...getPlacementPolicies(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/privateClouds/index.ts b/sdk/avs/arm-avs/src/classic/privateClouds/index.ts new file mode 100644 index 000000000000..bcf637884de9 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/privateClouds/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + PrivateCloudsListOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsListAdminCredentialsOptionalParams, +} from "../../api/options.js"; +import { + privateCloudsList, + privateCloudsListInSubscription, + privateCloudsGet, + privateCloudsCreateOrUpdate, + privateCloudsUpdate, + privateCloudsDelete, + privateCloudsRotateVcenterPassword, + privateCloudsRotateNsxtPassword, + privateCloudsListAdminCredentials, +} from "../../api/privateClouds/index.js"; +import { + PrivateCloud, + PrivateCloudUpdate, + AdminCredentials, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateClouds operations. */ +export interface PrivateCloudsOperations { + /** List PrivateCloud resources by resource group */ + list: ( + resourceGroupName: string, + options?: PrivateCloudsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** List PrivateCloud resources by subscription ID */ + listInSubscription: ( + options?: PrivateCloudsListInSubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a PrivateCloud */ + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsGetOptionalParams, + ) => Promise; + /** Create a PrivateCloud */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options?: PrivateCloudsCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateCloud>; + /** Update a PrivateCloud */ + update: ( + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options?: PrivateCloudsUpdateOptionalParams, + ) => PollerLike, void>; + /** Delete a PrivateCloud */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsDeleteOptionalParams, + ) => PollerLike, void>; + /** Rotate the vCenter password */ + rotateVcenterPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateVcenterPasswordOptionalParams, + ) => PollerLike, void>; + /** Rotate the NSX-T Manager password */ + rotateNsxtPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateNsxtPasswordOptionalParams, + ) => PollerLike, void>; + /** List the admin credentials for the private cloud */ + listAdminCredentials: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsListAdminCredentialsOptionalParams, + ) => Promise; +} + +export function getPrivateClouds(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + options?: PrivateCloudsListOptionalParams, + ) => privateCloudsList(context, subscriptionId, resourceGroupName, options), + listInSubscription: ( + options?: PrivateCloudsListInSubscriptionOptionalParams, + ) => privateCloudsListInSubscription(context, subscriptionId, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsGetOptionalParams, + ) => + privateCloudsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options?: PrivateCloudsCreateOrUpdateOptionalParams, + ) => + privateCloudsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + privateCloud, + options, + ), + update: ( + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options?: PrivateCloudsUpdateOptionalParams, + ) => + privateCloudsUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + privateCloudUpdate, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsDeleteOptionalParams, + ) => + privateCloudsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + rotateVcenterPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateVcenterPasswordOptionalParams, + ) => + privateCloudsRotateVcenterPassword( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + rotateNsxtPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateNsxtPasswordOptionalParams, + ) => + privateCloudsRotateNsxtPassword( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + listAdminCredentials: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsListAdminCredentialsOptionalParams, + ) => + privateCloudsListAdminCredentials( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + }; +} + +export function getPrivateCloudsOperations( + context: AvsContext, + subscriptionId: string, +): PrivateCloudsOperations { + return { + ...getPrivateClouds(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/scriptCmdlets/index.ts b/sdk/avs/arm-avs/src/classic/scriptCmdlets/index.ts new file mode 100644 index 000000000000..3856e245d1ea --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptCmdlets/index.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + ScriptCmdletsListOptionalParams, + ScriptCmdletsGetOptionalParams, +} from "../../api/options.js"; +import { + scriptCmdletsList, + scriptCmdletsGet, +} from "../../api/scriptCmdlets/index.js"; +import { ScriptCmdlet } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ScriptCmdlets operations. */ +export interface ScriptCmdletsOperations { + /** List ScriptCmdlet resources by ScriptPackage */ + list: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptCmdletsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a ScriptCmdlet */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options?: ScriptCmdletsGetOptionalParams, + ) => Promise; +} + +export function getScriptCmdlets(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptCmdletsListOptionalParams, + ) => + scriptCmdletsList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options?: ScriptCmdletsGetOptionalParams, + ) => + scriptCmdletsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + options, + ), + }; +} + +export function getScriptCmdletsOperations( + context: AvsContext, + subscriptionId: string, +): ScriptCmdletsOperations { + return { + ...getScriptCmdlets(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/scriptExecutions/index.ts b/sdk/avs/arm-avs/src/classic/scriptExecutions/index.ts new file mode 100644 index 000000000000..c6143504b1ff --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptExecutions/index.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + ScriptExecutionsListOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsGetExecutionLogsOptionalParams, +} from "../../api/options.js"; +import { + scriptExecutionsList, + scriptExecutionsGet, + scriptExecutionsCreateOrUpdate, + scriptExecutionsDelete, + scriptExecutionsGetExecutionLogs, +} from "../../api/scriptExecutions/index.js"; +import { ScriptExecution } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ScriptExecutions operations. */ +export interface ScriptExecutionsOperations { + /** List ScriptExecution resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptExecutionsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a ScriptExecution */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetOptionalParams, + ) => Promise; + /** Create a ScriptExecution */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options?: ScriptExecutionsCreateOrUpdateOptionalParams, + ) => PollerLike, ScriptExecution>; + /** Delete a ScriptExecution */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsDeleteOptionalParams, + ) => PollerLike, void>; + /** Return the logs for a script execution resource */ + getExecutionLogs: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetExecutionLogsOptionalParams, + ) => Promise; +} + +export function getScriptExecutions( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptExecutionsListOptionalParams, + ) => + scriptExecutionsList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetOptionalParams, + ) => + scriptExecutionsGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options?: ScriptExecutionsCreateOrUpdateOptionalParams, + ) => + scriptExecutionsCreateOrUpdate( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + scriptExecution, + options, + ), + delete: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsDeleteOptionalParams, + ) => + scriptExecutionsDelete( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ), + getExecutionLogs: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetExecutionLogsOptionalParams, + ) => + scriptExecutionsGetExecutionLogs( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ), + }; +} + +export function getScriptExecutionsOperations( + context: AvsContext, + subscriptionId: string, +): ScriptExecutionsOperations { + return { + ...getScriptExecutions(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/scriptPackages/index.ts b/sdk/avs/arm-avs/src/classic/scriptPackages/index.ts new file mode 100644 index 000000000000..18c6ecb5ac87 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptPackages/index.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + ScriptPackagesListOptionalParams, + ScriptPackagesGetOptionalParams, +} from "../../api/options.js"; +import { + scriptPackagesList, + scriptPackagesGet, +} from "../../api/scriptPackages/index.js"; +import { ScriptPackage } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ScriptPackages operations. */ +export interface ScriptPackagesOperations { + /** List ScriptPackage resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptPackagesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a ScriptPackage */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptPackagesGetOptionalParams, + ) => Promise; +} + +export function getScriptPackages(context: AvsContext, subscriptionId: string) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptPackagesListOptionalParams, + ) => + scriptPackagesList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptPackagesGetOptionalParams, + ) => + scriptPackagesGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + scriptPackageName, + options, + ), + }; +} + +export function getScriptPackagesOperations( + context: AvsContext, + subscriptionId: string, +): ScriptPackagesOperations { + return { + ...getScriptPackages(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/virtualMachines/index.ts b/sdk/avs/arm-avs/src/classic/virtualMachines/index.ts new file mode 100644 index 000000000000..985759161f98 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/virtualMachines/index.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + VirtualMachinesListOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesRestrictMovementOptionalParams, +} from "../../api/options.js"; +import { + virtualMachinesList, + virtualMachinesGet, + virtualMachinesRestrictMovement, +} from "../../api/virtualMachines/index.js"; +import { + VirtualMachine, + VirtualMachineRestrictMovement, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualMachines operations. */ +export interface VirtualMachinesOperations { + /** List VirtualMachine resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: VirtualMachinesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a VirtualMachine */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options?: VirtualMachinesGetOptionalParams, + ) => Promise; + /** Enable or disable DRS-driven VM movement restriction */ + restrictMovement: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options?: VirtualMachinesRestrictMovementOptionalParams, + ) => PollerLike, void>; +} + +export function getVirtualMachines( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: VirtualMachinesListOptionalParams, + ) => + virtualMachinesList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options?: VirtualMachinesGetOptionalParams, + ) => + virtualMachinesGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + options, + ), + restrictMovement: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options?: VirtualMachinesRestrictMovementOptionalParams, + ) => + virtualMachinesRestrictMovement( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + restrictMovementParameter, + options, + ), + }; +} + +export function getVirtualMachinesOperations( + context: AvsContext, + subscriptionId: string, +): VirtualMachinesOperations { + return { + ...getVirtualMachines(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworks/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworks/index.ts new file mode 100644 index 000000000000..85b9d46e618d --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworks/index.ts @@ -0,0 +1,1101 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsContext } from "../../api/avsContext.js"; +import { + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, + WorkloadNetworksListSegmentsOptionalParams, + WorkloadNetworksGetSegmentOptionalParams, + WorkloadNetworksCreateSegmentOptionalParams, + WorkloadNetworksUpdateSegmentOptionalParams, + WorkloadNetworksDeleteSegmentOptionalParams, + WorkloadNetworksListDhcpOptionalParams, + WorkloadNetworksGetDhcpOptionalParams, + WorkloadNetworksCreateDhcpOptionalParams, + WorkloadNetworksUpdateDhcpOptionalParams, + WorkloadNetworksDeleteDhcpOptionalParams, + WorkloadNetworksListGatewaysOptionalParams, + WorkloadNetworksGetGatewayOptionalParams, + WorkloadNetworksListPortMirroringOptionalParams, + WorkloadNetworksGetPortMirroringOptionalParams, + WorkloadNetworksCreatePortMirroringOptionalParams, + WorkloadNetworksUpdatePortMirroringOptionalParams, + WorkloadNetworksDeletePortMirroringOptionalParams, + WorkloadNetworksListVMGroupsOptionalParams, + WorkloadNetworksGetVMGroupOptionalParams, + WorkloadNetworksCreateVMGroupOptionalParams, + WorkloadNetworksUpdateVMGroupOptionalParams, + WorkloadNetworksDeleteVMGroupOptionalParams, + WorkloadNetworksListVirtualMachinesOptionalParams, + WorkloadNetworksGetVirtualMachineOptionalParams, + WorkloadNetworksListDnsServicesOptionalParams, + WorkloadNetworksGetDnsServiceOptionalParams, + WorkloadNetworksCreateDnsServiceOptionalParams, + WorkloadNetworksUpdateDnsServiceOptionalParams, + WorkloadNetworksDeleteDnsServiceOptionalParams, + WorkloadNetworksListDnsZonesOptionalParams, + WorkloadNetworksGetDnsZoneOptionalParams, + WorkloadNetworksCreateDnsZoneOptionalParams, + WorkloadNetworksUpdateDnsZoneOptionalParams, + WorkloadNetworksDeleteDnsZoneOptionalParams, + WorkloadNetworksListPublicIPsOptionalParams, + WorkloadNetworksGetPublicIPOptionalParams, + WorkloadNetworksCreatePublicIPOptionalParams, + WorkloadNetworksDeletePublicIPOptionalParams, +} from "../../api/options.js"; +import { + workloadNetworksList, + workloadNetworksGet, + workloadNetworksListSegments, + workloadNetworksGetSegment, + workloadNetworksCreateSegment, + workloadNetworksUpdateSegment, + workloadNetworksDeleteSegment, + workloadNetworksListDhcp, + workloadNetworksGetDhcp, + workloadNetworksCreateDhcp, + workloadNetworksUpdateDhcp, + workloadNetworksDeleteDhcp, + workloadNetworksListGateways, + workloadNetworksGetGateway, + workloadNetworksListPortMirroring, + workloadNetworksGetPortMirroring, + workloadNetworksCreatePortMirroring, + workloadNetworksUpdatePortMirroring, + workloadNetworksDeletePortMirroring, + workloadNetworksListVMGroups, + workloadNetworksGetVMGroup, + workloadNetworksCreateVMGroup, + workloadNetworksUpdateVMGroup, + workloadNetworksDeleteVMGroup, + workloadNetworksListVirtualMachines, + workloadNetworksGetVirtualMachine, + workloadNetworksListDnsServices, + workloadNetworksGetDnsService, + workloadNetworksCreateDnsService, + workloadNetworksUpdateDnsService, + workloadNetworksDeleteDnsService, + workloadNetworksListDnsZones, + workloadNetworksGetDnsZone, + workloadNetworksCreateDnsZone, + workloadNetworksUpdateDnsZone, + workloadNetworksDeleteDnsZone, + workloadNetworksListPublicIPs, + workloadNetworksGetPublicIP, + workloadNetworksCreatePublicIP, + workloadNetworksDeletePublicIP, +} from "../../api/workloadNetworks/index.js"; +import { + WorkloadNetwork, + WorkloadNetworkSegment, + WorkloadNetworkDhcp, + WorkloadNetworkGateway, + WorkloadNetworkPortMirroring, + WorkloadNetworkVMGroup, + WorkloadNetworkVirtualMachine, + WorkloadNetworkDnsService, + WorkloadNetworkDnsZone, + WorkloadNetworkPublicIP, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworks operations. */ +export interface WorkloadNetworksOperations { + /** List WorkloadNetwork resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworksListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetwork */ + get: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkSegment resources by WorkloadNetwork */ + listSegments: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListSegmentsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkSegment */ + getSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options?: WorkloadNetworksGetSegmentOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkSegment */ + createSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworksCreateSegmentOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkSegment + >; + /** Update a WorkloadNetworkSegment */ + updateSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworksUpdateSegmentOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkSegment + >; + /** Delete a WorkloadNetworkSegment */ + deleteSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options?: WorkloadNetworksDeleteSegmentOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkDhcp resources by WorkloadNetwork */ + listDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDhcpOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkDhcp */ + getDhcp: ( + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options?: WorkloadNetworksGetDhcpOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkDhcp */ + createDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworksCreateDhcpOptionalParams, + ) => PollerLike, WorkloadNetworkDhcp>; + /** Update a WorkloadNetworkDhcp */ + updateDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworksUpdateDhcpOptionalParams, + ) => PollerLike, WorkloadNetworkDhcp>; + /** Delete a WorkloadNetworkDhcp */ + deleteDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + options?: WorkloadNetworksDeleteDhcpOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkGateway resources by WorkloadNetwork */ + listGateways: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListGatewaysOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkGateway */ + getGateway: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + gatewayId: string, + options?: WorkloadNetworksGetGatewayOptionalParams, + ) => Promise; + /** List WorkloadNetworkPortMirroring resources by WorkloadNetwork */ + listPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListPortMirroringOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkPortMirroring */ + getPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + options?: WorkloadNetworksGetPortMirroringOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkPortMirroring */ + createPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworksCreatePortMirroringOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkPortMirroring + >; + /** Update a WorkloadNetworkPortMirroring */ + updatePortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworksUpdatePortMirroringOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkPortMirroring + >; + /** Delete a WorkloadNetworkPortMirroring */ + deletePortMirroring: ( + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options?: WorkloadNetworksDeletePortMirroringOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkVMGroup resources by WorkloadNetwork */ + listVMGroups: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListVMGroupsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkVMGroup */ + getVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + options?: WorkloadNetworksGetVMGroupOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkVMGroup */ + createVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworksCreateVMGroupOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkVMGroup + >; + /** Update a WorkloadNetworkVMGroup */ + updateVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworksUpdateVMGroupOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkVMGroup + >; + /** Delete a WorkloadNetworkVMGroup */ + deleteVMGroup: ( + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteVMGroupOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkVirtualMachine resources by WorkloadNetwork */ + listVirtualMachines: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListVirtualMachinesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkVirtualMachine */ + getVirtualMachine: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + virtualMachineId: string, + options?: WorkloadNetworksGetVirtualMachineOptionalParams, + ) => Promise; + /** List WorkloadNetworkDnsService resources by WorkloadNetwork */ + listDnsServices: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDnsServicesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkDnsService */ + getDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + options?: WorkloadNetworksGetDnsServiceOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkDnsService */ + createDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworksCreateDnsServiceOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkDnsService + >; + /** Update a WorkloadNetworkDnsService */ + updateDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworksUpdateDnsServiceOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkDnsService + >; + /** Delete a WorkloadNetworkDnsService */ + deleteDnsService: ( + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteDnsServiceOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkDnsZone resources by WorkloadNetwork */ + listDnsZones: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDnsZonesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkDnsZone */ + getDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + options?: WorkloadNetworksGetDnsZoneOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkDnsZone */ + createDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworksCreateDnsZoneOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkDnsZone + >; + /** Update a WorkloadNetworkDnsZone */ + updateDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworksUpdateDnsZoneOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkDnsZone + >; + /** Delete a WorkloadNetworkDnsZone */ + deleteDnsZone: ( + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteDnsZoneOptionalParams, + ) => PollerLike, void>; + /** List WorkloadNetworkPublicIP resources by WorkloadNetwork */ + listPublicIPs: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListPublicIPsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a WorkloadNetworkPublicIP */ + getPublicIP: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + options?: WorkloadNetworksGetPublicIPOptionalParams, + ) => Promise; + /** Create a WorkloadNetworkPublicIP */ + createPublicIP: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options?: WorkloadNetworksCreatePublicIPOptionalParams, + ) => PollerLike< + OperationState, + WorkloadNetworkPublicIP + >; + /** Delete a WorkloadNetworkPublicIP */ + deletePublicIP: ( + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options?: WorkloadNetworksDeletePublicIPOptionalParams, + ) => PollerLike, void>; +} + +export function getWorkloadNetworks( + context: AvsContext, + subscriptionId: string, +) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworksListOptionalParams, + ) => + workloadNetworksList( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksGetOptionalParams, + ) => + workloadNetworksGet( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + listSegments: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListSegmentsOptionalParams, + ) => + workloadNetworksListSegments( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options?: WorkloadNetworksGetSegmentOptionalParams, + ) => + workloadNetworksGetSegment( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + options, + ), + createSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworksCreateSegmentOptionalParams, + ) => + workloadNetworksCreateSegment( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + workloadNetworkSegment, + options, + ), + updateSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworksUpdateSegmentOptionalParams, + ) => + workloadNetworksUpdateSegment( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + workloadNetworkSegment, + options, + ), + deleteSegment: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + segmentId: string, + options?: WorkloadNetworksDeleteSegmentOptionalParams, + ) => + workloadNetworksDeleteSegment( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + segmentId, + options, + ), + listDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDhcpOptionalParams, + ) => + workloadNetworksListDhcp( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getDhcp: ( + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options?: WorkloadNetworksGetDhcpOptionalParams, + ) => + workloadNetworksGetDhcp( + context, + subscriptionId, + resourceGroupName, + dhcpId, + privateCloudName, + options, + ), + createDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworksCreateDhcpOptionalParams, + ) => + workloadNetworksCreateDhcp( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + workloadNetworkDhcp, + options, + ), + updateDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworksUpdateDhcpOptionalParams, + ) => + workloadNetworksUpdateDhcp( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + workloadNetworkDhcp, + options, + ), + deleteDhcp: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dhcpId: string, + options?: WorkloadNetworksDeleteDhcpOptionalParams, + ) => + workloadNetworksDeleteDhcp( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dhcpId, + options, + ), + listGateways: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListGatewaysOptionalParams, + ) => + workloadNetworksListGateways( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getGateway: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + gatewayId: string, + options?: WorkloadNetworksGetGatewayOptionalParams, + ) => + workloadNetworksGetGateway( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + gatewayId, + options, + ), + listPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListPortMirroringOptionalParams, + ) => + workloadNetworksListPortMirroring( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + options?: WorkloadNetworksGetPortMirroringOptionalParams, + ) => + workloadNetworksGetPortMirroring( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + options, + ), + createPortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworksCreatePortMirroringOptionalParams, + ) => + workloadNetworksCreatePortMirroring( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + updatePortMirroring: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworksUpdatePortMirroringOptionalParams, + ) => + workloadNetworksUpdatePortMirroring( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + deletePortMirroring: ( + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options?: WorkloadNetworksDeletePortMirroringOptionalParams, + ) => + workloadNetworksDeletePortMirroring( + context, + subscriptionId, + resourceGroupName, + portMirroringId, + privateCloudName, + options, + ), + listVMGroups: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListVMGroupsOptionalParams, + ) => + workloadNetworksListVMGroups( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + options?: WorkloadNetworksGetVMGroupOptionalParams, + ) => + workloadNetworksGetVMGroup( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + options, + ), + createVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworksCreateVMGroupOptionalParams, + ) => + workloadNetworksCreateVMGroup( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + updateVMGroup: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworksUpdateVMGroupOptionalParams, + ) => + workloadNetworksUpdateVMGroup( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + deleteVMGroup: ( + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteVMGroupOptionalParams, + ) => + workloadNetworksDeleteVMGroup( + context, + subscriptionId, + resourceGroupName, + vmGroupId, + privateCloudName, + options, + ), + listVirtualMachines: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListVirtualMachinesOptionalParams, + ) => + workloadNetworksListVirtualMachines( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getVirtualMachine: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + virtualMachineId: string, + options?: WorkloadNetworksGetVirtualMachineOptionalParams, + ) => + workloadNetworksGetVirtualMachine( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + virtualMachineId, + options, + ), + listDnsServices: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDnsServicesOptionalParams, + ) => + workloadNetworksListDnsServices( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + options?: WorkloadNetworksGetDnsServiceOptionalParams, + ) => + workloadNetworksGetDnsService( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + options, + ), + createDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworksCreateDnsServiceOptionalParams, + ) => + workloadNetworksCreateDnsService( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + updateDnsService: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworksUpdateDnsServiceOptionalParams, + ) => + workloadNetworksUpdateDnsService( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + deleteDnsService: ( + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteDnsServiceOptionalParams, + ) => + workloadNetworksDeleteDnsService( + context, + subscriptionId, + resourceGroupName, + dnsServiceId, + privateCloudName, + options, + ), + listDnsZones: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListDnsZonesOptionalParams, + ) => + workloadNetworksListDnsZones( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + options?: WorkloadNetworksGetDnsZoneOptionalParams, + ) => + workloadNetworksGetDnsZone( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + options, + ), + createDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworksCreateDnsZoneOptionalParams, + ) => + workloadNetworksCreateDnsZone( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + updateDnsZone: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworksUpdateDnsZoneOptionalParams, + ) => + workloadNetworksUpdateDnsZone( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + deleteDnsZone: ( + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options?: WorkloadNetworksDeleteDnsZoneOptionalParams, + ) => + workloadNetworksDeleteDnsZone( + context, + subscriptionId, + resourceGroupName, + dnsZoneId, + privateCloudName, + options, + ), + listPublicIPs: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + options?: WorkloadNetworksListPublicIPsOptionalParams, + ) => + workloadNetworksListPublicIPs( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + options, + ), + getPublicIP: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + options?: WorkloadNetworksGetPublicIPOptionalParams, + ) => + workloadNetworksGetPublicIP( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + options, + ), + createPublicIP: ( + resourceGroupName: string, + privateCloudName: string, + workloadNetworkName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options?: WorkloadNetworksCreatePublicIPOptionalParams, + ) => + workloadNetworksCreatePublicIP( + context, + subscriptionId, + resourceGroupName, + privateCloudName, + workloadNetworkName, + publicIPId, + workloadNetworkPublicIP, + options, + ), + deletePublicIP: ( + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options?: WorkloadNetworksDeletePublicIPOptionalParams, + ) => + workloadNetworksDeletePublicIP( + context, + subscriptionId, + resourceGroupName, + publicIPId, + privateCloudName, + options, + ), + }; +} + +export function getWorkloadNetworksOperations( + context: AvsContext, + subscriptionId: string, +): WorkloadNetworksOperations { + return { + ...getWorkloadNetworks(context, subscriptionId), + }; +} diff --git a/sdk/avs/arm-avs/src/helpers/serializerHelpers.ts b/sdk/avs/arm-avs/src/helpers/serializerHelpers.ts new file mode 100644 index 000000000000..4baaac77c8be --- /dev/null +++ b/sdk/avs/arm-avs/src/helpers/serializerHelpers.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export function serializeRecord< + T extends string | number | boolean | Date | null, + R, +>(item: Record): Record; +export function serializeRecord( + item: Record, + serializer: (item: T) => R, +): Record; +export function serializeRecord( + item: Record, + serializer?: (item: T) => R, +): Record { + return Object.keys(item).reduce( + (acc, key) => { + if (isSupportedRecordType(item[key])) { + acc[key] = item[key] as any; + } else if (serializer) { + const value = item[key]; + if (value !== undefined) { + acc[key] = serializer(value); + } + } else { + console.warn(`Don't know how to serialize ${item[key]}`); + acc[key] = item[key] as any; + } + return acc; + }, + {} as Record, + ); +} + +function isSupportedRecordType(t: any) { + return ( + ["number", "string", "boolean", "null"].includes(typeof t) || + t instanceof Date + ); +} diff --git a/sdk/avs/arm-avs/src/index.ts b/sdk/avs/arm-avs/src/index.ts index 5e4e57e662da..198ca659d35a 100644 --- a/sdk/avs/arm-avs/src/index.ts +++ b/sdk/avs/arm-avs/src/index.ts @@ -1,13 +1,362 @@ -/* - * 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. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { AzureVMwareSolutionAPI } from "./azureVMwareSolutionAPI"; -export * from "./operationsInterfaces"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { AvsClient } from "./avsClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + WorkloadNetwork, + WorkloadNetworkProperties, + KnownWorkloadNetworkProvisioningState, + WorkloadNetworkProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + WorkloadNetworkSegment, + WorkloadNetworkSegmentProperties, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkSegmentPortVif, + KnownSegmentStatusEnum, + SegmentStatusEnum, + KnownWorkloadNetworkSegmentProvisioningState, + WorkloadNetworkSegmentProvisioningState, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpEntityUnion, + KnownDhcpTypeEnum, + DhcpTypeEnum, + KnownWorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpServer, + WorkloadNetworkDhcpRelay, + WorkloadNetworkGateway, + WorkloadNetworkGatewayProperties, + WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroringProperties, + KnownPortMirroringDirectionEnum, + PortMirroringDirectionEnum, + KnownPortMirroringStatusEnum, + PortMirroringStatusEnum, + KnownWorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkVMGroup, + WorkloadNetworkVMGroupProperties, + KnownVMGroupStatusEnum, + VMGroupStatusEnum, + KnownWorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVirtualMachineProperties, + KnownVMTypeEnum, + VMTypeEnum, + WorkloadNetworkDnsService, + WorkloadNetworkDnsServiceProperties, + KnownDnsServiceLogLevelEnum, + DnsServiceLogLevelEnum, + KnownDnsServiceStatusEnum, + DnsServiceStatusEnum, + KnownWorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsZone, + WorkloadNetworkDnsZoneProperties, + KnownWorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkPublicIP, + WorkloadNetworkPublicIPProperties, + KnownWorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkPublicIPProvisioningState, + IscsiPath, + IscsiPathProperties, + KnownIscsiPathProvisioningState, + IscsiPathProvisioningState, + ScriptExecution, + ScriptExecutionProperties, + ScriptExecutionParameter, + ScriptExecutionParameterUnion, + KnownScriptExecutionParameterType, + ScriptExecutionParameterType, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + PSCredentialExecutionParameter, + KnownScriptExecutionProvisioningState, + ScriptExecutionProvisioningState, + ScriptCmdlet, + ScriptCmdletProperties, + KnownScriptCmdletProvisioningState, + ScriptCmdletProvisioningState, + KnownScriptCmdletAudience, + ScriptCmdletAudience, + ScriptParameter, + KnownScriptParameterTypes, + ScriptParameterTypes, + KnownVisibilityParameterEnum, + VisibilityParameterEnum, + KnownOptionalParamEnum, + OptionalParamEnum, + ScriptPackage, + ScriptPackageProperties, + KnownScriptPackageProvisioningState, + ScriptPackageProvisioningState, + PlacementPolicy, + PlacementPolicyProperties, + PlacementPolicyPropertiesUnion, + KnownPlacementPolicyType, + PlacementPolicyType, + KnownPlacementPolicyState, + PlacementPolicyState, + KnownPlacementPolicyProvisioningState, + PlacementPolicyProvisioningState, + VmPlacementPolicyProperties, + KnownAffinityType, + AffinityType, + VmHostPlacementPolicyProperties, + KnownAffinityStrength, + AffinityStrength, + KnownAzureHybridBenefitType, + AzureHybridBenefitType, + PlacementPolicyUpdate, + PlacementPolicyUpdateProperties, + VirtualMachine, + VirtualMachineProperties, + KnownVirtualMachineProvisioningState, + VirtualMachineProvisioningState, + KnownVirtualMachineRestrictMovementState, + VirtualMachineRestrictMovementState, + VirtualMachineRestrictMovement, + Addon, + AddonProperties, + AddonPropertiesUnion, + KnownAddonType, + AddonType, + KnownAddonProvisioningState, + AddonProvisioningState, + AddonSrmProperties, + AddonVrProperties, + AddonHcxProperties, + AddonArcProperties, + CloudLink, + CloudLinkProperties, + KnownCloudLinkProvisioningState, + CloudLinkProvisioningState, + KnownCloudLinkStatus, + CloudLinkStatus, + GlobalReachConnection, + GlobalReachConnectionProperties, + KnownGlobalReachConnectionProvisioningState, + GlobalReachConnectionProvisioningState, + KnownGlobalReachConnectionStatus, + GlobalReachConnectionStatus, + ExpressRouteAuthorization, + ExpressRouteAuthorizationProperties, + KnownExpressRouteAuthorizationProvisioningState, + ExpressRouteAuthorizationProvisioningState, + HcxEnterpriseSite, + HcxEnterpriseSiteProperties, + KnownHcxEnterpriseSiteProvisioningState, + HcxEnterpriseSiteProvisioningState, + KnownHcxEnterpriseSiteStatus, + HcxEnterpriseSiteStatus, + Datastore, + DatastoreProperties, + KnownDatastoreProvisioningState, + DatastoreProvisioningState, + NetAppVolume, + DiskPoolVolume, + KnownMountOptionEnum, + MountOptionEnum, + ElasticSanVolume, + KnownDatastoreStatus, + DatastoreStatus, + Cluster, + ClusterProperties, + KnownClusterProvisioningState, + ClusterProvisioningState, + Sku, + SkuTier, + ClusterUpdate, + ClusterUpdateProperties, + ClusterZoneList, + ClusterZone, + PrivateCloud, + PrivateCloudProperties, + ManagementCluster, + KnownInternetEnum, + InternetEnum, + IdentitySource, + KnownSslEnum, + SslEnum, + AvailabilityProperties, + KnownAvailabilityStrategy, + AvailabilityStrategy, + Encryption, + KnownEncryptionState, + EncryptionState, + EncryptionKeyVaultProperties, + KnownEncryptionKeyStatus, + EncryptionKeyStatus, + KnownEncryptionVersionType, + EncryptionVersionType, + KnownPrivateCloudProvisioningState, + PrivateCloudProvisioningState, + Circuit, + Endpoints, + KnownNsxPublicIpQuotaRaisedEnum, + NsxPublicIpQuotaRaisedEnum, + KnownDnsZoneType, + DnsZoneType, + PrivateCloudIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + PrivateCloudUpdate, + PrivateCloudUpdateProperties, + AdminCredentials, + Trial, + KnownTrialStatus, + TrialStatus, + Quota, + KnownQuotaEnabled, + QuotaEnabled, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownScriptOutputStreamType, + ScriptOutputStreamType, + KnownVersions, +} from "./models/index.js"; +export { + AvsClientOptionalParams, + OperationsListOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, + LocationsCheckQuotaAvailabilityOptionalParams, + PrivateCloudsListOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsListAdminCredentialsOptionalParams, + ClustersListOptionalParams, + ClustersGetOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersUpdateOptionalParams, + ClustersDeleteOptionalParams, + ClustersListZonesOptionalParams, + DatastoresListOptionalParams, + DatastoresGetOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresDeleteOptionalParams, + HcxEnterpriseSitesListOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesDeleteOptionalParams, + AuthorizationsListOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsDeleteOptionalParams, + GlobalReachConnectionsListOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsDeleteOptionalParams, + CloudLinksListOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksDeleteOptionalParams, + AddonsListOptionalParams, + AddonsGetOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsDeleteOptionalParams, + VirtualMachinesListOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesRestrictMovementOptionalParams, + PlacementPoliciesListOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesDeleteOptionalParams, + ScriptPackagesListOptionalParams, + ScriptPackagesGetOptionalParams, + ScriptCmdletsListOptionalParams, + ScriptCmdletsGetOptionalParams, + ScriptExecutionsListOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsGetExecutionLogsOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsDeleteOptionalParams, + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, + WorkloadNetworksListSegmentsOptionalParams, + WorkloadNetworksGetSegmentOptionalParams, + WorkloadNetworksCreateSegmentOptionalParams, + WorkloadNetworksUpdateSegmentOptionalParams, + WorkloadNetworksDeleteSegmentOptionalParams, + WorkloadNetworksListDhcpOptionalParams, + WorkloadNetworksGetDhcpOptionalParams, + WorkloadNetworksCreateDhcpOptionalParams, + WorkloadNetworksUpdateDhcpOptionalParams, + WorkloadNetworksDeleteDhcpOptionalParams, + WorkloadNetworksListGatewaysOptionalParams, + WorkloadNetworksGetGatewayOptionalParams, + WorkloadNetworksListPortMirroringOptionalParams, + WorkloadNetworksGetPortMirroringOptionalParams, + WorkloadNetworksCreatePortMirroringOptionalParams, + WorkloadNetworksUpdatePortMirroringOptionalParams, + WorkloadNetworksDeletePortMirroringOptionalParams, + WorkloadNetworksListVMGroupsOptionalParams, + WorkloadNetworksGetVMGroupOptionalParams, + WorkloadNetworksCreateVMGroupOptionalParams, + WorkloadNetworksUpdateVMGroupOptionalParams, + WorkloadNetworksDeleteVMGroupOptionalParams, + WorkloadNetworksListVirtualMachinesOptionalParams, + WorkloadNetworksGetVirtualMachineOptionalParams, + WorkloadNetworksListDnsServicesOptionalParams, + WorkloadNetworksGetDnsServiceOptionalParams, + WorkloadNetworksCreateDnsServiceOptionalParams, + WorkloadNetworksUpdateDnsServiceOptionalParams, + WorkloadNetworksDeleteDnsServiceOptionalParams, + WorkloadNetworksListDnsZonesOptionalParams, + WorkloadNetworksGetDnsZoneOptionalParams, + WorkloadNetworksCreateDnsZoneOptionalParams, + WorkloadNetworksUpdateDnsZoneOptionalParams, + WorkloadNetworksDeleteDnsZoneOptionalParams, + WorkloadNetworksListPublicIPsOptionalParams, + WorkloadNetworksGetPublicIPOptionalParams, + WorkloadNetworksCreatePublicIPOptionalParams, + WorkloadNetworksDeletePublicIPOptionalParams, +} from "./api/index.js"; +export { + AddonsOperations, + AuthorizationsOperations, + CloudLinksOperations, + ClustersOperations, + DatastoresOperations, + GlobalReachConnectionsOperations, + HcxEnterpriseSitesOperations, + IscsiPathsOperations, + LocationsOperations, + OperationsOperations, + PlacementPoliciesOperations, + PrivateCloudsOperations, + ScriptCmdletsOperations, + ScriptExecutionsOperations, + ScriptPackagesOperations, + VirtualMachinesOperations, + WorkloadNetworksOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/avs/arm-avs/src/logger.ts b/sdk/avs/arm-avs/src/logger.ts new file mode 100644 index 000000000000..43d5cad00dd6 --- /dev/null +++ b/sdk/avs/arm-avs/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-avs"); diff --git a/sdk/avs/arm-avs/src/lroImpl.ts b/sdk/avs/arm-avs/src/lroImpl.ts deleted file mode 100644 index 5f88efab981b..000000000000 --- a/sdk/avs/arm-avs/src/lroImpl.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { AbortSignalLike } from "@azure/abort-controller"; -import { 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/avs/arm-avs/src/models/index.ts b/sdk/avs/arm-avs/src/models/index.ts index ace57a27fd86..20a81ebcc532 100644 --- a/sdk/avs/arm-avs/src/models/index.ts +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -1,4409 +1,228 @@ -/* - * 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"; - -export type AddonPropertiesUnion = - | AddonProperties - | AddonArcProperties - | AddonHcxProperties - | AddonSrmProperties - | AddonVrProperties; -export type PlacementPolicyPropertiesUnion = - | PlacementPolicyProperties - | VmHostPlacementPolicyProperties - | VmPlacementPolicyProperties; -export type ScriptExecutionParameterUnion = - | ScriptExecutionParameter - | PSCredentialExecutionParameter - | ScriptSecureStringExecutionParameter - | ScriptStringExecutionParameter; -export type WorkloadNetworkDhcpEntityUnion = - | WorkloadNetworkDhcpEntity - | WorkloadNetworkDhcpRelay - | WorkloadNetworkDhcpServer; - -/** 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; -} - -/** Subscription quotas */ -export interface Quota { - /** - * Remaining hosts quota by sku type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostsRemaining?: { [propertyName: string]: number }; - /** - * Host quota is active for current subscription - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quotaEnabled?: QuotaEnabled; -} - -/** The resource model definition representing SKU */ -export interface Sku { - /** The name of the SKU. E.g. P3. It is typically a letter+number code */ - name: string; - /** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */ - tier?: SkuTier; - /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */ - size?: string; - /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - family?: string; - /** If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. */ - capacity?: number; -} - -/** Subscription trial availability */ -export interface Trial { - /** - * Trial status - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: TrialStatus; - /** - * Number of trial hosts available - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availableHosts?: number; -} - -/** The response of a PrivateCloud list operation. */ -export interface PrivateCloudList { - /** The PrivateCloud items on this page */ - value: PrivateCloud[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The properties of a management cluster */ -export interface ManagementCluster { - /** The cluster size */ - clusterSize?: number; - /** - * The state of the cluster provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ClusterProvisioningState; - /** - * The identity - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: number; - /** The hosts */ - hosts?: string[]; - /** Name of the vsan datastore associated with the cluster */ - vsanDatastoreName?: string; -} - -/** vCenter Single Sign On Identity Source */ -export interface IdentitySource { - /** The name of the identity source */ - name?: string; - /** The domain's NetBIOS name */ - alias?: string; - /** The domain's dns name */ - domain?: string; - /** The base distinguished name for users */ - baseUserDN?: string; - /** The base distinguished name for groups */ - baseGroupDN?: string; - /** Primary server URL */ - primaryServer?: string; - /** Secondary server URL */ - secondaryServer?: string; - /** Protect LDAP communication using SSL certificate (LDAPS) */ - ssl?: SslEnum; - /** - * The ID of an Active Directory user with a minimum of read-only access to Base - * DN for users and group - */ - username?: string; - /** - * The password of the Active Directory user with a minimum of read-only access to - * Base DN for users and groups. - * This value contains a credential. Consider obscuring before showing to users - */ - password?: string; -} - -/** The properties describing private cloud availability zone distribution */ -export interface AvailabilityProperties { - /** The availability strategy for the private cloud */ - strategy?: AvailabilityStrategy; - /** The primary availability zone for the private cloud */ - zone?: number; - /** The secondary availability zone for the private cloud */ - secondaryZone?: number; -} - -/** The properties of customer managed encryption key */ -export interface Encryption { - /** Status of customer managed encryption key */ - status?: EncryptionState; - /** The key vault where the encryption key is stored */ - keyVaultProperties?: EncryptionKeyVaultProperties; -} - -/** An Encryption Key */ -export interface EncryptionKeyVaultProperties { - /** The name of the key. */ - keyName?: string; - /** The version of the key. */ - keyVersion?: string; - /** - * The auto-detected version of the key if versionType is auto-detected. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly autoDetectedKeyVersion?: string; - /** The URL of the vault. */ - keyVaultUrl?: string; - /** - * The state of key provided - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly keyState?: EncryptionKeyStatus; - /** - * Property of the key if user provided or auto detected - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly versionType?: EncryptionVersionType; -} - -/** An ExpressRoute Circuit */ -export interface Circuit { - /** - * CIDR of primary subnet - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primarySubnet?: string; - /** - * CIDR of secondary subnet - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secondarySubnet?: string; - /** - * Identifier of the ExpressRoute Circuit (Microsoft Colo only) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expressRouteID?: string; - /** - * ExpressRoute Circuit private peering identifier - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expressRoutePrivatePeeringID?: string; -} - -/** Endpoint addresses */ -export interface Endpoints { - /** - * Endpoint FQDN for the NSX-T Data Center manager - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxtManager?: string; - /** - * Endpoint FQDN for Virtual Center Server Appliance - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vcsa?: string; - /** - * Endpoint FQDN for the HCX Cloud Manager - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hcxCloudManager?: string; - /** - * Endpoint IP for the NSX-T Data Center manager - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxtManagerIp?: string; - /** - * Endpoint IP for Virtual Center Server Appliance - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vcenterIp?: string; - /** - * Endpoint IP for the HCX Cloud Manager - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hcxCloudManagerIp?: string; -} - -/** Managed service identity (either system assigned, or none) */ -export interface PrivateCloudIdentity { - /** - * 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 (either system assigned, or none). */ - type: ResourceIdentityType; -} - -/** 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; -} - -/** An update to a private cloud resource */ -export interface PrivateCloudUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The SKU (Stock Keeping Unit) assigned to this resource. */ - sku?: Sku; - /** The managed service identities assigned to this resource. */ - identity?: PrivateCloudIdentity; - /** The default cluster used for management */ - managementCluster?: ManagementCluster; - /** Connectivity to internet is enabled or disabled */ - internet?: InternetEnum; - /** vCenter Single Sign On Identity Sources */ - identitySources?: IdentitySource[]; - /** Properties describing how the cloud is distributed across availability zones */ - availability?: AvailabilityProperties; - /** Customer managed key encryption, can be enabled or disabled */ - encryption?: Encryption; - /** - * Array of additional networks noncontiguous with networkBlock. Networks must be - * unique and non-overlapping across VNet in your subscription, on-premise, and - * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to - * (A.B.C.D/X). - */ - extendedNetworkBlocks?: string[]; - /** The type of DNS zone to use. */ - dnsZoneType?: DnsZoneType; -} - -/** The response of a Addon list operation. */ -export interface AddonList { - /** The Addon items on this page */ - value: Addon[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The properties of an addon */ -export interface AddonProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - addonType: "Arc" | "HCX" | "SRM" | "VR"; - /** - * The state of the addon provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: AddonProvisioningState; -} - -/** The response of a ExpressRouteAuthorization list operation. */ -export interface ExpressRouteAuthorizationList { - /** The ExpressRouteAuthorization items on this page */ - value: ExpressRouteAuthorization[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a CloudLink list operation. */ -export interface CloudLinkList { - /** The CloudLink items on this page */ - value: CloudLink[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a Cluster list operation. */ -export interface ClusterList { - /** The Cluster items on this page */ - value: Cluster[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** An update of a cluster resource */ -export interface ClusterUpdate { - /** The SKU (Stock Keeping Unit) assigned to this resource. */ - sku?: Sku; - /** The cluster size */ - clusterSize?: number; - /** The hosts */ - hosts?: string[]; -} - -/** The response of a Datastore list operation. */ -export interface DatastoreList { - /** The Datastore items on this page */ - value: Datastore[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** An Azure NetApp Files volume from Microsoft.NetApp provider */ -export interface NetAppVolume { - /** Azure resource ID of the NetApp volume */ - id: string; -} - -/** An iSCSI volume from Microsoft.StoragePool provider */ -export interface DiskPoolVolume { - /** Azure resource ID of the iSCSI target */ - targetId: string; - /** Name of the LUN to be used for datastore */ - lunName: string; - /** - * Mode that describes whether the LUN has to be mounted as a datastore or - * attached as a LUN - */ - mountOption?: MountOptionEnum; - /** - * Device path - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly path?: string; -} - -/** An Elastic SAN volume from Microsoft.ElasticSan provider */ -export interface ElasticSanVolume { - /** Azure resource ID of the Elastic SAN Volume */ - targetId: string; -} - -/** List of all zones and associated hosts for a cluster */ -export interface ClusterZoneList { - /** Zone and associated hosts info */ - zones?: ClusterZone[]; -} - -/** Zone and associated hosts info */ -export interface ClusterZone { - /** - * List of hosts belonging to the availability zone in a cluster - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hosts?: string[]; - /** - * Availability zone identifier - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zone?: string; -} - -/** The response of a PlacementPolicy list operation. */ -export interface PlacementPoliciesList { - /** The PlacementPolicy items on this page */ - value: PlacementPolicy[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Abstract placement policy properties */ -export interface PlacementPolicyProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "VmHost" | "VmVm"; - /** Whether the placement policy is enabled or disabled */ - state?: PlacementPolicyState; - /** Display name of the placement policy */ - displayName?: string; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PlacementPolicyProvisioningState; -} - -/** An update of a DRS placement policy resource */ -export interface PlacementPolicyUpdate { - /** Whether the placement policy is enabled or disabled */ - state?: PlacementPolicyState; - /** Virtual machine members list */ - vmMembers?: string[]; - /** Host members list */ - hostMembers?: string[]; - /** vm-host placement policy affinity strength (should/must) */ - affinityStrength?: AffinityStrength; - /** placement policy azure hybrid benefit opt-in type */ - azureHybridBenefitType?: AzureHybridBenefitType; -} - -/** The response of a VirtualMachine list operation. */ -export interface VirtualMachinesList { - /** The VirtualMachine items on this page */ - value: VirtualMachine[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Set VM DRS-driven movement to restricted (enabled) or not (disabled) */ -export interface VirtualMachineRestrictMovement { - /** Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ - restrictMovement?: VirtualMachineRestrictMovementState; -} - -/** The response of a GlobalReachConnection list operation. */ -export interface GlobalReachConnectionList { - /** The GlobalReachConnection items on this page */ - value: GlobalReachConnection[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a HcxEnterpriseSite list operation. */ -export interface HcxEnterpriseSiteList { - /** The HcxEnterpriseSite items on this page */ - value: HcxEnterpriseSite[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a IscsiPath list operation. */ -export interface IscsiPathListResult { - /** The IscsiPath items on this page */ - value: IscsiPath[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Administrative credentials for accessing vCenter and NSX-T */ -export interface AdminCredentials { - /** - * NSX-T Manager username - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxtUsername?: string; - /** - * NSX-T Manager password - * This value contains a credential. Consider obscuring before showing to users - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxtPassword?: string; - /** - * vCenter admin username - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vcenterUsername?: string; - /** - * vCenter admin password - * This value contains a credential. Consider obscuring before showing to users - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vcenterPassword?: string; -} - -/** The response of a ScriptExecution list operation. */ -export interface ScriptExecutionsList { - /** The ScriptExecution items on this page */ - value: ScriptExecution[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The arguments passed in to the execution */ -export interface ScriptExecutionParameter { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Credential" | "SecureValue" | "Value"; - /** The parameter name */ - name: string; -} - -/** The response of a ScriptPackage list operation. */ -export interface ScriptPackagesList { - /** The ScriptPackage items on this page */ - value: ScriptPackage[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a ScriptCmdlet list operation. */ -export interface ScriptCmdletsList { - /** The ScriptCmdlet items on this page */ - value: ScriptCmdlet[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** An parameter that the script will accept */ -export interface ScriptParameter { - /** - * The type of parameter the script is expecting. psCredential is a - * PSCredentialObject - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: ScriptParameterTypes; - /** The parameter name that the script will expect a parameter value for */ - name?: string; - /** - * User friendly description of the parameter - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Should this parameter be visible to arm and passed in the parameters argument - * when executing - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly visibility?: VisibilityParameterEnum; - /** - * Is this parameter required or optional - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly optional?: OptionalParamEnum; -} - -/** The response of a WorkloadNetwork list operation. */ -export interface WorkloadNetworkList { - /** The WorkloadNetwork items on this page */ - value: WorkloadNetwork[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkDhcp list operation. */ -export interface WorkloadNetworkDhcpList { - /** The WorkloadNetworkDhcp items on this page */ - value: WorkloadNetworkDhcp[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** - * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to - * inherit from - */ -export interface WorkloadNetworkDhcpEntity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - dhcpType: "RELAY" | "SERVER"; - /** Display name of the DHCP entity. */ - displayName?: string; - /** - * NSX Segments consuming DHCP. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly segments?: string[]; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** The response of a WorkloadNetworkDnsService list operation. */ -export interface WorkloadNetworkDnsServicesList { - /** The WorkloadNetworkDnsService items on this page */ - value: WorkloadNetworkDnsService[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkDnsZone list operation. */ -export interface WorkloadNetworkDnsZonesList { - /** The WorkloadNetworkDnsZone items on this page */ - value: WorkloadNetworkDnsZone[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkGateway list operation. */ -export interface WorkloadNetworkGatewayList { - /** The WorkloadNetworkGateway items on this page */ - value: WorkloadNetworkGateway[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkPortMirroring list operation. */ -export interface WorkloadNetworkPortMirroringList { - /** The WorkloadNetworkPortMirroring items on this page */ - value: WorkloadNetworkPortMirroring[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkPublicIP list operation. */ -export interface WorkloadNetworkPublicIPsList { - /** The WorkloadNetworkPublicIP items on this page */ - value: WorkloadNetworkPublicIP[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkSegment list operation. */ -export interface WorkloadNetworkSegmentsList { - /** The WorkloadNetworkSegment items on this page */ - value: WorkloadNetworkSegment[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** Subnet configuration for segment */ -export interface WorkloadNetworkSegmentSubnet { - /** DHCP Range assigned for subnet. */ - dhcpRanges?: string[]; - /** Gateway address. */ - gatewayAddress?: string; -} - -/** Ports and any VIF attached to segment. */ -export interface WorkloadNetworkSegmentPortVif { - /** Name of port or VIF attached to segment. */ - portName?: string; -} - -/** The response of a WorkloadNetworkVirtualMachine list operation. */ -export interface WorkloadNetworkVirtualMachinesList { - /** The WorkloadNetworkVirtualMachine items on this page */ - value: WorkloadNetworkVirtualMachine[]; - /** The link to the next page of items */ - nextLink?: string; -} - -/** The response of a WorkloadNetworkVMGroup list operation. */ -export interface WorkloadNetworkVMGroupsList { - /** The WorkloadNetworkVMGroup items on this page */ - value: WorkloadNetworkVMGroup[]; - /** The link to the next page of items */ - nextLink?: 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; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** The properties of an Arc addon */ -export interface AddonArcProperties extends AddonProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - addonType: "Arc"; - /** The VMware vCenter resource ID */ - vCenter?: string; -} - -/** The properties of an HCX addon */ -export interface AddonHcxProperties extends AddonProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - addonType: "HCX"; - /** The HCX offer, example VMware MaaS Cloud Provider (Enterprise) */ - offer: string; -} - -/** The properties of a Site Recovery Manager (SRM) addon */ -export interface AddonSrmProperties extends AddonProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - addonType: "SRM"; - /** The Site Recovery Manager (SRM) license */ - licenseKey?: string; -} - -/** The properties of a vSphere Replication (VR) addon */ -export interface AddonVrProperties extends AddonProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - addonType: "VR"; - /** The vSphere Replication Server (VRS) count */ - vrsCount: number; -} - -/** VM-Host placement policy properties */ -export interface VmHostPlacementPolicyProperties - extends PlacementPolicyProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "VmHost"; - /** Virtual machine members list */ - vmMembers: string[]; - /** Host members list */ - hostMembers: string[]; - /** placement policy affinity type */ - affinityType: AffinityType; - /** vm-host placement policy affinity strength (should/must) */ - affinityStrength?: AffinityStrength; - /** placement policy azure hybrid benefit opt-in type */ - azureHybridBenefitType?: AzureHybridBenefitType; -} - -/** VM-VM placement policy properties */ -export interface VmPlacementPolicyProperties extends PlacementPolicyProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "VmVm"; - /** Virtual machine members list */ - vmMembers: string[]; - /** placement policy affinity type */ - affinityType: AffinityType; -} - -/** a powershell credential object */ -export interface PSCredentialExecutionParameter - extends ScriptExecutionParameter { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Credential"; - /** username for login */ - username?: string; - /** - * password for login - * This value contains a credential. Consider obscuring before showing to users - */ - password?: string; -} - -/** a plain text value execution parameter */ -export interface ScriptSecureStringExecutionParameter - extends ScriptExecutionParameter { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "SecureValue"; - /** - * A secure value for the passed parameter, not to be stored in logs - * This value contains a credential. Consider obscuring before showing to users - */ - secureValue?: string; -} - -/** a plain text value execution parameter */ -export interface ScriptStringExecutionParameter - extends ScriptExecutionParameter { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Value"; - /** The value for the passed parameter */ - value?: string; -} - -/** NSX DHCP Relay */ -export interface WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - dhcpType: "RELAY"; - /** DHCP Relay Addresses. Max 3. */ - serverAddresses?: string[]; -} - -/** NSX DHCP Server */ -export interface WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - dhcpType: "SERVER"; - /** DHCP Server Address. */ - serverAddress?: string; - /** DHCP Server Lease Time. */ - leaseTime?: number; -} - -/** A private cloud resource */ -export interface PrivateCloud extends TrackedResource { - /** The SKU (Stock Keeping Unit) assigned to this resource. */ - sku: Sku; - /** The managed service identities assigned to this resource. */ - identity?: PrivateCloudIdentity; - /** The default cluster used for management */ - managementCluster?: ManagementCluster; - /** Connectivity to internet is enabled or disabled */ - internet?: InternetEnum; - /** vCenter Single Sign On Identity Sources */ - identitySources?: IdentitySource[]; - /** Properties describing how the cloud is distributed across availability zones */ - availability?: AvailabilityProperties; - /** Customer managed key encryption, can be enabled or disabled */ - encryption?: Encryption; - /** - * Array of additional networks noncontiguous with networkBlock. Networks must be - * unique and non-overlapping across VNet in your subscription, on-premise, and - * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to - * (A.B.C.D/X). - */ - extendedNetworkBlocks?: string[]; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateCloudProvisioningState; - /** An ExpressRoute Circuit */ - circuit?: Circuit; - /** - * The endpoints - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endpoints?: Endpoints; - /** - * The block of addresses should be unique across VNet in your subscription as - * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where - * A,B,C,D are between 0 and 255, and X is between 0 and 22 - */ - networkBlock?: string; - /** - * Network used to access vCenter Server and NSX-T Manager - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementNetwork?: string; - /** - * Used for virtual machine cold migration, cloning, and snapshot migration - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningNetwork?: string; - /** - * Used for live migration of virtual machines - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmotionNetwork?: string; - /** - * Optionally, set the vCenter admin password when the private cloud is created - * This value contains a credential. Consider obscuring before showing to users - */ - vcenterPassword?: string; - /** - * Optionally, set the NSX-T Manager password when the private cloud is created - * This value contains a credential. Consider obscuring before showing to users - */ - nsxtPassword?: string; - /** - * Thumbprint of the vCenter Server SSL certificate - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vcenterCertificateThumbprint?: string; - /** - * Thumbprint of the NSX-T Manager SSL certificate - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxtCertificateThumbprint?: string; - /** - * Array of cloud link IDs from other clouds that connect to this one - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly externalCloudLinks?: string[]; - /** - * A secondary expressRoute circuit from a separate AZ. Only present in a - * stretched private cloud - */ - secondaryCircuit?: Circuit; - /** - * Flag to indicate whether the private cloud has the quota for provisioned NSX - * Public IP count raised from 64 to 1024 - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nsxPublicIpQuotaRaised?: NsxPublicIpQuotaRaisedEnum; - /** Azure resource ID of the virtual network */ - virtualNetworkId?: string; - /** The type of DNS zone to use. */ - dnsZoneType?: DnsZoneType; -} - -/** An addon resource */ -export interface Addon extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: AddonPropertiesUnion; -} - -/** ExpressRoute Circuit Authorization */ -export interface ExpressRouteAuthorization extends ProxyResource { - /** - * The state of the ExpressRoute Circuit Authorization provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ExpressRouteAuthorizationProvisioningState; - /** - * The ID of the ExpressRoute Circuit Authorization - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expressRouteAuthorizationId?: string; - /** - * The key of the ExpressRoute Circuit Authorization - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expressRouteAuthorizationKey?: string; - /** The ID of the ExpressRoute Circuit */ - expressRouteId?: string; -} - -/** A cloud link resource */ -export interface CloudLink extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CloudLinkProvisioningState; - /** - * The state of the cloud link. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: CloudLinkStatus; - /** Identifier of the other private cloud participating in the link. */ - linkedCloud?: string; -} - -/** A cluster resource */ -export interface Cluster extends ProxyResource { - /** The SKU (Stock Keeping Unit) assigned to this resource. */ - sku: Sku; - /** The cluster size */ - clusterSize?: number; - /** - * The state of the cluster provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ClusterProvisioningState; - /** - * The identity - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: number; - /** The hosts */ - hosts?: string[]; - /** Name of the vsan datastore associated with the cluster */ - vsanDatastoreName?: string; -} - -/** A datastore resource */ -export interface Datastore extends ProxyResource { - /** - * The state of the datastore provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: DatastoreProvisioningState; - /** An Azure NetApp Files volume */ - netAppVolume?: NetAppVolume; - /** An iSCSI volume */ - diskPoolVolume?: DiskPoolVolume; - /** An Elastic SAN volume */ - elasticSanVolume?: ElasticSanVolume; - /** - * The operational status of the datastore - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: DatastoreStatus; -} - -/** A vSphere Distributed Resource Scheduler (DRS) placement policy */ -export interface PlacementPolicy extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: PlacementPolicyPropertiesUnion; -} - -/** Virtual Machine */ -export interface VirtualMachine extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: VirtualMachineProvisioningState; - /** - * Display name of the VM. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * Virtual machine managed object reference id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly moRefId?: string; - /** - * Path to virtual machine's folder starting from datacenter virtual machine folder - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly folderPath?: string; - /** - * Whether VM DRS-driven movement is restricted (enabled) or not (disabled) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictMovement?: VirtualMachineRestrictMovementState; -} - -/** A global reach connection resource */ -export interface GlobalReachConnection extends ProxyResource { - /** - * The state of the ExpressRoute Circuit Authorization provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: GlobalReachConnectionProvisioningState; - /** - * The network used for global reach carved out from the original network block - * provided for the private cloud - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly addressPrefix?: string; - /** - * Authorization key from the peer express route used for the global reach - * connection - */ - authorizationKey?: string; - /** - * The connection status of the global reach connection - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly circuitConnectionStatus?: GlobalReachConnectionStatus; - /** - * Identifier of the ExpressRoute Circuit to peer with in the global reach - * connection - */ - peerExpressRouteCircuit?: string; - /** - * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the - * global reach connection - */ - expressRouteId?: string; -} - -/** An HCX Enterprise Site resource */ -export interface HcxEnterpriseSite extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: HcxEnterpriseSiteProvisioningState; - /** - * The activation key - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly activationKey?: string; - /** - * The status of the HCX Enterprise Site - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: HcxEnterpriseSiteStatus; -} - -/** An iSCSI path resource */ -export interface IscsiPath extends ProxyResource { - /** - * The state of the iSCSI path provisioning - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: IscsiPathProvisioningState; - /** CIDR Block for iSCSI path. */ - networkBlock?: string; -} - -/** An instance of a script executed by a user - custom or AVS */ -export interface ScriptExecution extends ProxyResource { - /** A reference to the script cmdlet resource if user is running a AVS script */ - scriptCmdletId?: string; - /** Parameters the script will accept */ - parameters?: ScriptExecutionParameterUnion[]; - /** - * Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials - */ - hiddenParameters?: ScriptExecutionParameterUnion[]; - /** - * Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception - */ - failureReason?: string; - /** Time limit for execution */ - timeout?: string; - /** Time to live for the resource. If not provided, will be available for 60 days */ - retention?: string; - /** - * Time the script execution was submitted - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly submittedAt?: Date; - /** - * Time the script execution was started - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startedAt?: Date; - /** - * Time the script execution was finished - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly finishedAt?: Date; - /** - * The state of the script execution resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ScriptExecutionProvisioningState; - /** Standard output stream from the powershell execution */ - output?: string[]; - /** User-defined dictionary. */ - namedOutputs?: { [propertyName: string]: Record }; - /** - * Standard information out stream from the powershell execution - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly information?: string[]; - /** - * Standard warning out stream from the powershell execution - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly warnings?: string[]; - /** - * Standard error output stream from the powershell execution - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errors?: string[]; -} - -/** Script Package resources available for execution */ -export interface ScriptPackage extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ScriptPackageProvisioningState; - /** - * User friendly description of the package - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Module version - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; - /** - * Company that created and supports the package - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly company?: string; - /** - * Link to support by the package vendor - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly uri?: string; -} - -/** A cmdlet available for script execution */ -export interface ScriptCmdlet extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ScriptCmdletProvisioningState; - /** - * Description of the scripts functionality - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Recommended time limit for execution - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly timeout?: string; - /** - * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly audience?: ScriptCmdletAudience; - /** - * Parameters the script will accept - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly parameters?: ScriptParameter[]; -} - -/** Workload Network */ -export interface WorkloadNetwork extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkProvisioningState; -} - -/** NSX DHCP */ -export interface WorkloadNetworkDhcp extends ProxyResource { - /** The resource-specific properties for this resource. */ - properties?: WorkloadNetworkDhcpEntityUnion; -} - -/** NSX DNS Service */ -export interface WorkloadNetworkDnsService extends ProxyResource { - /** Display name of the DNS Service. */ - displayName?: string; - /** DNS service IP of the DNS Service. */ - dnsServiceIp?: string; - /** Default DNS zone of the DNS Service. */ - defaultDnsZone?: string; - /** FQDN zones of the DNS Service. */ - fqdnZones?: string[]; - /** DNS Service log level. */ - logLevel?: DnsServiceLogLevelEnum; - /** - * DNS Service status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: DnsServiceStatusEnum; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkDnsServiceProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** NSX DNS Zone */ -export interface WorkloadNetworkDnsZone extends ProxyResource { - /** Display name of the DNS Zone. */ - displayName?: string; - /** Domain names of the DNS Zone. */ - domain?: string[]; - /** DNS Server IP array of the DNS Zone. */ - dnsServerIps?: string[]; - /** Source IP of the DNS Zone. */ - sourceIp?: string; - /** Number of DNS Services using the DNS zone. */ - dnsServices?: number; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkDnsZoneProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** NSX Gateway. */ -export interface WorkloadNetworkGateway extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkProvisioningState; - /** Display name of the DHCP entity. */ - displayName?: string; - /** - * NSX Gateway Path. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly path?: string; -} - -/** NSX Port Mirroring */ -export interface WorkloadNetworkPortMirroring extends ProxyResource { - /** Display name of the port mirroring profile. */ - displayName?: string; - /** Direction of port mirroring profile. */ - direction?: PortMirroringDirectionEnum; - /** Source VM Group. */ - source?: string; - /** Destination VM Group. */ - destination?: string; - /** - * Port Mirroring Status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PortMirroringStatusEnum; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkPortMirroringProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** NSX Public IP Block */ -export interface WorkloadNetworkPublicIP extends ProxyResource { - /** Display name of the Public IP Block. */ - displayName?: string; - /** Number of Public IPs requested. */ - numberOfPublicIPs?: number; - /** - * CIDR Block of the Public IP Block. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPBlock?: string; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; -} - -/** NSX Segment */ -export interface WorkloadNetworkSegment extends ProxyResource { - /** Display name of the segment. */ - displayName?: string; - /** Gateway which to connect segment to. */ - connectedGateway?: string; - /** Subnet which to connect segment to. */ - subnet?: WorkloadNetworkSegmentSubnet; - /** - * Port Vif which segment is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portVif?: WorkloadNetworkSegmentPortVif[]; - /** - * Segment status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SegmentStatusEnum; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkSegmentProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** NSX Virtual Machine */ -export interface WorkloadNetworkVirtualMachine extends ProxyResource { - /** - * The provisioning state of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkProvisioningState; - /** Display name of the VM. */ - displayName?: string; - /** - * Virtual machine type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmType?: VMTypeEnum; -} - -/** NSX VM Group */ -export interface WorkloadNetworkVMGroup extends ProxyResource { - /** Display name of the VM group. */ - displayName?: string; - /** Virtual machine members of this group. */ - members?: string[]; - /** - * VM Group status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: VMGroupStatusEnum; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; - /** NSX revision number. */ - revision?: number; -} - -/** Defines headers for PrivateClouds_createOrUpdate operation. */ -export interface PrivateCloudsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PrivateClouds_update operation. */ -export interface PrivateCloudsUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PrivateClouds_delete operation. */ -export interface PrivateCloudsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PrivateClouds_rotateNsxtPassword operation. */ -export interface PrivateCloudsRotateNsxtPasswordHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PrivateClouds_rotateVcenterPassword operation. */ -export interface PrivateCloudsRotateVcenterPasswordHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Addons_createOrUpdate operation. */ -export interface AddonsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Addons_delete operation. */ -export interface AddonsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Authorizations_createOrUpdate operation. */ -export interface AuthorizationsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Authorizations_delete operation. */ -export interface AuthorizationsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for CloudLinks_createOrUpdate operation. */ -export interface CloudLinksCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for CloudLinks_delete operation. */ -export interface CloudLinksDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clusters_createOrUpdate operation. */ -export interface ClustersCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clusters_update operation. */ -export interface ClustersUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Clusters_delete operation. */ -export interface ClustersDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Datastores_createOrUpdate operation. */ -export interface DatastoresCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for Datastores_delete operation. */ -export interface DatastoresDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PlacementPolicies_createOrUpdate operation. */ -export interface PlacementPoliciesCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PlacementPolicies_update operation. */ -export interface PlacementPoliciesUpdateHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for PlacementPolicies_delete operation. */ -export interface PlacementPoliciesDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for VirtualMachines_restrictMovement operation. */ -export interface VirtualMachinesRestrictMovementHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for GlobalReachConnections_createOrUpdate operation. */ -export interface GlobalReachConnectionsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for GlobalReachConnections_delete operation. */ -export interface GlobalReachConnectionsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for IscsiPaths_createOrUpdate operation. */ -export interface IscsiPathsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for IscsiPaths_delete operation. */ -export interface IscsiPathsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for ScriptExecutions_createOrUpdate operation. */ -export interface ScriptExecutionsCreateOrUpdateHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for ScriptExecutions_delete operation. */ -export interface ScriptExecutionsDeleteHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createDhcp operation. */ -export interface WorkloadNetworksCreateDhcpHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updateDhcp operation. */ -export interface WorkloadNetworksUpdateDhcpHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deleteDhcp operation. */ -export interface WorkloadNetworksDeleteDhcpHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createDnsService operation. */ -export interface WorkloadNetworksCreateDnsServiceHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updateDnsService operation. */ -export interface WorkloadNetworksUpdateDnsServiceHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deleteDnsService operation. */ -export interface WorkloadNetworksDeleteDnsServiceHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createDnsZone operation. */ -export interface WorkloadNetworksCreateDnsZoneHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updateDnsZone operation. */ -export interface WorkloadNetworksUpdateDnsZoneHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deleteDnsZone operation. */ -export interface WorkloadNetworksDeleteDnsZoneHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createPortMirroring operation. */ -export interface WorkloadNetworksCreatePortMirroringHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updatePortMirroring operation. */ -export interface WorkloadNetworksUpdatePortMirroringHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deletePortMirroring operation. */ -export interface WorkloadNetworksDeletePortMirroringHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createPublicIP operation. */ -export interface WorkloadNetworksCreatePublicIPHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deletePublicIP operation. */ -export interface WorkloadNetworksDeletePublicIPHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createSegments operation. */ -export interface WorkloadNetworksCreateSegmentsHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updateSegments operation. */ -export interface WorkloadNetworksUpdateSegmentsHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deleteSegment operation. */ -export interface WorkloadNetworksDeleteSegmentHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_createVMGroup operation. */ -export interface WorkloadNetworksCreateVMGroupHeaders { - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_updateVMGroup operation. */ -export interface WorkloadNetworksUpdateVMGroupHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** Defines headers for WorkloadNetworks_deleteVMGroup operation. */ -export interface WorkloadNetworksDeleteVMGroupHeaders { - /** The Location header contains the URL where the status of the long running operation can be checked. */ - location?: string; - /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ - retryAfter?: number; -} - -/** 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 QuotaEnabled} that the service accepts. */ -export enum KnownQuotaEnabled { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for QuotaEnabled. \ - * {@link KnownQuotaEnabled} can be used interchangeably with QuotaEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type QuotaEnabled = string; - -/** Known values of {@link TrialStatus} that the service accepts. */ -export enum KnownTrialStatus { - /** is available */ - TrialAvailable = "TrialAvailable", - /** is used */ - TrialUsed = "TrialUsed", - /** is disabled */ - TrialDisabled = "TrialDisabled", -} - -/** - * Defines values for TrialStatus. \ - * {@link KnownTrialStatus} can be used interchangeably with TrialStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TrialAvailable**: is available \ - * **TrialUsed**: is used \ - * **TrialDisabled**: is disabled - */ -export type TrialStatus = string; - -/** Known values of {@link ClusterProvisioningState} that the service accepts. */ -export enum KnownClusterProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is cancelled */ - Cancelled = "Cancelled", - /** is deleting */ - Deleting = "Deleting", - /** is 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**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Cancelled**: is cancelled \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type ClusterProvisioningState = string; - -/** Known values of {@link InternetEnum} that the service accepts. */ -export enum KnownInternetEnum { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for InternetEnum. \ - * {@link KnownInternetEnum} can be used interchangeably with InternetEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type InternetEnum = string; - -/** Known values of {@link SslEnum} that the service accepts. */ -export enum KnownSslEnum { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for SslEnum. \ - * {@link KnownSslEnum} can be used interchangeably with SslEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type SslEnum = string; - -/** Known values of {@link AvailabilityStrategy} that the service accepts. */ -export enum KnownAvailabilityStrategy { - /** in single zone */ - SingleZone = "SingleZone", - /** in two zones */ - DualZone = "DualZone", -} - -/** - * Defines values for AvailabilityStrategy. \ - * {@link KnownAvailabilityStrategy} can be used interchangeably with AvailabilityStrategy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SingleZone**: in single zone \ - * **DualZone**: in two zones - */ -export type AvailabilityStrategy = string; - -/** Known values of {@link EncryptionState} that the service accepts. */ -export enum KnownEncryptionState { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for EncryptionState. \ - * {@link KnownEncryptionState} can be used interchangeably with EncryptionState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type EncryptionState = string; - -/** Known values of {@link EncryptionKeyStatus} that the service accepts. */ -export enum KnownEncryptionKeyStatus { - /** is connected */ - Connected = "Connected", - /** is access denied */ - AccessDenied = "AccessDenied", -} - -/** - * Defines values for EncryptionKeyStatus. \ - * {@link KnownEncryptionKeyStatus} can be used interchangeably with EncryptionKeyStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected**: is connected \ - * **AccessDenied**: is access denied - */ -export type EncryptionKeyStatus = string; - -/** Known values of {@link EncryptionVersionType} that the service accepts. */ -export enum KnownEncryptionVersionType { - /** is fixed */ - Fixed = "Fixed", - /** is auto-detected */ - AutoDetected = "AutoDetected", -} - -/** - * Defines values for EncryptionVersionType. \ - * {@link KnownEncryptionVersionType} can be used interchangeably with EncryptionVersionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Fixed**: is fixed \ - * **AutoDetected**: is auto-detected - */ -export type EncryptionVersionType = string; - -/** Known values of {@link PrivateCloudProvisioningState} that the service accepts. */ -export enum KnownPrivateCloudProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is cancelled */ - Cancelled = "Cancelled", - /** is pending */ - Pending = "Pending", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for PrivateCloudProvisioningState. \ - * {@link KnownPrivateCloudProvisioningState} can be used interchangeably with PrivateCloudProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Cancelled**: is cancelled \ - * **Pending**: is pending \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type PrivateCloudProvisioningState = string; - -/** Known values of {@link NsxPublicIpQuotaRaisedEnum} that the service accepts. */ -export enum KnownNsxPublicIpQuotaRaisedEnum { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for NsxPublicIpQuotaRaisedEnum. \ - * {@link KnownNsxPublicIpQuotaRaisedEnum} can be used interchangeably with NsxPublicIpQuotaRaisedEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type NsxPublicIpQuotaRaisedEnum = string; - -/** Known values of {@link DnsZoneType} that the service accepts. */ -export enum KnownDnsZoneType { - /** Primary DNS zone. */ - Public = "Public", - /** Private DNS zone. */ - Private = "Private", -} - -/** - * Defines values for DnsZoneType. \ - * {@link KnownDnsZoneType} can be used interchangeably with DnsZoneType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Public**: Primary DNS zone. \ - * **Private**: Private DNS zone. - */ -export type DnsZoneType = string; - -/** Known values of {@link ResourceIdentityType} that the service accepts. */ -export enum KnownResourceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", -} - -/** - * Defines values for ResourceIdentityType. \ - * {@link KnownResourceIdentityType} can be used interchangeably with ResourceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** - */ -export type ResourceIdentityType = 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 AddonType} that the service accepts. */ -export enum KnownAddonType { - /** SRM */ - SRM = "SRM", - /** VR */ - VR = "VR", - /** HCX */ - HCX = "HCX", - /** Arc */ - Arc = "Arc", -} - -/** - * Defines values for AddonType. \ - * {@link KnownAddonType} can be used interchangeably with AddonType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SRM** \ - * **VR** \ - * **HCX** \ - * **Arc** - */ -export type AddonType = string; - -/** Known values of {@link AddonProvisioningState} that the service accepts. */ -export enum KnownAddonProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is cancelled */ - Cancelled = "Cancelled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for AddonProvisioningState. \ - * {@link KnownAddonProvisioningState} can be used interchangeably with AddonProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Cancelled**: is cancelled \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type AddonProvisioningState = string; - -/** Known values of {@link ExpressRouteAuthorizationProvisioningState} that the service accepts. */ -export enum KnownExpressRouteAuthorizationProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for ExpressRouteAuthorizationProvisioningState. \ - * {@link KnownExpressRouteAuthorizationProvisioningState} can be used interchangeably with ExpressRouteAuthorizationProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Updating**: is updating - */ -export type ExpressRouteAuthorizationProvisioningState = string; - -/** Known values of {@link CloudLinkProvisioningState} that the service accepts. */ -export enum KnownCloudLinkProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", -} - -/** - * Defines values for CloudLinkProvisioningState. \ - * {@link KnownCloudLinkProvisioningState} can be used interchangeably with CloudLinkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. - */ -export type CloudLinkProvisioningState = string; - -/** Known values of {@link CloudLinkStatus} that the service accepts. */ -export enum KnownCloudLinkStatus { - /** is active */ - Active = "Active", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is failed */ - Failed = "Failed", - /** is disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for CloudLinkStatus. \ - * {@link KnownCloudLinkStatus} can be used interchangeably with CloudLinkStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active**: is active \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Failed**: is failed \ - * **Disconnected**: is disconnected - */ -export type CloudLinkStatus = string; - -/** Known values of {@link DatastoreProvisioningState} that the service accepts. */ -export enum KnownDatastoreProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is cancelled */ - Cancelled = "Cancelled", - /** is pending */ - Pending = "Pending", - /** is creating */ - Creating = "Creating", - /** is updating */ - Updating = "Updating", - /** is deleting */ - Deleting = "Deleting", -} - -/** - * Defines values for DatastoreProvisioningState. \ - * {@link KnownDatastoreProvisioningState} can be used interchangeably with DatastoreProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Cancelled**: is cancelled \ - * **Pending**: is pending \ - * **Creating**: is creating \ - * **Updating**: is updating \ - * **Deleting**: is deleting - */ -export type DatastoreProvisioningState = string; - -/** Known values of {@link MountOptionEnum} that the service accepts. */ -export enum KnownMountOptionEnum { - /** is mount */ - Mount = "MOUNT", - /** is attach */ - Attach = "ATTACH", -} - -/** - * Defines values for MountOptionEnum. \ - * {@link KnownMountOptionEnum} can be used interchangeably with MountOptionEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MOUNT**: is mount \ - * **ATTACH**: is attach - */ -export type MountOptionEnum = string; - -/** Known values of {@link DatastoreStatus} that the service accepts. */ -export enum KnownDatastoreStatus { - /** is unknown */ - Unknown = "Unknown", - /** is accessible */ - Accessible = "Accessible", - /** is inaccessible */ - Inaccessible = "Inaccessible", - /** is attached */ - Attached = "Attached", - /** is detached */ - Detached = "Detached", - /** is lost communication */ - LostCommunication = "LostCommunication", - /** is dead or error */ - DeadOrError = "DeadOrError", -} - -/** - * Defines values for DatastoreStatus. \ - * {@link KnownDatastoreStatus} can be used interchangeably with DatastoreStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown**: is unknown \ - * **Accessible**: is accessible \ - * **Inaccessible**: is inaccessible \ - * **Attached**: is attached \ - * **Detached**: is detached \ - * **LostCommunication**: is lost communication \ - * **DeadOrError**: is dead or error - */ -export type DatastoreStatus = string; - -/** Known values of {@link PlacementPolicyType} that the service accepts. */ -export enum KnownPlacementPolicyType { - /** VmVm */ - VmVm = "VmVm", - /** VmHost */ - VmHost = "VmHost", -} - -/** - * Defines values for PlacementPolicyType. \ - * {@link KnownPlacementPolicyType} can be used interchangeably with PlacementPolicyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **VmVm** \ - * **VmHost** - */ -export type PlacementPolicyType = string; - -/** Known values of {@link PlacementPolicyState} that the service accepts. */ -export enum KnownPlacementPolicyState { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for PlacementPolicyState. \ - * {@link KnownPlacementPolicyState} can be used interchangeably with PlacementPolicyState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type PlacementPolicyState = string; - -/** Known values of {@link PlacementPolicyProvisioningState} that the service accepts. */ -export enum KnownPlacementPolicyProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for PlacementPolicyProvisioningState. \ - * {@link KnownPlacementPolicyProvisioningState} can be used interchangeably with PlacementPolicyProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type PlacementPolicyProvisioningState = string; - -/** Known values of {@link AffinityStrength} that the service accepts. */ -export enum KnownAffinityStrength { - /** is should */ - Should = "Should", - /** is must */ - Must = "Must", -} - -/** - * Defines values for AffinityStrength. \ - * {@link KnownAffinityStrength} can be used interchangeably with AffinityStrength, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Should**: is should \ - * **Must**: is must - */ -export type AffinityStrength = string; - -/** Known values of {@link AzureHybridBenefitType} that the service accepts. */ -export enum KnownAzureHybridBenefitType { - /** is SqlHost */ - SqlHost = "SqlHost", - /** is None */ - None = "None", -} - -/** - * Defines values for AzureHybridBenefitType. \ - * {@link KnownAzureHybridBenefitType} can be used interchangeably with AzureHybridBenefitType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SqlHost**: is SqlHost \ - * **None**: is None - */ -export type AzureHybridBenefitType = string; - -/** Known values of {@link VirtualMachineProvisioningState} that the service accepts. */ -export enum KnownVirtualMachineProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", -} - -/** - * 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**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. - */ -export type VirtualMachineProvisioningState = string; - -/** Known values of {@link VirtualMachineRestrictMovementState} that the service accepts. */ -export enum KnownVirtualMachineRestrictMovementState { - /** is enabled */ - Enabled = "Enabled", - /** is disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for VirtualMachineRestrictMovementState. \ - * {@link KnownVirtualMachineRestrictMovementState} can be used interchangeably with VirtualMachineRestrictMovementState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: is enabled \ - * **Disabled**: is disabled - */ -export type VirtualMachineRestrictMovementState = string; - -/** Known values of {@link GlobalReachConnectionProvisioningState} that the service accepts. */ -export enum KnownGlobalReachConnectionProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for GlobalReachConnectionProvisioningState. \ - * {@link KnownGlobalReachConnectionProvisioningState} can be used interchangeably with GlobalReachConnectionProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Updating**: is updating - */ -export type GlobalReachConnectionProvisioningState = string; - -/** Known values of {@link GlobalReachConnectionStatus} that the service accepts. */ -export enum KnownGlobalReachConnectionStatus { - /** is connected */ - Connected = "Connected", - /** is connecting */ - Connecting = "Connecting", - /** is disconnected */ - Disconnected = "Disconnected", -} - -/** - * Defines values for GlobalReachConnectionStatus. \ - * {@link KnownGlobalReachConnectionStatus} can be used interchangeably with GlobalReachConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected**: is connected \ - * **Connecting**: is connecting \ - * **Disconnected**: is disconnected - */ -export type GlobalReachConnectionStatus = string; - -/** Known values of {@link HcxEnterpriseSiteProvisioningState} that the service accepts. */ -export enum KnownHcxEnterpriseSiteProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", -} - -/** - * Defines values for HcxEnterpriseSiteProvisioningState. \ - * {@link KnownHcxEnterpriseSiteProvisioningState} can be used interchangeably with HcxEnterpriseSiteProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. - */ -export type HcxEnterpriseSiteProvisioningState = string; - -/** Known values of {@link HcxEnterpriseSiteStatus} that the service accepts. */ -export enum KnownHcxEnterpriseSiteStatus { - /** is available */ - Available = "Available", - /** is consumed */ - Consumed = "Consumed", - /** is deactivated */ - Deactivated = "Deactivated", - /** is deleted */ - Deleted = "Deleted", -} - -/** - * Defines values for HcxEnterpriseSiteStatus. \ - * {@link KnownHcxEnterpriseSiteStatus} can be used interchangeably with HcxEnterpriseSiteStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available**: is available \ - * **Consumed**: is consumed \ - * **Deactivated**: is deactivated \ - * **Deleted**: is deleted - */ -export type HcxEnterpriseSiteStatus = string; - -/** Known values of {@link IscsiPathProvisioningState} that the service accepts. */ -export enum KnownIscsiPathProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is pending */ - Pending = "Pending", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for IscsiPathProvisioningState. \ - * {@link KnownIscsiPathProvisioningState} can be used interchangeably with IscsiPathProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Pending**: is pending \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type IscsiPathProvisioningState = string; - -/** Known values of {@link ScriptExecutionParameterType} that the service accepts. */ -export enum KnownScriptExecutionParameterType { - /** Value */ - Value = "Value", - /** SecureValue */ - SecureValue = "SecureValue", - /** Credential */ - Credential = "Credential", -} - -/** - * Defines values for ScriptExecutionParameterType. \ - * {@link KnownScriptExecutionParameterType} can be used interchangeably with ScriptExecutionParameterType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Value** \ - * **SecureValue** \ - * **Credential** - */ -export type ScriptExecutionParameterType = string; - -/** Known values of {@link ScriptExecutionProvisioningState} that the service accepts. */ -export enum KnownScriptExecutionProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is pending */ - Pending = "Pending", - /** is running */ - Running = "Running", - /** is cancelling */ - Cancelling = "Cancelling", - /** is cancelled */ - Cancelled = "Cancelled", - /** is deleting */ - Deleting = "Deleting", -} - -/** - * Defines values for ScriptExecutionProvisioningState. \ - * {@link KnownScriptExecutionProvisioningState} can be used interchangeably with ScriptExecutionProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Pending**: is pending \ - * **Running**: is running \ - * **Cancelling**: is cancelling \ - * **Cancelled**: is cancelled \ - * **Deleting**: is deleting - */ -export type ScriptExecutionProvisioningState = string; - -/** Known values of {@link ScriptOutputStreamType} that the service accepts. */ -export enum KnownScriptOutputStreamType { - /** is information */ - Information = "Information", - /** is warning */ - Warning = "Warning", - /** is output */ - Output = "Output", - /** is error */ - Error = "Error", -} - -/** - * Defines values for ScriptOutputStreamType. \ - * {@link KnownScriptOutputStreamType} can be used interchangeably with ScriptOutputStreamType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Information**: is information \ - * **Warning**: is warning \ - * **Output**: is output \ - * **Error**: is error - */ -export type ScriptOutputStreamType = string; - -/** Known values of {@link ScriptPackageProvisioningState} that the service accepts. */ -export enum KnownScriptPackageProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", -} - -/** - * Defines values for ScriptPackageProvisioningState. \ - * {@link KnownScriptPackageProvisioningState} can be used interchangeably with ScriptPackageProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. - */ -export type ScriptPackageProvisioningState = string; - -/** Known values of {@link ScriptCmdletProvisioningState} that the service accepts. */ -export enum KnownScriptCmdletProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", -} - -/** - * Defines values for ScriptCmdletProvisioningState. \ - * {@link KnownScriptCmdletProvisioningState} can be used interchangeably with ScriptCmdletProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. - */ -export type ScriptCmdletProvisioningState = string; - -/** Known values of {@link ScriptCmdletAudience} that the service accepts. */ -export enum KnownScriptCmdletAudience { - /** is automation */ - Automation = "Automation", - /** is any */ - Any = "Any", -} - -/** - * Defines values for ScriptCmdletAudience. \ - * {@link KnownScriptCmdletAudience} can be used interchangeably with ScriptCmdletAudience, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Automation**: is automation \ - * **Any**: is any - */ -export type ScriptCmdletAudience = string; - -/** Known values of {@link ScriptParameterTypes} that the service accepts. */ -export enum KnownScriptParameterTypes { - /** is string */ - String = "String", - /** is secure string */ - SecureString = "SecureString", - /** is credential */ - Credential = "Credential", - /** is int */ - Int = "Int", - /** is bool */ - Bool = "Bool", - /** is float */ - Float = "Float", -} - -/** - * Defines values for ScriptParameterTypes. \ - * {@link KnownScriptParameterTypes} can be used interchangeably with ScriptParameterTypes, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **String**: is string \ - * **SecureString**: is secure string \ - * **Credential**: is credential \ - * **Int**: is int \ - * **Bool**: is bool \ - * **Float**: is float - */ -export type ScriptParameterTypes = string; - -/** Known values of {@link VisibilityParameterEnum} that the service accepts. */ -export enum KnownVisibilityParameterEnum { - /** is visible */ - Visible = "Visible", - /** is hidden */ - Hidden = "Hidden", -} - -/** - * Defines values for VisibilityParameterEnum. \ - * {@link KnownVisibilityParameterEnum} can be used interchangeably with VisibilityParameterEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Visible**: is visible \ - * **Hidden**: is hidden - */ -export type VisibilityParameterEnum = string; - -/** Known values of {@link OptionalParamEnum} that the service accepts. */ -export enum KnownOptionalParamEnum { - /** is optional */ - Optional = "Optional", - /** is required */ - Required = "Required", -} - -/** - * Defines values for OptionalParamEnum. \ - * {@link KnownOptionalParamEnum} can be used interchangeably with OptionalParamEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Optional**: is optional \ - * **Required**: is required - */ -export type OptionalParamEnum = string; - -/** Known values of {@link WorkloadNetworkProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkProvisioningState. \ - * {@link KnownWorkloadNetworkProvisioningState} can be used interchangeably with WorkloadNetworkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkProvisioningState = string; - -/** Known values of {@link DhcpTypeEnum} that the service accepts. */ -export enum KnownDhcpTypeEnum { - /** Server */ - Server = "SERVER", - /** Relay */ - Relay = "RELAY", -} - -/** - * Defines values for DhcpTypeEnum. \ - * {@link KnownDhcpTypeEnum} can be used interchangeably with DhcpTypeEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SERVER** \ - * **RELAY** - */ -export type DhcpTypeEnum = string; - -/** Known values of {@link WorkloadNetworkDhcpProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkDhcpProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkDhcpProvisioningState. \ - * {@link KnownWorkloadNetworkDhcpProvisioningState} can be used interchangeably with WorkloadNetworkDhcpProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkDhcpProvisioningState = string; - -/** Known values of {@link DnsServiceLogLevelEnum} that the service accepts. */ -export enum KnownDnsServiceLogLevelEnum { - /** is debug */ - Debug = "DEBUG", - /** is info */ - Info = "INFO", - /** is warning */ - Warning = "WARNING", - /** is error */ - Error = "ERROR", - /** is fatal */ - Fatal = "FATAL", -} - -/** - * Defines values for DnsServiceLogLevelEnum. \ - * {@link KnownDnsServiceLogLevelEnum} can be used interchangeably with DnsServiceLogLevelEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DEBUG**: is debug \ - * **INFO**: is info \ - * **WARNING**: is warning \ - * **ERROR**: is error \ - * **FATAL**: is fatal - */ -export type DnsServiceLogLevelEnum = string; - -/** Known values of {@link DnsServiceStatusEnum} that the service accepts. */ -export enum KnownDnsServiceStatusEnum { - /** is success */ - Success = "SUCCESS", - /** is failure */ - Failure = "FAILURE", -} - -/** - * Defines values for DnsServiceStatusEnum. \ - * {@link KnownDnsServiceStatusEnum} can be used interchangeably with DnsServiceStatusEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SUCCESS**: is success \ - * **FAILURE**: is failure - */ -export type DnsServiceStatusEnum = string; - -/** Known values of {@link WorkloadNetworkDnsServiceProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkDnsServiceProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkDnsServiceProvisioningState. \ - * {@link KnownWorkloadNetworkDnsServiceProvisioningState} can be used interchangeably with WorkloadNetworkDnsServiceProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkDnsServiceProvisioningState = string; - -/** Known values of {@link WorkloadNetworkDnsZoneProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkDnsZoneProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkDnsZoneProvisioningState. \ - * {@link KnownWorkloadNetworkDnsZoneProvisioningState} can be used interchangeably with WorkloadNetworkDnsZoneProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkDnsZoneProvisioningState = string; - -/** Known values of {@link PortMirroringDirectionEnum} that the service accepts. */ -export enum KnownPortMirroringDirectionEnum { - /** is ingress */ - Ingress = "INGRESS", - /** is egress */ - Egress = "EGRESS", - /** is bidirectional */ - Bidirectional = "BIDIRECTIONAL", -} - -/** - * Defines values for PortMirroringDirectionEnum. \ - * {@link KnownPortMirroringDirectionEnum} can be used interchangeably with PortMirroringDirectionEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **INGRESS**: is ingress \ - * **EGRESS**: is egress \ - * **BIDIRECTIONAL**: is bidirectional - */ -export type PortMirroringDirectionEnum = string; - -/** Known values of {@link PortMirroringStatusEnum} that the service accepts. */ -export enum KnownPortMirroringStatusEnum { - /** is success */ - Success = "SUCCESS", - /** is failure */ - Failure = "FAILURE", -} - -/** - * Defines values for PortMirroringStatusEnum. \ - * {@link KnownPortMirroringStatusEnum} can be used interchangeably with PortMirroringStatusEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SUCCESS**: is success \ - * **FAILURE**: is failure - */ -export type PortMirroringStatusEnum = string; - -/** Known values of {@link WorkloadNetworkPortMirroringProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkPortMirroringProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkPortMirroringProvisioningState. \ - * {@link KnownWorkloadNetworkPortMirroringProvisioningState} can be used interchangeably with WorkloadNetworkPortMirroringProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkPortMirroringProvisioningState = string; - -/** Known values of {@link WorkloadNetworkPublicIPProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkPublicIPProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkPublicIPProvisioningState. \ - * {@link KnownWorkloadNetworkPublicIPProvisioningState} can be used interchangeably with WorkloadNetworkPublicIPProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkPublicIPProvisioningState = string; - -/** Known values of {@link SegmentStatusEnum} that the service accepts. */ -export enum KnownSegmentStatusEnum { - /** is success */ - Success = "SUCCESS", - /** is failure */ - Failure = "FAILURE", -} - -/** - * Defines values for SegmentStatusEnum. \ - * {@link KnownSegmentStatusEnum} can be used interchangeably with SegmentStatusEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SUCCESS**: is success \ - * **FAILURE**: is failure - */ -export type SegmentStatusEnum = string; - -/** Known values of {@link WorkloadNetworkSegmentProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkSegmentProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkSegmentProvisioningState. \ - * {@link KnownWorkloadNetworkSegmentProvisioningState} can be used interchangeably with WorkloadNetworkSegmentProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkSegmentProvisioningState = string; - -/** Known values of {@link VMTypeEnum} that the service accepts. */ -export enum KnownVMTypeEnum { - /** is regular */ - Regular = "REGULAR", - /** is edge */ - Edge = "EDGE", - /** is service */ - Service = "SERVICE", -} - -/** - * Defines values for VMTypeEnum. \ - * {@link KnownVMTypeEnum} can be used interchangeably with VMTypeEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **REGULAR**: is regular \ - * **EDGE**: is edge \ - * **SERVICE**: is service - */ -export type VMTypeEnum = string; - -/** Known values of {@link VMGroupStatusEnum} that the service accepts. */ -export enum KnownVMGroupStatusEnum { - /** is success */ - Success = "SUCCESS", - /** is failure */ - Failure = "FAILURE", -} - -/** - * Defines values for VMGroupStatusEnum. \ - * {@link KnownVMGroupStatusEnum} can be used interchangeably with VMGroupStatusEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SUCCESS**: is success \ - * **FAILURE**: is failure - */ -export type VMGroupStatusEnum = string; - -/** Known values of {@link WorkloadNetworkVMGroupProvisioningState} that the service accepts. */ -export enum KnownWorkloadNetworkVMGroupProvisioningState { - /** Resource has been created. */ - Succeeded = "Succeeded", - /** Resource creation failed. */ - Failed = "Failed", - /** Resource creation was canceled. */ - Canceled = "Canceled", - /** is building */ - Building = "Building", - /** is deleting */ - Deleting = "Deleting", - /** is updating */ - Updating = "Updating", -} - -/** - * Defines values for WorkloadNetworkVMGroupProvisioningState. \ - * {@link KnownWorkloadNetworkVMGroupProvisioningState} can be used interchangeably with WorkloadNetworkVMGroupProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded**: Resource has been created. \ - * **Failed**: Resource creation failed. \ - * **Canceled**: Resource creation was canceled. \ - * **Building**: is building \ - * **Deleting**: is deleting \ - * **Updating**: is updating - */ -export type WorkloadNetworkVMGroupProvisioningState = string; - -/** Known values of {@link AffinityType} that the service accepts. */ -export enum KnownAffinityType { - /** is affinity */ - Affinity = "Affinity", - /** is anti-affinity */ - AntiAffinity = "AntiAffinity", -} - -/** - * Defines values for AffinityType. \ - * {@link KnownAffinityType} can be used interchangeably with AffinityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Affinity**: is affinity \ - * **AntiAffinity**: is anti-affinity - */ -export type AffinityType = string; -/** Defines values for SkuTier. */ -export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; - -/** 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 LocationsCheckQuotaAvailabilityOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkQuotaAvailability operation. */ -export type LocationsCheckQuotaAvailabilityResponse = Quota; - -/** Optional parameters. */ -export interface LocationsCheckTrialAvailabilityOptionalParams - extends coreClient.OperationOptions { - /** Optionally, check for a specific SKU */ - sku?: Sku; -} - -/** Contains response data for the checkTrialAvailability operation. */ -export type LocationsCheckTrialAvailabilityResponse = Trial; - -/** Optional parameters. */ -export interface PrivateCloudsListInSubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listInSubscription operation. */ -export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList; - -/** Optional parameters. */ -export interface PrivateCloudsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PrivateCloudsListResponse = PrivateCloudList; - -/** Optional parameters. */ -export interface PrivateCloudsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateCloudsGetResponse = PrivateCloud; - -/** Optional parameters. */ -export interface PrivateCloudsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud; - -/** Optional parameters. */ -export interface PrivateCloudsUpdateOptionalParams - 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 update operation. */ -export type PrivateCloudsUpdateResponse = PrivateCloud; - -/** Optional parameters. */ -export interface PrivateCloudsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface PrivateCloudsListAdminCredentialsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAdminCredentials operation. */ -export type PrivateCloudsListAdminCredentialsResponse = AdminCredentials; - -/** Optional parameters. */ -export interface PrivateCloudsRotateNsxtPasswordOptionalParams - 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 rotateNsxtPassword operation. */ -export type PrivateCloudsRotateNsxtPasswordResponse = - PrivateCloudsRotateNsxtPasswordHeaders; - -/** Optional parameters. */ -export interface PrivateCloudsRotateVcenterPasswordOptionalParams - 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 rotateVcenterPassword operation. */ -export type PrivateCloudsRotateVcenterPasswordResponse = - PrivateCloudsRotateVcenterPasswordHeaders; - -/** Optional parameters. */ -export interface PrivateCloudsListInSubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listInSubscriptionNext operation. */ -export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList; - -/** Optional parameters. */ -export interface PrivateCloudsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PrivateCloudsListNextResponse = PrivateCloudList; - -/** Optional parameters. */ -export interface AddonsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AddonsListResponse = AddonList; - -/** Optional parameters. */ -export interface AddonsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AddonsGetResponse = Addon; - -/** Optional parameters. */ -export interface AddonsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type AddonsCreateOrUpdateResponse = Addon; - -/** Optional parameters. */ -export interface AddonsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface AddonsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AddonsListNextResponse = AddonList; - -/** Optional parameters. */ -export interface AuthorizationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AuthorizationsListResponse = ExpressRouteAuthorizationList; - -/** Optional parameters. */ -export interface AuthorizationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AuthorizationsGetResponse = ExpressRouteAuthorization; - -/** Optional parameters. */ -export interface AuthorizationsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization; - -/** Optional parameters. */ -export interface AuthorizationsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface AuthorizationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList; - -/** Optional parameters. */ -export interface CloudLinksListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type CloudLinksListResponse = CloudLinkList; - -/** Optional parameters. */ -export interface CloudLinksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CloudLinksGetResponse = CloudLink; - -/** Optional parameters. */ -export interface CloudLinksCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type CloudLinksCreateOrUpdateResponse = CloudLink; - -/** Optional parameters. */ -export interface CloudLinksDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface CloudLinksListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type CloudLinksListNextResponse = CloudLinkList; - -/** Optional parameters. */ -export interface ClustersListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClustersListResponse = 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 { - /** 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 ClustersUpdateOptionalParams - 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 update operation. */ -export type ClustersUpdateResponse = Cluster; - -/** Optional parameters. */ -export interface ClustersDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface ClustersListZonesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listZones operation. */ -export type ClustersListZonesResponse = ClusterZoneList; - -/** Optional parameters. */ -export interface ClustersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClustersListNextResponse = ClusterList; - -/** Optional parameters. */ -export interface DatastoresListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DatastoresListResponse = DatastoreList; - -/** Optional parameters. */ -export interface DatastoresGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DatastoresGetResponse = Datastore; - -/** Optional parameters. */ -export interface DatastoresCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type DatastoresCreateOrUpdateResponse = Datastore; - -/** Optional parameters. */ -export interface DatastoresDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface DatastoresListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type DatastoresListNextResponse = DatastoreList; - -/** Optional parameters. */ -export interface PlacementPoliciesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PlacementPoliciesListResponse = PlacementPoliciesList; - -/** Optional parameters. */ -export interface PlacementPoliciesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PlacementPoliciesGetResponse = PlacementPolicy; - -/** Optional parameters. */ -export interface PlacementPoliciesCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type PlacementPoliciesCreateOrUpdateResponse = PlacementPolicy; - -/** Optional parameters. */ -export interface PlacementPoliciesUpdateOptionalParams - 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 update operation. */ -export type PlacementPoliciesUpdateResponse = PlacementPolicy; - -/** Optional parameters. */ -export interface PlacementPoliciesDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface PlacementPoliciesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PlacementPoliciesListNextResponse = PlacementPoliciesList; - -/** Optional parameters. */ -export interface VirtualMachinesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type VirtualMachinesListResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface VirtualMachinesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachinesGetResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesRestrictMovementOptionalParams - 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 restrictMovement operation. */ -export type VirtualMachinesRestrictMovementResponse = - VirtualMachinesRestrictMovementHeaders; - -/** Optional parameters. */ -export interface VirtualMachinesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type VirtualMachinesListNextResponse = VirtualMachinesList; - -/** Optional parameters. */ -export interface GlobalReachConnectionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type GlobalReachConnectionsListResponse = GlobalReachConnectionList; - -/** Optional parameters. */ -export interface GlobalReachConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GlobalReachConnectionsGetResponse = GlobalReachConnection; - -/** Optional parameters. */ -export interface GlobalReachConnectionsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type GlobalReachConnectionsCreateOrUpdateResponse = - GlobalReachConnection; - -/** Optional parameters. */ -export interface GlobalReachConnectionsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface GlobalReachConnectionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type GlobalReachConnectionsListNextResponse = GlobalReachConnectionList; - -/** Optional parameters. */ -export interface HcxEnterpriseSitesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList; - -/** Optional parameters. */ -export interface HcxEnterpriseSitesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite; - -/** Optional parameters. */ -export interface HcxEnterpriseSitesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite; - -/** Optional parameters. */ -export interface HcxEnterpriseSitesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface HcxEnterpriseSitesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList; - -/** Optional parameters. */ -export interface IscsiPathsListByPrivateCloudOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateCloud operation. */ -export type IscsiPathsListByPrivateCloudResponse = IscsiPathListResult; - -/** Optional parameters. */ -export interface IscsiPathsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type IscsiPathsGetResponse = IscsiPath; - -/** Optional parameters. */ -export interface IscsiPathsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type IscsiPathsCreateOrUpdateResponse = IscsiPath; - -/** Optional parameters. */ -export interface IscsiPathsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface IscsiPathsListByPrivateCloudNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateCloudNext operation. */ -export type IscsiPathsListByPrivateCloudNextResponse = IscsiPathListResult; - -/** Optional parameters. */ -export interface ScriptExecutionsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ScriptExecutionsListResponse = ScriptExecutionsList; - -/** Optional parameters. */ -export interface ScriptExecutionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ScriptExecutionsGetResponse = ScriptExecution; - -/** Optional parameters. */ -export interface ScriptExecutionsCreateOrUpdateOptionalParams - 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 createOrUpdate operation. */ -export type ScriptExecutionsCreateOrUpdateResponse = ScriptExecution; - -/** Optional parameters. */ -export interface ScriptExecutionsDeleteOptionalParams - 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; -} - -/** Optional parameters. */ -export interface ScriptExecutionsGetExecutionLogsOptionalParams - extends coreClient.OperationOptions { - /** Name of the desired output stream to return. If not provided, will return all. An empty array will return nothing. */ - scriptOutputStreamType?: ScriptOutputStreamType[]; -} - -/** Contains response data for the getExecutionLogs operation. */ -export type ScriptExecutionsGetExecutionLogsResponse = ScriptExecution; - -/** Optional parameters. */ -export interface ScriptExecutionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ScriptExecutionsListNextResponse = ScriptExecutionsList; - -/** Optional parameters. */ -export interface ScriptPackagesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ScriptPackagesListResponse = ScriptPackagesList; - -/** Optional parameters. */ -export interface ScriptPackagesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ScriptPackagesGetResponse = ScriptPackage; - -/** Optional parameters. */ -export interface ScriptPackagesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ScriptPackagesListNextResponse = ScriptPackagesList; - -/** Optional parameters. */ -export interface ScriptCmdletsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ScriptCmdletsListResponse = ScriptCmdletsList; - -/** Optional parameters. */ -export interface ScriptCmdletsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ScriptCmdletsGetResponse = ScriptCmdlet; - -/** Optional parameters. */ -export interface ScriptCmdletsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ScriptCmdletsListNextResponse = ScriptCmdletsList; - -/** Optional parameters. */ -export interface WorkloadNetworksListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type WorkloadNetworksListResponse = WorkloadNetworkList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkloadNetworksGetResponse = WorkloadNetwork; - -/** Optional parameters. */ -export interface WorkloadNetworksListDhcpOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDhcp operation. */ -export type WorkloadNetworksListDhcpResponse = WorkloadNetworkDhcpList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetDhcpOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getDhcp operation. */ -export type WorkloadNetworksGetDhcpResponse = WorkloadNetworkDhcp; - -/** Optional parameters. */ -export interface WorkloadNetworksCreateDhcpOptionalParams - 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 createDhcp operation. */ -export type WorkloadNetworksCreateDhcpResponse = WorkloadNetworkDhcp; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdateDhcpOptionalParams - 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 updateDhcp operation. */ -export type WorkloadNetworksUpdateDhcpResponse = WorkloadNetworkDhcp; - -/** Optional parameters. */ -export interface WorkloadNetworksDeleteDhcpOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListDnsServicesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDnsServices operation. */ -export type WorkloadNetworksListDnsServicesResponse = - WorkloadNetworkDnsServicesList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetDnsServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getDnsService operation. */ -export type WorkloadNetworksGetDnsServiceResponse = WorkloadNetworkDnsService; - -/** Optional parameters. */ -export interface WorkloadNetworksCreateDnsServiceOptionalParams - 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 createDnsService operation. */ -export type WorkloadNetworksCreateDnsServiceResponse = - WorkloadNetworkDnsService; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdateDnsServiceOptionalParams - 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 updateDnsService operation. */ -export type WorkloadNetworksUpdateDnsServiceResponse = - WorkloadNetworkDnsService; - -/** Optional parameters. */ -export interface WorkloadNetworksDeleteDnsServiceOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListDnsZonesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDnsZones operation. */ -export type WorkloadNetworksListDnsZonesResponse = WorkloadNetworkDnsZonesList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetDnsZoneOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getDnsZone operation. */ -export type WorkloadNetworksGetDnsZoneResponse = WorkloadNetworkDnsZone; - -/** Optional parameters. */ -export interface WorkloadNetworksCreateDnsZoneOptionalParams - 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 createDnsZone operation. */ -export type WorkloadNetworksCreateDnsZoneResponse = WorkloadNetworkDnsZone; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdateDnsZoneOptionalParams - 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 updateDnsZone operation. */ -export type WorkloadNetworksUpdateDnsZoneResponse = WorkloadNetworkDnsZone; - -/** Optional parameters. */ -export interface WorkloadNetworksDeleteDnsZoneOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListGatewaysOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listGateways operation. */ -export type WorkloadNetworksListGatewaysResponse = WorkloadNetworkGatewayList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetGatewayOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getGateway operation. */ -export type WorkloadNetworksGetGatewayResponse = WorkloadNetworkGateway; - -/** Optional parameters. */ -export interface WorkloadNetworksListPortMirroringOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPortMirroring operation. */ -export type WorkloadNetworksListPortMirroringResponse = - WorkloadNetworkPortMirroringList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetPortMirroringOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPortMirroring operation. */ -export type WorkloadNetworksGetPortMirroringResponse = - WorkloadNetworkPortMirroring; - -/** Optional parameters. */ -export interface WorkloadNetworksCreatePortMirroringOptionalParams - 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 createPortMirroring operation. */ -export type WorkloadNetworksCreatePortMirroringResponse = - WorkloadNetworkPortMirroring; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdatePortMirroringOptionalParams - 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 updatePortMirroring operation. */ -export type WorkloadNetworksUpdatePortMirroringResponse = - WorkloadNetworkPortMirroring; - -/** Optional parameters. */ -export interface WorkloadNetworksDeletePortMirroringOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListPublicIPsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPublicIPs operation. */ -export type WorkloadNetworksListPublicIPsResponse = - WorkloadNetworkPublicIPsList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetPublicIPOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPublicIP operation. */ -export type WorkloadNetworksGetPublicIPResponse = WorkloadNetworkPublicIP; - -/** Optional parameters. */ -export interface WorkloadNetworksCreatePublicIPOptionalParams - 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 createPublicIP operation. */ -export type WorkloadNetworksCreatePublicIPResponse = WorkloadNetworkPublicIP; - -/** Optional parameters. */ -export interface WorkloadNetworksDeletePublicIPOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListSegmentsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSegments operation. */ -export type WorkloadNetworksListSegmentsResponse = WorkloadNetworkSegmentsList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetSegmentOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSegment operation. */ -export type WorkloadNetworksGetSegmentResponse = WorkloadNetworkSegment; - -/** Optional parameters. */ -export interface WorkloadNetworksCreateSegmentsOptionalParams - 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 createSegments operation. */ -export type WorkloadNetworksCreateSegmentsResponse = WorkloadNetworkSegment; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdateSegmentsOptionalParams - 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 updateSegments operation. */ -export type WorkloadNetworksUpdateSegmentsResponse = WorkloadNetworkSegment; - -/** Optional parameters. */ -export interface WorkloadNetworksDeleteSegmentOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListVirtualMachinesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachines operation. */ -export type WorkloadNetworksListVirtualMachinesResponse = - WorkloadNetworkVirtualMachinesList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetVirtualMachineOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getVirtualMachine operation. */ -export type WorkloadNetworksGetVirtualMachineResponse = - WorkloadNetworkVirtualMachine; - -/** Optional parameters. */ -export interface WorkloadNetworksListVMGroupsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVMGroups operation. */ -export type WorkloadNetworksListVMGroupsResponse = WorkloadNetworkVMGroupsList; - -/** Optional parameters. */ -export interface WorkloadNetworksGetVMGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getVMGroup operation. */ -export type WorkloadNetworksGetVMGroupResponse = WorkloadNetworkVMGroup; - -/** Optional parameters. */ -export interface WorkloadNetworksCreateVMGroupOptionalParams - 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 createVMGroup operation. */ -export type WorkloadNetworksCreateVMGroupResponse = WorkloadNetworkVMGroup; - -/** Optional parameters. */ -export interface WorkloadNetworksUpdateVMGroupOptionalParams - 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 updateVMGroup operation. */ -export type WorkloadNetworksUpdateVMGroupResponse = WorkloadNetworkVMGroup; - -/** Optional parameters. */ -export interface WorkloadNetworksDeleteVMGroupOptionalParams - 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; -} - -/** Optional parameters. */ -export interface WorkloadNetworksListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type WorkloadNetworksListNextResponse = WorkloadNetworkList; - -/** Optional parameters. */ -export interface WorkloadNetworksListDhcpNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDhcpNext operation. */ -export type WorkloadNetworksListDhcpNextResponse = WorkloadNetworkDhcpList; - -/** Optional parameters. */ -export interface WorkloadNetworksListDnsServicesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDnsServicesNext operation. */ -export type WorkloadNetworksListDnsServicesNextResponse = - WorkloadNetworkDnsServicesList; - -/** Optional parameters. */ -export interface WorkloadNetworksListDnsZonesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDnsZonesNext operation. */ -export type WorkloadNetworksListDnsZonesNextResponse = - WorkloadNetworkDnsZonesList; - -/** Optional parameters. */ -export interface WorkloadNetworksListGatewaysNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listGatewaysNext operation. */ -export type WorkloadNetworksListGatewaysNextResponse = - WorkloadNetworkGatewayList; - -/** Optional parameters. */ -export interface WorkloadNetworksListPortMirroringNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPortMirroringNext operation. */ -export type WorkloadNetworksListPortMirroringNextResponse = - WorkloadNetworkPortMirroringList; - -/** Optional parameters. */ -export interface WorkloadNetworksListPublicIPsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPublicIPsNext operation. */ -export type WorkloadNetworksListPublicIPsNextResponse = - WorkloadNetworkPublicIPsList; - -/** Optional parameters. */ -export interface WorkloadNetworksListSegmentsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSegmentsNext operation. */ -export type WorkloadNetworksListSegmentsNextResponse = - WorkloadNetworkSegmentsList; - -/** Optional parameters. */ -export interface WorkloadNetworksListVirtualMachinesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVirtualMachinesNext operation. */ -export type WorkloadNetworksListVirtualMachinesNextResponse = - WorkloadNetworkVirtualMachinesList; - -/** Optional parameters. */ -export interface WorkloadNetworksListVMGroupsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listVMGroupsNext operation. */ -export type WorkloadNetworksListVMGroupsNextResponse = - WorkloadNetworkVMGroupsList; - -/** Optional parameters. */ -export interface AzureVMwareSolutionAPIOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + WorkloadNetwork, + WorkloadNetworkProperties, + KnownWorkloadNetworkProvisioningState, + WorkloadNetworkProvisioningState, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + WorkloadNetworkSegment, + WorkloadNetworkSegmentProperties, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkSegmentPortVif, + KnownSegmentStatusEnum, + SegmentStatusEnum, + KnownWorkloadNetworkSegmentProvisioningState, + WorkloadNetworkSegmentProvisioningState, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpEntityUnion, + KnownDhcpTypeEnum, + DhcpTypeEnum, + KnownWorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpServer, + WorkloadNetworkDhcpRelay, + WorkloadNetworkGateway, + WorkloadNetworkGatewayProperties, + WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroringProperties, + KnownPortMirroringDirectionEnum, + PortMirroringDirectionEnum, + KnownPortMirroringStatusEnum, + PortMirroringStatusEnum, + KnownWorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkVMGroup, + WorkloadNetworkVMGroupProperties, + KnownVMGroupStatusEnum, + VMGroupStatusEnum, + KnownWorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVirtualMachineProperties, + KnownVMTypeEnum, + VMTypeEnum, + WorkloadNetworkDnsService, + WorkloadNetworkDnsServiceProperties, + KnownDnsServiceLogLevelEnum, + DnsServiceLogLevelEnum, + KnownDnsServiceStatusEnum, + DnsServiceStatusEnum, + KnownWorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsZone, + WorkloadNetworkDnsZoneProperties, + KnownWorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkPublicIP, + WorkloadNetworkPublicIPProperties, + KnownWorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkPublicIPProvisioningState, + IscsiPath, + IscsiPathProperties, + KnownIscsiPathProvisioningState, + IscsiPathProvisioningState, + ScriptExecution, + ScriptExecutionProperties, + ScriptExecutionParameter, + ScriptExecutionParameterUnion, + KnownScriptExecutionParameterType, + ScriptExecutionParameterType, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + PSCredentialExecutionParameter, + KnownScriptExecutionProvisioningState, + ScriptExecutionProvisioningState, + ScriptCmdlet, + ScriptCmdletProperties, + KnownScriptCmdletProvisioningState, + ScriptCmdletProvisioningState, + KnownScriptCmdletAudience, + ScriptCmdletAudience, + ScriptParameter, + KnownScriptParameterTypes, + ScriptParameterTypes, + KnownVisibilityParameterEnum, + VisibilityParameterEnum, + KnownOptionalParamEnum, + OptionalParamEnum, + ScriptPackage, + ScriptPackageProperties, + KnownScriptPackageProvisioningState, + ScriptPackageProvisioningState, + PlacementPolicy, + PlacementPolicyProperties, + PlacementPolicyPropertiesUnion, + KnownPlacementPolicyType, + PlacementPolicyType, + KnownPlacementPolicyState, + PlacementPolicyState, + KnownPlacementPolicyProvisioningState, + PlacementPolicyProvisioningState, + VmPlacementPolicyProperties, + KnownAffinityType, + AffinityType, + VmHostPlacementPolicyProperties, + KnownAffinityStrength, + AffinityStrength, + KnownAzureHybridBenefitType, + AzureHybridBenefitType, + PlacementPolicyUpdate, + PlacementPolicyUpdateProperties, + VirtualMachine, + VirtualMachineProperties, + KnownVirtualMachineProvisioningState, + VirtualMachineProvisioningState, + KnownVirtualMachineRestrictMovementState, + VirtualMachineRestrictMovementState, + VirtualMachineRestrictMovement, + Addon, + AddonProperties, + AddonPropertiesUnion, + KnownAddonType, + AddonType, + KnownAddonProvisioningState, + AddonProvisioningState, + AddonSrmProperties, + AddonVrProperties, + AddonHcxProperties, + AddonArcProperties, + CloudLink, + CloudLinkProperties, + KnownCloudLinkProvisioningState, + CloudLinkProvisioningState, + KnownCloudLinkStatus, + CloudLinkStatus, + GlobalReachConnection, + GlobalReachConnectionProperties, + KnownGlobalReachConnectionProvisioningState, + GlobalReachConnectionProvisioningState, + KnownGlobalReachConnectionStatus, + GlobalReachConnectionStatus, + ExpressRouteAuthorization, + ExpressRouteAuthorizationProperties, + KnownExpressRouteAuthorizationProvisioningState, + ExpressRouteAuthorizationProvisioningState, + HcxEnterpriseSite, + HcxEnterpriseSiteProperties, + KnownHcxEnterpriseSiteProvisioningState, + HcxEnterpriseSiteProvisioningState, + KnownHcxEnterpriseSiteStatus, + HcxEnterpriseSiteStatus, + Datastore, + DatastoreProperties, + KnownDatastoreProvisioningState, + DatastoreProvisioningState, + NetAppVolume, + DiskPoolVolume, + KnownMountOptionEnum, + MountOptionEnum, + ElasticSanVolume, + KnownDatastoreStatus, + DatastoreStatus, + Cluster, + ClusterProperties, + KnownClusterProvisioningState, + ClusterProvisioningState, + Sku, + SkuTier, + ClusterUpdate, + ClusterUpdateProperties, + ClusterZoneList, + ClusterZone, + PrivateCloud, + PrivateCloudProperties, + ManagementCluster, + KnownInternetEnum, + InternetEnum, + IdentitySource, + KnownSslEnum, + SslEnum, + AvailabilityProperties, + KnownAvailabilityStrategy, + AvailabilityStrategy, + Encryption, + KnownEncryptionState, + EncryptionState, + EncryptionKeyVaultProperties, + KnownEncryptionKeyStatus, + EncryptionKeyStatus, + KnownEncryptionVersionType, + EncryptionVersionType, + KnownPrivateCloudProvisioningState, + PrivateCloudProvisioningState, + Circuit, + Endpoints, + KnownNsxPublicIpQuotaRaisedEnum, + NsxPublicIpQuotaRaisedEnum, + KnownDnsZoneType, + DnsZoneType, + PrivateCloudIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + PrivateCloudUpdate, + PrivateCloudUpdateProperties, + AdminCredentials, + Trial, + KnownTrialStatus, + TrialStatus, + Quota, + KnownQuotaEnabled, + QuotaEnabled, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + KnownScriptOutputStreamType, + ScriptOutputStreamType, + KnownVersions, +} from "./models.js"; diff --git a/sdk/avs/arm-avs/src/models/mappers.ts b/sdk/avs/arm-avs/src/models/mappers.ts deleted file mode 100644 index f7ca4d7126e7..000000000000 --- a/sdk/avs/arm-avs/src/models/mappers.ts +++ /dev/null @@ -1,4379 +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 * 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 Quota: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Quota", - modelProperties: { - hostsRemaining: { - serializedName: "hostsRemaining", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "Number" } }, - }, - }, - quotaEnabled: { - serializedName: "quotaEnabled", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "Enum", - allowedValues: ["Free", "Basic", "Standard", "Premium"], - }, - }, - size: { - serializedName: "size", - type: { - name: "String", - }, - }, - family: { - serializedName: "family", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const Trial: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Trial", - modelProperties: { - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - availableHosts: { - serializedName: "availableHosts", - readOnly: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloudList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateCloud", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagementCluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagementCluster", - modelProperties: { - clusterSize: { - serializedName: "clusterSize", - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - clusterId: { - serializedName: "clusterId", - readOnly: true, - type: { - name: "Number", - }, - }, - hosts: { - serializedName: "hosts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vsanDatastoreName: { - serializedName: "vsanDatastoreName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentitySource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IdentitySource", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - alias: { - serializedName: "alias", - type: { - name: "String", - }, - }, - domain: { - serializedName: "domain", - type: { - name: "String", - }, - }, - baseUserDN: { - serializedName: "baseUserDN", - type: { - name: "String", - }, - }, - baseGroupDN: { - serializedName: "baseGroupDN", - type: { - name: "String", - }, - }, - primaryServer: { - serializedName: "primaryServer", - type: { - name: "String", - }, - }, - secondaryServer: { - serializedName: "secondaryServer", - type: { - name: "String", - }, - }, - ssl: { - serializedName: "ssl", - type: { - name: "String", - }, - }, - username: { - serializedName: "username", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailabilityProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailabilityProperties", - modelProperties: { - strategy: { - serializedName: "strategy", - type: { - name: "String", - }, - }, - zone: { - serializedName: "zone", - type: { - name: "Number", - }, - }, - secondaryZone: { - serializedName: "secondaryZone", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const Encryption: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Encryption", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - keyVaultProperties: { - serializedName: "keyVaultProperties", - type: { - name: "Composite", - className: "EncryptionKeyVaultProperties", - }, - }, - }, - }, -}; - -export const EncryptionKeyVaultProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EncryptionKeyVaultProperties", - modelProperties: { - keyName: { - serializedName: "keyName", - type: { - name: "String", - }, - }, - keyVersion: { - serializedName: "keyVersion", - type: { - name: "String", - }, - }, - autoDetectedKeyVersion: { - serializedName: "autoDetectedKeyVersion", - readOnly: true, - type: { - name: "String", - }, - }, - keyVaultUrl: { - serializedName: "keyVaultUrl", - type: { - name: "String", - }, - }, - keyState: { - serializedName: "keyState", - readOnly: true, - type: { - name: "String", - }, - }, - versionType: { - serializedName: "versionType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Circuit: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Circuit", - modelProperties: { - primarySubnet: { - serializedName: "primarySubnet", - readOnly: true, - type: { - name: "String", - }, - }, - secondarySubnet: { - serializedName: "secondarySubnet", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteID: { - serializedName: "expressRouteID", - readOnly: true, - type: { - name: "String", - }, - }, - expressRoutePrivatePeeringID: { - serializedName: "expressRoutePrivatePeeringID", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Endpoints: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Endpoints", - modelProperties: { - nsxtManager: { - serializedName: "nsxtManager", - readOnly: true, - type: { - name: "String", - }, - }, - vcsa: { - serializedName: "vcsa", - readOnly: true, - type: { - name: "String", - }, - }, - hcxCloudManager: { - serializedName: "hcxCloudManager", - readOnly: true, - type: { - name: "String", - }, - }, - nsxtManagerIp: { - serializedName: "nsxtManagerIp", - readOnly: true, - type: { - name: "String", - }, - }, - vcenterIp: { - serializedName: "vcenterIp", - readOnly: true, - type: { - name: "String", - }, - }, - hcxCloudManagerIp: { - serializedName: "hcxCloudManagerIp", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateCloudIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudIdentity", - 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", - }, - }, - }, - }, -}; - -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 PrivateCloudUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "PrivateCloudIdentity", - }, - }, - managementCluster: { - serializedName: "properties.managementCluster", - type: { - name: "Composite", - className: "ManagementCluster", - }, - }, - internet: { - serializedName: "properties.internet", - type: { - name: "String", - }, - }, - identitySources: { - serializedName: "properties.identitySources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentitySource", - }, - }, - }, - }, - availability: { - serializedName: "properties.availability", - type: { - name: "Composite", - className: "AvailabilityProperties", - }, - }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "Encryption", - }, - }, - extendedNetworkBlocks: { - serializedName: "properties.extendedNetworkBlocks", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - dnsZoneType: { - serializedName: "properties.dnsZoneType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddonList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddonList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Addon", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddonProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddonProperties", - uberParent: "AddonProperties", - polymorphicDiscriminator: { - serializedName: "addonType", - clientName: "addonType", - }, - modelProperties: { - addonType: { - serializedName: "addonType", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ExpressRouteAuthorizationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteAuthorizationList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteAuthorization", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudLinkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudLinkList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudLink", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Cluster", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpdate", - modelProperties: { - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - clusterSize: { - serializedName: "properties.clusterSize", - type: { - name: "Number", - }, - }, - hosts: { - serializedName: "properties.hosts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const DatastoreList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatastoreList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Datastore", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetAppVolume: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetAppVolume", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiskPoolVolume: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskPoolVolume", - modelProperties: { - targetId: { - serializedName: "targetId", - required: true, - type: { - name: "String", - }, - }, - lunName: { - serializedName: "lunName", - required: true, - type: { - name: "String", - }, - }, - mountOption: { - defaultValue: "MOUNT", - serializedName: "mountOption", - type: { - name: "String", - }, - }, - path: { - serializedName: "path", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ElasticSanVolume: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ElasticSanVolume", - modelProperties: { - targetId: { - serializedName: "targetId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterZoneList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterZoneList", - modelProperties: { - zones: { - serializedName: "zones", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterZone", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterZone: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterZone", - modelProperties: { - hosts: { - serializedName: "hosts", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - zone: { - serializedName: "zone", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PlacementPoliciesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPoliciesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PlacementPolicy", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PlacementPolicyProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPolicyProperties", - uberParent: "PlacementPolicyProperties", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type", - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PlacementPolicyUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPolicyUpdate", - modelProperties: { - state: { - serializedName: "properties.state", - type: { - name: "String", - }, - }, - vmMembers: { - serializedName: "properties.vmMembers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hostMembers: { - serializedName: "properties.hostMembers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - affinityStrength: { - serializedName: "properties.affinityStrength", - type: { - name: "String", - }, - }, - azureHybridBenefitType: { - serializedName: "properties.azureHybridBenefitType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachine", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineRestrictMovement: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineRestrictMovement", - modelProperties: { - restrictMovement: { - serializedName: "restrictMovement", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalReachConnectionList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GlobalReachConnectionList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GlobalReachConnection", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HcxEnterpriseSiteList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HcxEnterpriseSiteList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HcxEnterpriseSite", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IscsiPathListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IscsiPathListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IscsiPath", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdminCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdminCredentials", - modelProperties: { - nsxtUsername: { - serializedName: "nsxtUsername", - readOnly: true, - type: { - name: "String", - }, - }, - nsxtPassword: { - serializedName: "nsxtPassword", - readOnly: true, - type: { - name: "String", - }, - }, - vcenterUsername: { - serializedName: "vcenterUsername", - readOnly: true, - type: { - name: "String", - }, - }, - vcenterPassword: { - serializedName: "vcenterPassword", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptExecutionsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptExecutionsList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptExecution", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptExecutionParameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptExecutionParameter", - uberParent: "ScriptExecutionParameter", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type", - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptPackagesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptPackagesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptPackage", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptCmdletsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptCmdletsList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptCmdlet", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptParameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptParameter", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String", - }, - }, - visibility: { - serializedName: "visibility", - readOnly: true, - type: { - name: "String", - }, - }, - optional: { - serializedName: "optional", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetwork", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDhcpList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDhcpList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkDhcp", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDhcpEntity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDhcpEntity", - uberParent: "WorkloadNetworkDhcpEntity", - polymorphicDiscriminator: { - serializedName: "dhcpType", - clientName: "dhcpType", - }, - modelProperties: { - dhcpType: { - serializedName: "dhcpType", - required: true, - type: { - name: "String", - }, - }, - displayName: { - serializedName: "displayName", - type: { - name: "String", - }, - }, - segments: { - serializedName: "segments", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDnsServicesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDnsServicesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkDnsService", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDnsZonesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDnsZonesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkDnsZone", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkGatewayList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkGatewayList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkGateway", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkPortMirroringList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkPortMirroringList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkPortMirroring", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkPublicIPsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkPublicIPsList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkPublicIP", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkSegmentsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkSegmentsList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkSegment", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkSegmentSubnet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkSegmentSubnet", - modelProperties: { - dhcpRanges: { - serializedName: "dhcpRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - gatewayAddress: { - serializedName: "gatewayAddress", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkSegmentPortVif: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkSegmentPortVif", - modelProperties: { - portName: { - serializedName: "portName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkVirtualMachinesList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkVirtualMachinesList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkVirtualMachine", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkVMGroupsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkVMGroupsList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkVMGroup", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - 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 ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - -export const AddonArcProperties: coreClient.CompositeMapper = { - serializedName: "Arc", - type: { - name: "Composite", - className: "AddonArcProperties", - uberParent: "AddonProperties", - polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, - modelProperties: { - ...AddonProperties.type.modelProperties, - vCenter: { - serializedName: "vCenter", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddonHcxProperties: coreClient.CompositeMapper = { - serializedName: "HCX", - type: { - name: "Composite", - className: "AddonHcxProperties", - uberParent: "AddonProperties", - polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, - modelProperties: { - ...AddonProperties.type.modelProperties, - offer: { - serializedName: "offer", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddonSrmProperties: coreClient.CompositeMapper = { - serializedName: "SRM", - type: { - name: "Composite", - className: "AddonSrmProperties", - uberParent: "AddonProperties", - polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, - modelProperties: { - ...AddonProperties.type.modelProperties, - licenseKey: { - serializedName: "licenseKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AddonVrProperties: coreClient.CompositeMapper = { - serializedName: "VR", - type: { - name: "Composite", - className: "AddonVrProperties", - uberParent: "AddonProperties", - polymorphicDiscriminator: AddonProperties.type.polymorphicDiscriminator, - modelProperties: { - ...AddonProperties.type.modelProperties, - vrsCount: { - serializedName: "vrsCount", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VmHostPlacementPolicyProperties: coreClient.CompositeMapper = { - serializedName: "VmHost", - type: { - name: "Composite", - className: "VmHostPlacementPolicyProperties", - uberParent: "PlacementPolicyProperties", - polymorphicDiscriminator: - PlacementPolicyProperties.type.polymorphicDiscriminator, - modelProperties: { - ...PlacementPolicyProperties.type.modelProperties, - vmMembers: { - serializedName: "vmMembers", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hostMembers: { - serializedName: "hostMembers", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - affinityType: { - serializedName: "affinityType", - required: true, - type: { - name: "String", - }, - }, - affinityStrength: { - serializedName: "affinityStrength", - type: { - name: "String", - }, - }, - azureHybridBenefitType: { - serializedName: "azureHybridBenefitType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmPlacementPolicyProperties: coreClient.CompositeMapper = { - serializedName: "VmVm", - type: { - name: "Composite", - className: "VmPlacementPolicyProperties", - uberParent: "PlacementPolicyProperties", - polymorphicDiscriminator: - PlacementPolicyProperties.type.polymorphicDiscriminator, - modelProperties: { - ...PlacementPolicyProperties.type.modelProperties, - vmMembers: { - serializedName: "vmMembers", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - affinityType: { - serializedName: "affinityType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PSCredentialExecutionParameter: coreClient.CompositeMapper = { - serializedName: "Credential", - type: { - name: "Composite", - className: "PSCredentialExecutionParameter", - uberParent: "ScriptExecutionParameter", - polymorphicDiscriminator: - ScriptExecutionParameter.type.polymorphicDiscriminator, - modelProperties: { - ...ScriptExecutionParameter.type.modelProperties, - username: { - serializedName: "username", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptSecureStringExecutionParameter: coreClient.CompositeMapper = - { - serializedName: "SecureValue", - type: { - name: "Composite", - className: "ScriptSecureStringExecutionParameter", - uberParent: "ScriptExecutionParameter", - polymorphicDiscriminator: - ScriptExecutionParameter.type.polymorphicDiscriminator, - modelProperties: { - ...ScriptExecutionParameter.type.modelProperties, - secureValue: { - serializedName: "secureValue", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ScriptStringExecutionParameter: coreClient.CompositeMapper = { - serializedName: "Value", - type: { - name: "Composite", - className: "ScriptStringExecutionParameter", - uberParent: "ScriptExecutionParameter", - polymorphicDiscriminator: - ScriptExecutionParameter.type.polymorphicDiscriminator, - modelProperties: { - ...ScriptExecutionParameter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDhcpRelay: coreClient.CompositeMapper = { - serializedName: "RELAY", - type: { - name: "Composite", - className: "WorkloadNetworkDhcpRelay", - uberParent: "WorkloadNetworkDhcpEntity", - polymorphicDiscriminator: - WorkloadNetworkDhcpEntity.type.polymorphicDiscriminator, - modelProperties: { - ...WorkloadNetworkDhcpEntity.type.modelProperties, - serverAddresses: { - constraints: { - MinItems: 1, - MaxItems: 3, - }, - serializedName: "serverAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const WorkloadNetworkDhcpServer: coreClient.CompositeMapper = { - serializedName: "SERVER", - type: { - name: "Composite", - className: "WorkloadNetworkDhcpServer", - uberParent: "WorkloadNetworkDhcpEntity", - polymorphicDiscriminator: - WorkloadNetworkDhcpEntity.type.polymorphicDiscriminator, - modelProperties: { - ...WorkloadNetworkDhcpEntity.type.modelProperties, - serverAddress: { - serializedName: "serverAddress", - type: { - name: "String", - }, - }, - leaseTime: { - serializedName: "leaseTime", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloud: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloud", - modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "PrivateCloudIdentity", - }, - }, - managementCluster: { - serializedName: "properties.managementCluster", - type: { - name: "Composite", - className: "ManagementCluster", - }, - }, - internet: { - serializedName: "properties.internet", - type: { - name: "String", - }, - }, - identitySources: { - serializedName: "properties.identitySources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentitySource", - }, - }, - }, - }, - availability: { - serializedName: "properties.availability", - type: { - name: "Composite", - className: "AvailabilityProperties", - }, - }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "Encryption", - }, - }, - extendedNetworkBlocks: { - serializedName: "properties.extendedNetworkBlocks", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - circuit: { - serializedName: "properties.circuit", - type: { - name: "Composite", - className: "Circuit", - }, - }, - endpoints: { - serializedName: "properties.endpoints", - type: { - name: "Composite", - className: "Endpoints", - }, - }, - networkBlock: { - serializedName: "properties.networkBlock", - type: { - name: "String", - }, - }, - managementNetwork: { - serializedName: "properties.managementNetwork", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningNetwork: { - serializedName: "properties.provisioningNetwork", - readOnly: true, - type: { - name: "String", - }, - }, - vmotionNetwork: { - serializedName: "properties.vmotionNetwork", - readOnly: true, - type: { - name: "String", - }, - }, - vcenterPassword: { - serializedName: "properties.vcenterPassword", - type: { - name: "String", - }, - }, - nsxtPassword: { - serializedName: "properties.nsxtPassword", - type: { - name: "String", - }, - }, - vcenterCertificateThumbprint: { - serializedName: "properties.vcenterCertificateThumbprint", - readOnly: true, - type: { - name: "String", - }, - }, - nsxtCertificateThumbprint: { - serializedName: "properties.nsxtCertificateThumbprint", - readOnly: true, - type: { - name: "String", - }, - }, - externalCloudLinks: { - serializedName: "properties.externalCloudLinks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - secondaryCircuit: { - serializedName: "properties.secondaryCircuit", - type: { - name: "Composite", - className: "Circuit", - }, - }, - nsxPublicIpQuotaRaised: { - serializedName: "properties.nsxPublicIpQuotaRaised", - readOnly: true, - type: { - name: "String", - }, - }, - virtualNetworkId: { - serializedName: "properties.virtualNetworkId", - type: { - name: "String", - }, - }, - dnsZoneType: { - serializedName: "properties.dnsZoneType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Addon: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Addon", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "AddonProperties", - }, - }, - }, - }, -}; - -export const ExpressRouteAuthorization: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpressRouteAuthorization", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteAuthorizationId: { - serializedName: "properties.expressRouteAuthorizationId", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteAuthorizationKey: { - serializedName: "properties.expressRouteAuthorizationKey", - readOnly: true, - type: { - name: "String", - }, - }, - expressRouteId: { - serializedName: "properties.expressRouteId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudLink", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - linkedCloud: { - serializedName: "properties.linkedCloud", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Cluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Cluster", - modelProperties: { - ...ProxyResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - clusterSize: { - serializedName: "properties.clusterSize", - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "Number", - }, - }, - hosts: { - serializedName: "properties.hosts", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vsanDatastoreName: { - serializedName: "properties.vsanDatastoreName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Datastore: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Datastore", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - netAppVolume: { - serializedName: "properties.netAppVolume", - type: { - name: "Composite", - className: "NetAppVolume", - }, - }, - diskPoolVolume: { - serializedName: "properties.diskPoolVolume", - type: { - name: "Composite", - className: "DiskPoolVolume", - }, - }, - elasticSanVolume: { - serializedName: "properties.elasticSanVolume", - type: { - name: "Composite", - className: "ElasticSanVolume", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PlacementPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPolicy", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "PlacementPolicyProperties", - }, - }, - }, - }, -}; - -export const VirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - displayName: { - serializedName: "properties.displayName", - readOnly: true, - type: { - name: "String", - }, - }, - moRefId: { - serializedName: "properties.moRefId", - readOnly: true, - type: { - name: "String", - }, - }, - folderPath: { - serializedName: "properties.folderPath", - readOnly: true, - type: { - name: "String", - }, - }, - restrictMovement: { - serializedName: "properties.restrictMovement", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalReachConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GlobalReachConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - addressPrefix: { - serializedName: "properties.addressPrefix", - readOnly: true, - type: { - name: "String", - }, - }, - authorizationKey: { - serializedName: "properties.authorizationKey", - type: { - name: "String", - }, - }, - circuitConnectionStatus: { - serializedName: "properties.circuitConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - peerExpressRouteCircuit: { - serializedName: "properties.peerExpressRouteCircuit", - type: { - name: "String", - }, - }, - expressRouteId: { - serializedName: "properties.expressRouteId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HcxEnterpriseSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HcxEnterpriseSite", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - activationKey: { - serializedName: "properties.activationKey", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IscsiPath: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IscsiPath", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - networkBlock: { - serializedName: "properties.networkBlock", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptExecution: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptExecution", - modelProperties: { - ...ProxyResource.type.modelProperties, - scriptCmdletId: { - serializedName: "properties.scriptCmdletId", - type: { - name: "String", - }, - }, - parameters: { - serializedName: "properties.parameters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptExecutionParameter", - }, - }, - }, - }, - hiddenParameters: { - serializedName: "properties.hiddenParameters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptExecutionParameter", - }, - }, - }, - }, - failureReason: { - serializedName: "properties.failureReason", - type: { - name: "String", - }, - }, - timeout: { - serializedName: "properties.timeout", - type: { - name: "String", - }, - }, - retention: { - serializedName: "properties.retention", - type: { - name: "String", - }, - }, - submittedAt: { - serializedName: "properties.submittedAt", - readOnly: true, - type: { - name: "DateTime", - }, - }, - startedAt: { - serializedName: "properties.startedAt", - readOnly: true, - type: { - name: "DateTime", - }, - }, - finishedAt: { - serializedName: "properties.finishedAt", - readOnly: true, - type: { - name: "DateTime", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - output: { - serializedName: "properties.output", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - namedOutputs: { - serializedName: "properties.namedOutputs", - type: { - name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } }, - }, - }, - }, - information: { - serializedName: "properties.information", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - warnings: { - serializedName: "properties.warnings", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - errors: { - serializedName: "properties.errors", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ScriptPackage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptPackage", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "properties.version", - readOnly: true, - type: { - name: "String", - }, - }, - company: { - serializedName: "properties.company", - readOnly: true, - type: { - name: "String", - }, - }, - uri: { - serializedName: "properties.uri", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScriptCmdlet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptCmdlet", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - timeout: { - serializedName: "properties.timeout", - readOnly: true, - type: { - name: "String", - }, - }, - audience: { - serializedName: "properties.audience", - readOnly: true, - type: { - name: "String", - }, - }, - parameters: { - serializedName: "properties.parameters", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptParameter", - }, - }, - }, - }, - }, - }, -}; - -export const WorkloadNetwork: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetwork", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDhcp: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDhcp", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "WorkloadNetworkDhcpEntity", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDnsService: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDnsService", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - dnsServiceIp: { - serializedName: "properties.dnsServiceIp", - type: { - name: "String", - }, - }, - defaultDnsZone: { - serializedName: "properties.defaultDnsZone", - type: { - name: "String", - }, - }, - fqdnZones: { - serializedName: "properties.fqdnZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - logLevel: { - serializedName: "properties.logLevel", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "properties.revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworkDnsZone: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkDnsZone", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - domain: { - serializedName: "properties.domain", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - dnsServerIps: { - serializedName: "properties.dnsServerIps", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceIp: { - serializedName: "properties.sourceIp", - type: { - name: "String", - }, - }, - dnsServices: { - serializedName: "properties.dnsServices", - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "properties.revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworkGateway: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkGateway", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - path: { - serializedName: "properties.path", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkPortMirroring: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkPortMirroring", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - direction: { - serializedName: "properties.direction", - type: { - name: "String", - }, - }, - source: { - serializedName: "properties.source", - type: { - name: "String", - }, - }, - destination: { - serializedName: "properties.destination", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "properties.revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworkPublicIP: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkPublicIP", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - numberOfPublicIPs: { - serializedName: "properties.numberOfPublicIPs", - type: { - name: "Number", - }, - }, - publicIPBlock: { - serializedName: "properties.publicIPBlock", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkSegment: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkSegment", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - connectedGateway: { - serializedName: "properties.connectedGateway", - type: { - name: "String", - }, - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "WorkloadNetworkSegmentSubnet", - }, - }, - portVif: { - serializedName: "properties.portVif", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadNetworkSegmentPortVif", - }, - }, - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "properties.revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworkVirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkVirtualMachine", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - vmType: { - serializedName: "properties.vmType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkloadNetworkVMGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworkVMGroup", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String", - }, - }, - members: { - serializedName: "properties.members", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - revision: { - serializedName: "properties.revision", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloudsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloudsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudsUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloudsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateCloudsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PrivateCloudsRotateNsxtPasswordHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "PrivateCloudsRotateNsxtPasswordHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const PrivateCloudsRotateVcenterPasswordHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "PrivateCloudsRotateVcenterPasswordHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const AddonsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddonsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AddonsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AddonsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AuthorizationsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AuthorizationsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AuthorizationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AuthorizationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudLinksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudLinksCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudLinksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudLinksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClustersCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClustersUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClustersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DatastoresCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatastoresCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DatastoresDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatastoresDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PlacementPoliciesCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "PlacementPoliciesCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const PlacementPoliciesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPoliciesUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PlacementPoliciesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PlacementPoliciesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VirtualMachinesRestrictMovementHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "VirtualMachinesRestrictMovementHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const GlobalReachConnectionsCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "GlobalReachConnectionsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const GlobalReachConnectionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GlobalReachConnectionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const IscsiPathsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IscsiPathsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const IscsiPathsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IscsiPathsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ScriptExecutionsCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ScriptExecutionsCreateOrUpdateHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const ScriptExecutionsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScriptExecutionsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworksCreateDhcpHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworksCreateDhcpHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworksUpdateDhcpHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworksUpdateDhcpHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworksDeleteDhcpHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadNetworksDeleteDhcpHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const WorkloadNetworksCreateDnsServiceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreateDnsServiceHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksUpdateDnsServiceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksUpdateDnsServiceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeleteDnsServiceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeleteDnsServiceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksCreateDnsZoneHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreateDnsZoneHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksUpdateDnsZoneHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksUpdateDnsZoneHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeleteDnsZoneHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeleteDnsZoneHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksCreatePortMirroringHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreatePortMirroringHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksUpdatePortMirroringHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksUpdatePortMirroringHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeletePortMirroringHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeletePortMirroringHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksCreatePublicIPHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreatePublicIPHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeletePublicIPHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeletePublicIPHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksCreateSegmentsHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreateSegmentsHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksUpdateSegmentsHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksUpdateSegmentsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeleteSegmentHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeleteSegmentHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksCreateVMGroupHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksCreateVMGroupHeaders", - modelProperties: { - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksUpdateVMGroupHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksUpdateVMGroupHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const WorkloadNetworksDeleteVMGroupHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "WorkloadNetworksDeleteVMGroupHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export let discriminators = { - AddonProperties: AddonProperties, - PlacementPolicyProperties: PlacementPolicyProperties, - ScriptExecutionParameter: ScriptExecutionParameter, - WorkloadNetworkDhcpEntity: WorkloadNetworkDhcpEntity, - "AddonProperties.Arc": AddonArcProperties, - "AddonProperties.HCX": AddonHcxProperties, - "AddonProperties.SRM": AddonSrmProperties, - "AddonProperties.VR": AddonVrProperties, - "PlacementPolicyProperties.VmHost": VmHostPlacementPolicyProperties, - "PlacementPolicyProperties.VmVm": VmPlacementPolicyProperties, - "ScriptExecutionParameter.Credential": PSCredentialExecutionParameter, - "ScriptExecutionParameter.SecureValue": ScriptSecureStringExecutionParameter, - "ScriptExecutionParameter.Value": ScriptStringExecutionParameter, - "WorkloadNetworkDhcpEntity.RELAY": WorkloadNetworkDhcpRelay, - "WorkloadNetworkDhcpEntity.SERVER": WorkloadNetworkDhcpServer, -}; diff --git a/sdk/avs/arm-avs/src/models/models.ts b/sdk/avs/arm-avs/src/models/models.ts new file mode 100644 index 000000000000..683969af72de --- /dev/null +++ b/sdk/avs/arm-avs/src/models/models.ts @@ -0,0 +1,5383 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** The response of a WorkloadNetwork list operation. */ +export interface _WorkloadNetworkList { + /** The WorkloadNetwork items on this page */ + value: WorkloadNetwork[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkListDeserializer( + item: any, +): _WorkloadNetworkList { + return { + value: workloadNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDeserializer(item); + }); +} + +/** Workload Network */ +export interface WorkloadNetwork extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkProperties; +} + +export function workloadNetworkDeserializer(item: any): WorkloadNetwork { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of a workload network */ +export interface WorkloadNetworkProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: WorkloadNetworkProvisioningState; +} + +export function workloadNetworkPropertiesDeserializer( + item: any, +): WorkloadNetworkProperties { + return { + provisioningState: item["provisioningState"], + }; +} + +/** base Workload Network provisioning state */ +export enum KnownWorkloadNetworkProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * base Workload Network provisioning state \ + * {@link KnownWorkloadNetworkProvisioningState} can be used interchangeably with WorkloadNetworkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkProvisioningState = string; + +/** 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 proxyResourceSerializer(item: ProxyResource): any { + return item; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** 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 item; +} + +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; + +/** The response of a WorkloadNetworkSegment list operation. */ +export interface _WorkloadNetworkSegmentsList { + /** The WorkloadNetworkSegment items on this page */ + value: WorkloadNetworkSegment[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkSegmentsListDeserializer( + item: any, +): _WorkloadNetworkSegmentsList { + return { + value: workloadNetworkSegmentArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkSegmentArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkSegmentSerializer(item); + }); +} + +export function workloadNetworkSegmentArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkSegmentDeserializer(item); + }); +} + +/** NSX Segment */ +export interface WorkloadNetworkSegment extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkSegmentProperties; +} + +export function workloadNetworkSegmentSerializer( + item: WorkloadNetworkSegment, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkSegmentPropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkSegmentDeserializer( + item: any, +): WorkloadNetworkSegment { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkSegmentPropertiesDeserializer(item["properties"]), + }; +} + +/** NSX Segment Properties */ +export interface WorkloadNetworkSegmentProperties { + /** Display name of the segment. */ + displayName?: string; + /** Gateway which to connect segment to. */ + connectedGateway?: string; + /** Subnet which to connect segment to. */ + subnet?: WorkloadNetworkSegmentSubnet; + /** Port Vif which segment is associated with. */ + readonly portVif?: WorkloadNetworkSegmentPortVif[]; + /** Segment status. */ + readonly status?: SegmentStatusEnum; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkSegmentProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkSegmentPropertiesSerializer( + item: WorkloadNetworkSegmentProperties, +): any { + return { + displayName: item["displayName"], + connectedGateway: item["connectedGateway"], + subnet: !item["subnet"] + ? item["subnet"] + : workloadNetworkSegmentSubnetSerializer(item["subnet"]), + revision: item["revision"], + }; +} + +export function workloadNetworkSegmentPropertiesDeserializer( + item: any, +): WorkloadNetworkSegmentProperties { + return { + displayName: item["displayName"], + connectedGateway: item["connectedGateway"], + subnet: !item["subnet"] + ? item["subnet"] + : workloadNetworkSegmentSubnetDeserializer(item["subnet"]), + portVif: !item["portVif"] + ? item["portVif"] + : workloadNetworkSegmentPortVifArrayDeserializer(item["portVif"]), + status: item["status"], + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** Subnet configuration for segment */ +export interface WorkloadNetworkSegmentSubnet { + /** DHCP Range assigned for subnet. */ + dhcpRanges?: string[]; + /** Gateway address. */ + gatewayAddress?: string; +} + +export function workloadNetworkSegmentSubnetSerializer( + item: WorkloadNetworkSegmentSubnet, +): any { + return { + dhcpRanges: !item["dhcpRanges"] + ? item["dhcpRanges"] + : item["dhcpRanges"].map((p: any) => { + return p; + }), + gatewayAddress: item["gatewayAddress"], + }; +} + +export function workloadNetworkSegmentSubnetDeserializer( + item: any, +): WorkloadNetworkSegmentSubnet { + return { + dhcpRanges: !item["dhcpRanges"] + ? item["dhcpRanges"] + : item["dhcpRanges"].map((p: any) => { + return p; + }), + gatewayAddress: item["gatewayAddress"], + }; +} + +export function workloadNetworkSegmentPortVifArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkSegmentPortVifDeserializer(item); + }); +} + +/** Ports and any VIF attached to segment. */ +export interface WorkloadNetworkSegmentPortVif { + /** Name of port or VIF attached to segment. */ + portName?: string; +} + +export function workloadNetworkSegmentPortVifDeserializer( + item: any, +): WorkloadNetworkSegmentPortVif { + return { + portName: item["portName"], + }; +} + +/** Segment status */ +export enum KnownSegmentStatusEnum { + /** is success */ + SUCCESS = "SUCCESS", + /** is failure */ + FAILURE = "FAILURE", +} + +/** + * Segment status \ + * {@link KnownSegmentStatusEnum} can be used interchangeably with SegmentStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SUCCESS**: is success \ + * **FAILURE**: is failure + */ +export type SegmentStatusEnum = string; + +/** Workload Network Segment provisioning state */ +export enum KnownWorkloadNetworkSegmentProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network Segment provisioning state \ + * {@link KnownWorkloadNetworkSegmentProvisioningState} can be used interchangeably with WorkloadNetworkSegmentProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkSegmentProvisioningState = string; + +/** The response of a WorkloadNetworkDhcp list operation. */ +export interface _WorkloadNetworkDhcpList { + /** The WorkloadNetworkDhcp items on this page */ + value: WorkloadNetworkDhcp[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkDhcpListDeserializer( + item: any, +): _WorkloadNetworkDhcpList { + return { + value: workloadNetworkDhcpArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkDhcpArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDhcpSerializer(item); + }); +} + +export function workloadNetworkDhcpArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDhcpDeserializer(item); + }); +} + +/** NSX DHCP */ +export interface WorkloadNetworkDhcp extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkDhcpEntityUnion; +} + +export function workloadNetworkDhcpSerializer(item: WorkloadNetworkDhcp): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDhcpEntityUnionSerializer(item["properties"]), + }; +} + +export function workloadNetworkDhcpDeserializer( + item: any, +): WorkloadNetworkDhcp { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDhcpEntityUnionDeserializer(item["properties"]), + }; +} + +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + * inherit from + */ +export interface WorkloadNetworkDhcpEntity { + /** Type of DHCP: SERVER or RELAY. */ + /** The discriminator possible values: SERVER, RELAY */ + dhcpType: DhcpTypeEnum; + /** Display name of the DHCP entity. */ + displayName?: string; + /** NSX Segments consuming DHCP. */ + readonly segments?: string[]; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkDhcpProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkDhcpEntitySerializer( + item: WorkloadNetworkDhcpEntity, +): any { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + revision: item["revision"], + }; +} + +export function workloadNetworkDhcpEntityDeserializer( + item: any, +): WorkloadNetworkDhcpEntity { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + segments: !item["segments"] + ? item["segments"] + : item["segments"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** Alias for WorkloadNetworkDhcpEntityUnion */ +export type WorkloadNetworkDhcpEntityUnion = + | WorkloadNetworkDhcpServer + | WorkloadNetworkDhcpRelay + | WorkloadNetworkDhcpEntity; + +export function workloadNetworkDhcpEntityUnionSerializer( + item: WorkloadNetworkDhcpEntityUnion, +): any { + switch (item.dhcpType) { + case "SERVER": + return workloadNetworkDhcpServerSerializer( + item as WorkloadNetworkDhcpServer, + ); + + case "RELAY": + return workloadNetworkDhcpRelaySerializer( + item as WorkloadNetworkDhcpRelay, + ); + + default: + return workloadNetworkDhcpEntitySerializer(item); + } +} + +export function workloadNetworkDhcpEntityUnionDeserializer( + item: any, +): WorkloadNetworkDhcpEntityUnion { + switch (item.dhcpType) { + case "SERVER": + return workloadNetworkDhcpServerDeserializer( + item as WorkloadNetworkDhcpServer, + ); + + case "RELAY": + return workloadNetworkDhcpRelayDeserializer( + item as WorkloadNetworkDhcpRelay, + ); + + default: + return workloadNetworkDhcpEntityDeserializer(item); + } +} + +/** Type of DHCP: SERVER or RELAY. */ +export enum KnownDhcpTypeEnum { + SERVER = "SERVER", + RELAY = "RELAY", +} + +/** + * Type of DHCP: SERVER or RELAY. \ + * {@link KnownDhcpTypeEnum} can be used interchangeably with DhcpTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SERVER** \ + * **RELAY** + */ +export type DhcpTypeEnum = string; + +/** Workload Network DHCP provisioning state */ +export enum KnownWorkloadNetworkDhcpProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network DHCP provisioning state \ + * {@link KnownWorkloadNetworkDhcpProvisioningState} can be used interchangeably with WorkloadNetworkDhcpProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkDhcpProvisioningState = string; + +/** NSX DHCP Server */ +export interface WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { + /** DHCP Server Address. */ + serverAddress?: string; + /** DHCP Server Lease Time. */ + leaseTime?: number; + /** Type of DHCP: SERVER or RELAY. */ + dhcpType: "SERVER"; +} + +export function workloadNetworkDhcpServerSerializer( + item: WorkloadNetworkDhcpServer, +): any { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + revision: item["revision"], + serverAddress: item["serverAddress"], + leaseTime: item["leaseTime"], + }; +} + +export function workloadNetworkDhcpServerDeserializer( + item: any, +): WorkloadNetworkDhcpServer { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + segments: !item["segments"] + ? item["segments"] + : item["segments"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + revision: item["revision"], + serverAddress: item["serverAddress"], + leaseTime: item["leaseTime"], + }; +} + +/** NSX DHCP Relay */ +export interface WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { + /** DHCP Relay Addresses. Max 3. */ + serverAddresses?: string[]; + /** Type of DHCP: SERVER or RELAY. */ + dhcpType: "RELAY"; +} + +export function workloadNetworkDhcpRelaySerializer( + item: WorkloadNetworkDhcpRelay, +): any { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + revision: item["revision"], + serverAddresses: !item["serverAddresses"] + ? item["serverAddresses"] + : item["serverAddresses"].map((p: any) => { + return p; + }), + }; +} + +export function workloadNetworkDhcpRelayDeserializer( + item: any, +): WorkloadNetworkDhcpRelay { + return { + dhcpType: item["dhcpType"], + displayName: item["displayName"], + segments: !item["segments"] + ? item["segments"] + : item["segments"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + revision: item["revision"], + serverAddresses: !item["serverAddresses"] + ? item["serverAddresses"] + : item["serverAddresses"].map((p: any) => { + return p; + }), + }; +} + +/** The response of a WorkloadNetworkGateway list operation. */ +export interface _WorkloadNetworkGatewayList { + /** The WorkloadNetworkGateway items on this page */ + value: WorkloadNetworkGateway[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkGatewayListDeserializer( + item: any, +): _WorkloadNetworkGatewayList { + return { + value: workloadNetworkGatewayArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkGatewayArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkGatewayDeserializer(item); + }); +} + +/** NSX Gateway. */ +export interface WorkloadNetworkGateway extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkGatewayProperties; +} + +export function workloadNetworkGatewayDeserializer( + item: any, +): WorkloadNetworkGateway { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkGatewayPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of a NSX Gateway. */ +export interface WorkloadNetworkGatewayProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: WorkloadNetworkProvisioningState; + /** Display name of the DHCP entity. */ + displayName?: string; + /** NSX Gateway Path. */ + readonly path?: string; +} + +export function workloadNetworkGatewayPropertiesDeserializer( + item: any, +): WorkloadNetworkGatewayProperties { + return { + provisioningState: item["provisioningState"], + displayName: item["displayName"], + path: item["path"], + }; +} + +/** The response of a WorkloadNetworkPortMirroring list operation. */ +export interface _WorkloadNetworkPortMirroringList { + /** The WorkloadNetworkPortMirroring items on this page */ + value: WorkloadNetworkPortMirroring[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkPortMirroringListDeserializer( + item: any, +): _WorkloadNetworkPortMirroringList { + return { + value: workloadNetworkPortMirroringArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkPortMirroringArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkPortMirroringSerializer(item); + }); +} + +export function workloadNetworkPortMirroringArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkPortMirroringDeserializer(item); + }); +} + +/** NSX Port Mirroring */ +export interface WorkloadNetworkPortMirroring extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkPortMirroringProperties; +} + +export function workloadNetworkPortMirroringSerializer( + item: WorkloadNetworkPortMirroring, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkPortMirroringPropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkPortMirroringDeserializer( + item: any, +): WorkloadNetworkPortMirroring { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkPortMirroringPropertiesDeserializer(item["properties"]), + }; +} + +/** NSX Port Mirroring Properties */ +export interface WorkloadNetworkPortMirroringProperties { + /** Display name of the port mirroring profile. */ + displayName?: string; + /** Direction of port mirroring profile. */ + direction?: PortMirroringDirectionEnum; + /** Source VM Group. */ + source?: string; + /** Destination VM Group. */ + destination?: string; + /** Port Mirroring Status. */ + readonly status?: PortMirroringStatusEnum; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkPortMirroringProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkPortMirroringPropertiesSerializer( + item: WorkloadNetworkPortMirroringProperties, +): any { + return { + displayName: item["displayName"], + direction: item["direction"], + source: item["source"], + destination: item["destination"], + revision: item["revision"], + }; +} + +export function workloadNetworkPortMirroringPropertiesDeserializer( + item: any, +): WorkloadNetworkPortMirroringProperties { + return { + displayName: item["displayName"], + direction: item["direction"], + source: item["source"], + destination: item["destination"], + status: item["status"], + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** Port Mirroring Direction */ +export enum KnownPortMirroringDirectionEnum { + /** is ingress */ + INGRESS = "INGRESS", + /** is egress */ + EGRESS = "EGRESS", + /** is bidirectional */ + BIDIRECTIONAL = "BIDIRECTIONAL", +} + +/** + * Port Mirroring Direction \ + * {@link KnownPortMirroringDirectionEnum} can be used interchangeably with PortMirroringDirectionEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **INGRESS**: is ingress \ + * **EGRESS**: is egress \ + * **BIDIRECTIONAL**: is bidirectional + */ +export type PortMirroringDirectionEnum = string; + +/** Port Mirroring status */ +export enum KnownPortMirroringStatusEnum { + /** is success */ + SUCCESS = "SUCCESS", + /** is failure */ + FAILURE = "FAILURE", +} + +/** + * Port Mirroring status \ + * {@link KnownPortMirroringStatusEnum} can be used interchangeably with PortMirroringStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SUCCESS**: is success \ + * **FAILURE**: is failure + */ +export type PortMirroringStatusEnum = string; + +/** Workload Network Port Mirroring provisioning state */ +export enum KnownWorkloadNetworkPortMirroringProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network Port Mirroring provisioning state \ + * {@link KnownWorkloadNetworkPortMirroringProvisioningState} can be used interchangeably with WorkloadNetworkPortMirroringProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkPortMirroringProvisioningState = string; + +/** The response of a WorkloadNetworkVMGroup list operation. */ +export interface _WorkloadNetworkVMGroupsList { + /** The WorkloadNetworkVMGroup items on this page */ + value: WorkloadNetworkVMGroup[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkVMGroupsListDeserializer( + item: any, +): _WorkloadNetworkVMGroupsList { + return { + value: workloadNetworkVMGroupArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkVMGroupArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkVMGroupSerializer(item); + }); +} + +export function workloadNetworkVMGroupArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkVMGroupDeserializer(item); + }); +} + +/** NSX VM Group */ +export interface WorkloadNetworkVMGroup extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkVMGroupProperties; +} + +export function workloadNetworkVMGroupSerializer( + item: WorkloadNetworkVMGroup, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkVMGroupPropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkVMGroupDeserializer( + item: any, +): WorkloadNetworkVMGroup { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkVMGroupPropertiesDeserializer(item["properties"]), + }; +} + +/** NSX VM Group Properties */ +export interface WorkloadNetworkVMGroupProperties { + /** Display name of the VM group. */ + displayName?: string; + /** Virtual machine members of this group. */ + members?: string[]; + /** VM Group status. */ + readonly status?: VMGroupStatusEnum; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkVMGroupPropertiesSerializer( + item: WorkloadNetworkVMGroupProperties, +): any { + return { + displayName: item["displayName"], + members: !item["members"] + ? item["members"] + : item["members"].map((p: any) => { + return p; + }), + revision: item["revision"], + }; +} + +export function workloadNetworkVMGroupPropertiesDeserializer( + item: any, +): WorkloadNetworkVMGroupProperties { + return { + displayName: item["displayName"], + members: !item["members"] + ? item["members"] + : item["members"].map((p: any) => { + return p; + }), + status: item["status"], + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** VM group status */ +export enum KnownVMGroupStatusEnum { + /** is success */ + SUCCESS = "SUCCESS", + /** is failure */ + FAILURE = "FAILURE", +} + +/** + * VM group status \ + * {@link KnownVMGroupStatusEnum} can be used interchangeably with VMGroupStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SUCCESS**: is success \ + * **FAILURE**: is failure + */ +export type VMGroupStatusEnum = string; + +/** Workload Network VM Group provisioning state */ +export enum KnownWorkloadNetworkVMGroupProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network VM Group provisioning state \ + * {@link KnownWorkloadNetworkVMGroupProvisioningState} can be used interchangeably with WorkloadNetworkVMGroupProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkVMGroupProvisioningState = string; + +/** The response of a WorkloadNetworkVirtualMachine list operation. */ +export interface _WorkloadNetworkVirtualMachinesList { + /** The WorkloadNetworkVirtualMachine items on this page */ + value: WorkloadNetworkVirtualMachine[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkVirtualMachinesListDeserializer( + item: any, +): _WorkloadNetworkVirtualMachinesList { + return { + value: workloadNetworkVirtualMachineArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkVirtualMachineArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkVirtualMachineDeserializer(item); + }); +} + +/** NSX Virtual Machine */ +export interface WorkloadNetworkVirtualMachine extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkVirtualMachineProperties; +} + +export function workloadNetworkVirtualMachineDeserializer( + item: any, +): WorkloadNetworkVirtualMachine { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkVirtualMachinePropertiesDeserializer(item["properties"]), + }; +} + +/** NSX Virtual Machine Properties */ +export interface WorkloadNetworkVirtualMachineProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: WorkloadNetworkProvisioningState; + /** Display name of the VM. */ + displayName?: string; + /** Virtual machine type. */ + readonly vmType?: VMTypeEnum; +} + +export function workloadNetworkVirtualMachinePropertiesDeserializer( + item: any, +): WorkloadNetworkVirtualMachineProperties { + return { + provisioningState: item["provisioningState"], + displayName: item["displayName"], + vmType: item["vmType"], + }; +} + +/** VM type */ +export enum KnownVMTypeEnum { + /** is regular */ + REGULAR = "REGULAR", + /** is edge */ + EDGE = "EDGE", + /** is service */ + SERVICE = "SERVICE", +} + +/** + * VM type \ + * {@link KnownVMTypeEnum} can be used interchangeably with VMTypeEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **REGULAR**: is regular \ + * **EDGE**: is edge \ + * **SERVICE**: is service + */ +export type VMTypeEnum = string; + +/** The response of a WorkloadNetworkDnsService list operation. */ +export interface _WorkloadNetworkDnsServicesList { + /** The WorkloadNetworkDnsService items on this page */ + value: WorkloadNetworkDnsService[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkDnsServicesListDeserializer( + item: any, +): _WorkloadNetworkDnsServicesList { + return { + value: workloadNetworkDnsServiceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkDnsServiceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDnsServiceSerializer(item); + }); +} + +export function workloadNetworkDnsServiceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDnsServiceDeserializer(item); + }); +} + +/** NSX DNS Service */ +export interface WorkloadNetworkDnsService extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkDnsServiceProperties; +} + +export function workloadNetworkDnsServiceSerializer( + item: WorkloadNetworkDnsService, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDnsServicePropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkDnsServiceDeserializer( + item: any, +): WorkloadNetworkDnsService { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDnsServicePropertiesDeserializer(item["properties"]), + }; +} + +/** NSX DNS Service Properties */ +export interface WorkloadNetworkDnsServiceProperties { + /** Display name of the DNS Service. */ + displayName?: string; + /** DNS service IP of the DNS Service. */ + dnsServiceIp?: string; + /** Default DNS zone of the DNS Service. */ + defaultDnsZone?: string; + /** FQDN zones of the DNS Service. */ + fqdnZones?: string[]; + /** DNS Service log level. */ + logLevel?: DnsServiceLogLevelEnum; + /** DNS Service status. */ + readonly status?: DnsServiceStatusEnum; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkDnsServiceProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkDnsServicePropertiesSerializer( + item: WorkloadNetworkDnsServiceProperties, +): any { + return { + displayName: item["displayName"], + dnsServiceIp: item["dnsServiceIp"], + defaultDnsZone: item["defaultDnsZone"], + fqdnZones: !item["fqdnZones"] + ? item["fqdnZones"] + : item["fqdnZones"].map((p: any) => { + return p; + }), + logLevel: item["logLevel"], + revision: item["revision"], + }; +} + +export function workloadNetworkDnsServicePropertiesDeserializer( + item: any, +): WorkloadNetworkDnsServiceProperties { + return { + displayName: item["displayName"], + dnsServiceIp: item["dnsServiceIp"], + defaultDnsZone: item["defaultDnsZone"], + fqdnZones: !item["fqdnZones"] + ? item["fqdnZones"] + : item["fqdnZones"].map((p: any) => { + return p; + }), + logLevel: item["logLevel"], + status: item["status"], + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** DNS service log level */ +export enum KnownDnsServiceLogLevelEnum { + /** is debug */ + DEBUG = "DEBUG", + /** is info */ + INFO = "INFO", + /** is warning */ + WARNING = "WARNING", + /** is error */ + ERROR = "ERROR", + /** is fatal */ + FATAL = "FATAL", +} + +/** + * DNS service log level \ + * {@link KnownDnsServiceLogLevelEnum} can be used interchangeably with DnsServiceLogLevelEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DEBUG**: is debug \ + * **INFO**: is info \ + * **WARNING**: is warning \ + * **ERROR**: is error \ + * **FATAL**: is fatal + */ +export type DnsServiceLogLevelEnum = string; + +/** DNS service status */ +export enum KnownDnsServiceStatusEnum { + /** is success */ + SUCCESS = "SUCCESS", + /** is failure */ + FAILURE = "FAILURE", +} + +/** + * DNS service status \ + * {@link KnownDnsServiceStatusEnum} can be used interchangeably with DnsServiceStatusEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SUCCESS**: is success \ + * **FAILURE**: is failure + */ +export type DnsServiceStatusEnum = string; + +/** Workload Network DNS Service provisioning state */ +export enum KnownWorkloadNetworkDnsServiceProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network DNS Service provisioning state \ + * {@link KnownWorkloadNetworkDnsServiceProvisioningState} can be used interchangeably with WorkloadNetworkDnsServiceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkDnsServiceProvisioningState = string; + +/** The response of a WorkloadNetworkDnsZone list operation. */ +export interface _WorkloadNetworkDnsZonesList { + /** The WorkloadNetworkDnsZone items on this page */ + value: WorkloadNetworkDnsZone[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkDnsZonesListDeserializer( + item: any, +): _WorkloadNetworkDnsZonesList { + return { + value: workloadNetworkDnsZoneArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkDnsZoneArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDnsZoneSerializer(item); + }); +} + +export function workloadNetworkDnsZoneArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkDnsZoneDeserializer(item); + }); +} + +/** NSX DNS Zone */ +export interface WorkloadNetworkDnsZone extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkDnsZoneProperties; +} + +export function workloadNetworkDnsZoneSerializer( + item: WorkloadNetworkDnsZone, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDnsZonePropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkDnsZoneDeserializer( + item: any, +): WorkloadNetworkDnsZone { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkDnsZonePropertiesDeserializer(item["properties"]), + }; +} + +/** NSX DNS Zone Properties */ +export interface WorkloadNetworkDnsZoneProperties { + /** Display name of the DNS Zone. */ + displayName?: string; + /** Domain names of the DNS Zone. */ + domain?: string[]; + /** DNS Server IP array of the DNS Zone. */ + dnsServerIps?: string[]; + /** Source IP of the DNS Zone. */ + sourceIp?: string; + /** Number of DNS Services using the DNS zone. */ + dnsServices?: number; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkDnsZoneProvisioningState; + /** NSX revision number. */ + revision?: number; +} + +export function workloadNetworkDnsZonePropertiesSerializer( + item: WorkloadNetworkDnsZoneProperties, +): any { + return { + displayName: item["displayName"], + domain: !item["domain"] + ? item["domain"] + : item["domain"].map((p: any) => { + return p; + }), + dnsServerIps: !item["dnsServerIps"] + ? item["dnsServerIps"] + : item["dnsServerIps"].map((p: any) => { + return p; + }), + sourceIp: item["sourceIp"], + dnsServices: item["dnsServices"], + revision: item["revision"], + }; +} + +export function workloadNetworkDnsZonePropertiesDeserializer( + item: any, +): WorkloadNetworkDnsZoneProperties { + return { + displayName: item["displayName"], + domain: !item["domain"] + ? item["domain"] + : item["domain"].map((p: any) => { + return p; + }), + dnsServerIps: !item["dnsServerIps"] + ? item["dnsServerIps"] + : item["dnsServerIps"].map((p: any) => { + return p; + }), + sourceIp: item["sourceIp"], + dnsServices: item["dnsServices"], + provisioningState: item["provisioningState"], + revision: item["revision"], + }; +} + +/** Workload Network DNS Zone provisioning state */ +export enum KnownWorkloadNetworkDnsZoneProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network DNS Zone provisioning state \ + * {@link KnownWorkloadNetworkDnsZoneProvisioningState} can be used interchangeably with WorkloadNetworkDnsZoneProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkDnsZoneProvisioningState = string; + +/** The response of a WorkloadNetworkPublicIP list operation. */ +export interface _WorkloadNetworkPublicIPsList { + /** The WorkloadNetworkPublicIP items on this page */ + value: WorkloadNetworkPublicIP[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _workloadNetworkPublicIPsListDeserializer( + item: any, +): _WorkloadNetworkPublicIPsList { + return { + value: workloadNetworkPublicIPArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function workloadNetworkPublicIPArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkPublicIPSerializer(item); + }); +} + +export function workloadNetworkPublicIPArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workloadNetworkPublicIPDeserializer(item); + }); +} + +/** NSX Public IP Block */ +export interface WorkloadNetworkPublicIP extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: WorkloadNetworkPublicIPProperties; +} + +export function workloadNetworkPublicIPSerializer( + item: WorkloadNetworkPublicIP, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : workloadNetworkPublicIPPropertiesSerializer(item["properties"]), + }; +} + +export function workloadNetworkPublicIPDeserializer( + item: any, +): WorkloadNetworkPublicIP { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : workloadNetworkPublicIPPropertiesDeserializer(item["properties"]), + }; +} + +/** NSX Public IP Block Properties */ +export interface WorkloadNetworkPublicIPProperties { + /** Display name of the Public IP Block. */ + displayName?: string; + /** Number of Public IPs requested. */ + numberOfPublicIPs?: number; + /** CIDR Block of the Public IP Block. */ + readonly publicIPBlock?: string; + /** The provisioning state */ + readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; +} + +export function workloadNetworkPublicIPPropertiesSerializer( + item: WorkloadNetworkPublicIPProperties, +): any { + return { + displayName: item["displayName"], + numberOfPublicIPs: item["numberOfPublicIPs"], + }; +} + +export function workloadNetworkPublicIPPropertiesDeserializer( + item: any, +): WorkloadNetworkPublicIPProperties { + return { + displayName: item["displayName"], + numberOfPublicIPs: item["numberOfPublicIPs"], + publicIPBlock: item["publicIPBlock"], + provisioningState: item["provisioningState"], + }; +} + +/** Workload Network Public IP provisioning state */ +export enum KnownWorkloadNetworkPublicIPProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Workload Network Public IP provisioning state \ + * {@link KnownWorkloadNetworkPublicIPProvisioningState} can be used interchangeably with WorkloadNetworkPublicIPProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type WorkloadNetworkPublicIPProvisioningState = string; + +/** The response of a IscsiPath list operation. */ +export interface _IscsiPathListResult { + /** The IscsiPath items on this page */ + value: IscsiPath[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _iscsiPathListResultDeserializer( + item: any, +): _IscsiPathListResult { + return { + value: iscsiPathArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function iscsiPathArraySerializer(result: Array): any[] { + return result.map((item) => { + return iscsiPathSerializer(item); + }); +} + +export function iscsiPathArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return iscsiPathDeserializer(item); + }); +} + +/** An iSCSI path resource */ +export interface IscsiPath extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: IscsiPathProperties; +} + +export function iscsiPathSerializer(item: IscsiPath): any { + return { + properties: !item["properties"] + ? item["properties"] + : iscsiPathPropertiesSerializer(item["properties"]), + }; +} + +export function iscsiPathDeserializer(item: any): IscsiPath { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : iscsiPathPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of an iSCSI path resource */ +export interface IscsiPathProperties { + /** The state of the iSCSI path provisioning */ + readonly provisioningState?: IscsiPathProvisioningState; + /** CIDR Block for iSCSI path. */ + networkBlock: string; +} + +export function iscsiPathPropertiesSerializer(item: IscsiPathProperties): any { + return { networkBlock: item["networkBlock"] }; +} + +export function iscsiPathPropertiesDeserializer( + item: any, +): IscsiPathProperties { + return { + provisioningState: item["provisioningState"], + networkBlock: item["networkBlock"], + }; +} + +/** private cloud provisioning state */ +export enum KnownIscsiPathProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is pending */ + Pending = "Pending", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * private cloud provisioning state \ + * {@link KnownIscsiPathProvisioningState} can be used interchangeably with IscsiPathProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Pending**: is pending \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type IscsiPathProvisioningState = string; + +/** The response of a ScriptExecution list operation. */ +export interface _ScriptExecutionsList { + /** The ScriptExecution items on this page */ + value: ScriptExecution[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _scriptExecutionsListDeserializer( + item: any, +): _ScriptExecutionsList { + return { + value: scriptExecutionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function scriptExecutionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptExecutionSerializer(item); + }); +} + +export function scriptExecutionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptExecutionDeserializer(item); + }); +} + +/** An instance of a script executed by a user - custom or AVS */ +export interface ScriptExecution extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ScriptExecutionProperties; +} + +export function scriptExecutionSerializer(item: ScriptExecution): any { + return { + properties: !item["properties"] + ? item["properties"] + : scriptExecutionPropertiesSerializer(item["properties"]), + }; +} + +export function scriptExecutionDeserializer(item: any): ScriptExecution { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : scriptExecutionPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of a user-invoked script */ +export interface ScriptExecutionProperties { + /** A reference to the script cmdlet resource if user is running a AVS script */ + scriptCmdletId?: string; + /** Parameters the script will accept */ + parameters?: ScriptExecutionParameterUnion[]; + /** + * Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials + */ + hiddenParameters?: ScriptExecutionParameterUnion[]; + /** + * Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception + */ + failureReason?: string; + /** Time limit for execution */ + timeout: string; + /** Time to live for the resource. If not provided, will be available for 60 days */ + retention?: string; + /** Time the script execution was submitted */ + readonly submittedAt?: Date; + /** Time the script execution was started */ + readonly startedAt?: Date; + /** Time the script execution was finished */ + readonly finishedAt?: Date; + /** The state of the script execution resource */ + readonly provisioningState?: ScriptExecutionProvisioningState; + /** Standard output stream from the powershell execution */ + output?: string[]; + /** User-defined dictionary. */ + namedOutputs?: Record>; + /** Standard information out stream from the powershell execution */ + readonly information?: string[]; + /** Standard warning out stream from the powershell execution */ + readonly warnings?: string[]; + /** Standard error output stream from the powershell execution */ + readonly errors?: string[]; +} + +export function scriptExecutionPropertiesSerializer( + item: ScriptExecutionProperties, +): any { + return { + scriptCmdletId: item["scriptCmdletId"], + parameters: !item["parameters"] + ? item["parameters"] + : scriptExecutionParameterUnionArraySerializer(item["parameters"]), + hiddenParameters: !item["hiddenParameters"] + ? item["hiddenParameters"] + : scriptExecutionParameterUnionArraySerializer(item["hiddenParameters"]), + failureReason: item["failureReason"], + timeout: item["timeout"], + retention: item["retention"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + namedOutputs: !item["namedOutputs"] + ? item["namedOutputs"] + : scriptExecutionPropertiesNamedOutputRecordSerializer( + item["namedOutputs"], + ), + }; +} + +export function scriptExecutionPropertiesDeserializer( + item: any, +): ScriptExecutionProperties { + return { + scriptCmdletId: item["scriptCmdletId"], + parameters: !item["parameters"] + ? item["parameters"] + : scriptExecutionParameterUnionArrayDeserializer(item["parameters"]), + hiddenParameters: !item["hiddenParameters"] + ? item["hiddenParameters"] + : scriptExecutionParameterUnionArrayDeserializer( + item["hiddenParameters"], + ), + failureReason: item["failureReason"], + timeout: item["timeout"], + retention: item["retention"], + submittedAt: !item["submittedAt"] + ? item["submittedAt"] + : new Date(item["submittedAt"]), + startedAt: !item["startedAt"] + ? item["startedAt"] + : new Date(item["startedAt"]), + finishedAt: !item["finishedAt"] + ? item["finishedAt"] + : new Date(item["finishedAt"]), + provisioningState: item["provisioningState"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + namedOutputs: !item["namedOutputs"] + ? item["namedOutputs"] + : scriptExecutionPropertiesNamedOutputRecordDeserializer( + item["namedOutputs"], + ), + information: !item["information"] + ? item["information"] + : item["information"].map((p: any) => { + return p; + }), + warnings: !item["warnings"] + ? item["warnings"] + : item["warnings"].map((p: any) => { + return p; + }), + errors: !item["errors"] + ? item["errors"] + : item["errors"].map((p: any) => { + return p; + }), + }; +} + +export function scriptExecutionParameterUnionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptExecutionParameterUnionSerializer(item); + }); +} + +export function scriptExecutionParameterUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptExecutionParameterUnionDeserializer(item); + }); +} + +/** The arguments passed in to the execution */ +export interface ScriptExecutionParameter { + /** script execution parameter type */ + /** The discriminator possible values: SecureValue, Value, Credential */ + type: ScriptExecutionParameterType; + /** The parameter name */ + name: string; +} + +export function scriptExecutionParameterSerializer( + item: ScriptExecutionParameter, +): any { + return { type: item["type"], name: item["name"] }; +} + +export function scriptExecutionParameterDeserializer( + item: any, +): ScriptExecutionParameter { + return { + type: item["type"], + name: item["name"], + }; +} + +/** Alias for ScriptExecutionParameterUnion */ +export type ScriptExecutionParameterUnion = + | ScriptSecureStringExecutionParameter + | ScriptStringExecutionParameter + | PSCredentialExecutionParameter + | ScriptExecutionParameter; + +export function scriptExecutionParameterUnionSerializer( + item: ScriptExecutionParameterUnion, +): any { + switch (item.type) { + case "SecureValue": + return scriptSecureStringExecutionParameterSerializer( + item as ScriptSecureStringExecutionParameter, + ); + + case "Value": + return scriptStringExecutionParameterSerializer( + item as ScriptStringExecutionParameter, + ); + + case "Credential": + return pSCredentialExecutionParameterSerializer( + item as PSCredentialExecutionParameter, + ); + + default: + return scriptExecutionParameterSerializer(item); + } +} + +export function scriptExecutionParameterUnionDeserializer( + item: any, +): ScriptExecutionParameterUnion { + switch (item.type) { + case "SecureValue": + return scriptSecureStringExecutionParameterDeserializer( + item as ScriptSecureStringExecutionParameter, + ); + + case "Value": + return scriptStringExecutionParameterDeserializer( + item as ScriptStringExecutionParameter, + ); + + case "Credential": + return pSCredentialExecutionParameterDeserializer( + item as PSCredentialExecutionParameter, + ); + + default: + return scriptExecutionParameterDeserializer(item); + } +} + +/** script execution parameter type */ +export enum KnownScriptExecutionParameterType { + Value = "Value", + SecureValue = "SecureValue", + Credential = "Credential", +} + +/** + * script execution parameter type \ + * {@link KnownScriptExecutionParameterType} can be used interchangeably with ScriptExecutionParameterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Value** \ + * **SecureValue** \ + * **Credential** + */ +export type ScriptExecutionParameterType = string; + +/** a plain text value execution parameter */ +export interface ScriptSecureStringExecutionParameter + extends ScriptExecutionParameter { + /** A secure value for the passed parameter, not to be stored in logs */ + secureValue?: string; + /** The type of execution parameter */ + type: "SecureValue"; +} + +export function scriptSecureStringExecutionParameterSerializer( + item: ScriptSecureStringExecutionParameter, +): any { + return { + type: item["type"], + name: item["name"], + secureValue: item["secureValue"], + }; +} + +export function scriptSecureStringExecutionParameterDeserializer( + item: any, +): ScriptSecureStringExecutionParameter { + return { + type: item["type"], + name: item["name"], + secureValue: item["secureValue"], + }; +} + +/** a plain text value execution parameter */ +export interface ScriptStringExecutionParameter + extends ScriptExecutionParameter { + /** The value for the passed parameter */ + value?: string; + /** The type of execution parameter */ + type: "Value"; +} + +export function scriptStringExecutionParameterSerializer( + item: ScriptStringExecutionParameter, +): any { + return { type: item["type"], name: item["name"], value: item["value"] }; +} + +export function scriptStringExecutionParameterDeserializer( + item: any, +): ScriptStringExecutionParameter { + return { + type: item["type"], + name: item["name"], + value: item["value"], + }; +} + +/** a powershell credential object */ +export interface PSCredentialExecutionParameter + extends ScriptExecutionParameter { + /** username for login */ + username?: string; + /** password for login */ + password?: string; + /** The type of execution parameter */ + type: "Credential"; +} + +export function pSCredentialExecutionParameterSerializer( + item: PSCredentialExecutionParameter, +): any { + return { + type: item["type"], + name: item["name"], + username: item["username"], + password: item["password"], + }; +} + +export function pSCredentialExecutionParameterDeserializer( + item: any, +): PSCredentialExecutionParameter { + return { + type: item["type"], + name: item["name"], + username: item["username"], + password: item["password"], + }; +} + +/** Script Execution provisioning state */ +export enum KnownScriptExecutionProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is pending */ + Pending = "Pending", + /** is running */ + Running = "Running", + /** is cancelling */ + Cancelling = "Cancelling", + /** is cancelled */ + Cancelled = "Cancelled", + /** is deleting */ + Deleting = "Deleting", +} + +/** + * Script Execution provisioning state \ + * {@link KnownScriptExecutionProvisioningState} can be used interchangeably with ScriptExecutionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Pending**: is pending \ + * **Running**: is running \ + * **Cancelling**: is cancelling \ + * **Cancelled**: is cancelled \ + * **Deleting**: is deleting + */ +export type ScriptExecutionProvisioningState = string; + +export function scriptExecutionPropertiesNamedOutputRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] + ? item[key] + : _scriptExecutionPropertiesNamedOutputSerializer(item[key]); + }); + return result; +} + +export function scriptExecutionPropertiesNamedOutputRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] + ? item[key] + : _scriptExecutionPropertiesNamedOutputDeserializer(item[key]); + }); + return result; +} + +/** model interface _ScriptExecutionPropertiesNamedOutput */ +export interface _ScriptExecutionPropertiesNamedOutput {} + +export function _scriptExecutionPropertiesNamedOutputSerializer( + item: _ScriptExecutionPropertiesNamedOutput, +): any { + return item; +} + +export function _scriptExecutionPropertiesNamedOutputDeserializer( + item: any, +): _ScriptExecutionPropertiesNamedOutput { + return item; +} + +/** The response of a ScriptCmdlet list operation. */ +export interface _ScriptCmdletsList { + /** The ScriptCmdlet items on this page */ + value: ScriptCmdlet[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _scriptCmdletsListDeserializer(item: any): _ScriptCmdletsList { + return { + value: scriptCmdletArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function scriptCmdletArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptCmdletDeserializer(item); + }); +} + +/** A cmdlet available for script execution */ +export interface ScriptCmdlet extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ScriptCmdletProperties; +} + +export function scriptCmdletDeserializer(item: any): ScriptCmdlet { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : scriptCmdletPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of a pre-canned script */ +export interface ScriptCmdletProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: ScriptCmdletProvisioningState; + /** Description of the scripts functionality */ + readonly description?: string; + /** Recommended time limit for execution */ + readonly timeout?: string; + /** Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers */ + readonly audience?: ScriptCmdletAudience; + /** Parameters the script will accept */ + readonly parameters?: ScriptParameter[]; +} + +export function scriptCmdletPropertiesDeserializer( + item: any, +): ScriptCmdletProperties { + return { + provisioningState: item["provisioningState"], + description: item["description"], + timeout: item["timeout"], + audience: item["audience"], + parameters: !item["parameters"] + ? item["parameters"] + : scriptParameterArrayDeserializer(item["parameters"]), + }; +} + +/** A script cmdlet provisioning state */ +export enum KnownScriptCmdletProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * A script cmdlet provisioning state \ + * {@link KnownScriptCmdletProvisioningState} can be used interchangeably with ScriptCmdletProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type ScriptCmdletProvisioningState = string; + +/** Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers */ +export enum KnownScriptCmdletAudience { + /** is automation */ + Automation = "Automation", + /** is any */ + Any = "Any", +} + +/** + * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers \ + * {@link KnownScriptCmdletAudience} can be used interchangeably with ScriptCmdletAudience, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automation**: is automation \ + * **Any**: is any + */ +export type ScriptCmdletAudience = string; + +export function scriptParameterArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptParameterDeserializer(item); + }); +} + +/** An parameter that the script will accept */ +export interface ScriptParameter { + /** + * The type of parameter the script is expecting. psCredential is a + * PSCredentialObject + */ + readonly type?: ScriptParameterTypes; + /** The parameter name that the script will expect a parameter value for */ + name?: string; + /** User friendly description of the parameter */ + readonly description?: string; + /** + * Should this parameter be visible to arm and passed in the parameters argument + * when executing + */ + readonly visibility?: VisibilityParameterEnum; + /** Is this parameter required or optional */ + readonly optional?: OptionalParamEnum; +} + +export function scriptParameterDeserializer(item: any): ScriptParameter { + return { + type: item["type"], + name: item["name"], + description: item["description"], + visibility: item["visibility"], + optional: item["optional"], + }; +} + +/** Script Parameter types */ +export enum KnownScriptParameterTypes { + /** is string */ + String = "String", + /** is secure string */ + SecureString = "SecureString", + /** is credential */ + Credential = "Credential", + /** is int */ + Int = "Int", + /** is bool */ + Bool = "Bool", + /** is float */ + Float = "Float", +} + +/** + * Script Parameter types \ + * {@link KnownScriptParameterTypes} can be used interchangeably with ScriptParameterTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **String**: is string \ + * **SecureString**: is secure string \ + * **Credential**: is credential \ + * **Int**: is int \ + * **Bool**: is bool \ + * **Float**: is float + */ +export type ScriptParameterTypes = string; + +/** Visibility Parameter */ +export enum KnownVisibilityParameterEnum { + /** is visible */ + Visible = "Visible", + /** is hidden */ + Hidden = "Hidden", +} + +/** + * Visibility Parameter \ + * {@link KnownVisibilityParameterEnum} can be used interchangeably with VisibilityParameterEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Visible**: is visible \ + * **Hidden**: is hidden + */ +export type VisibilityParameterEnum = string; + +/** Optional Param */ +export enum KnownOptionalParamEnum { + /** is optional */ + Optional = "Optional", + /** is required */ + Required = "Required", +} + +/** + * Optional Param \ + * {@link KnownOptionalParamEnum} can be used interchangeably with OptionalParamEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Optional**: is optional \ + * **Required**: is required + */ +export type OptionalParamEnum = string; + +/** The response of a ScriptPackage list operation. */ +export interface _ScriptPackagesList { + /** The ScriptPackage items on this page */ + value: ScriptPackage[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _scriptPackagesListDeserializer( + item: any, +): _ScriptPackagesList { + return { + value: scriptPackageArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function scriptPackageArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return scriptPackageDeserializer(item); + }); +} + +/** Script Package resources available for execution */ +export interface ScriptPackage extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ScriptPackageProperties; +} + +export function scriptPackageDeserializer(item: any): ScriptPackage { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : scriptPackagePropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of a Script Package subresource */ +export interface ScriptPackageProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: ScriptPackageProvisioningState; + /** User friendly description of the package */ + readonly description?: string; + /** Module version */ + readonly version?: string; + /** Company that created and supports the package */ + readonly company?: string; + /** Link to support by the package vendor */ + readonly uri?: string; +} + +export function scriptPackagePropertiesDeserializer( + item: any, +): ScriptPackageProperties { + return { + provisioningState: item["provisioningState"], + description: item["description"], + version: item["version"], + company: item["company"], + uri: item["uri"], + }; +} + +/** Script Package provisioning state */ +export enum KnownScriptPackageProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * Script Package provisioning state \ + * {@link KnownScriptPackageProvisioningState} can be used interchangeably with ScriptPackageProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type ScriptPackageProvisioningState = string; + +/** The response of a PlacementPolicy list operation. */ +export interface _PlacementPoliciesList { + /** The PlacementPolicy items on this page */ + value: PlacementPolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _placementPoliciesListDeserializer( + item: any, +): _PlacementPoliciesList { + return { + value: placementPolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function placementPolicyArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return placementPolicySerializer(item); + }); +} + +export function placementPolicyArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return placementPolicyDeserializer(item); + }); +} + +/** A vSphere Distributed Resource Scheduler (DRS) placement policy */ +export interface PlacementPolicy extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: PlacementPolicyPropertiesUnion; +} + +export function placementPolicySerializer(item: PlacementPolicy): any { + return { + properties: !item["properties"] + ? item["properties"] + : placementPolicyPropertiesUnionSerializer(item["properties"]), + }; +} + +export function placementPolicyDeserializer(item: any): PlacementPolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : placementPolicyPropertiesUnionDeserializer(item["properties"]), + }; +} + +/** Abstract placement policy properties */ +export interface PlacementPolicyProperties { + /** Placement Policy type */ + /** The discriminator possible values: VmVm, VmHost */ + type: PlacementPolicyType; + /** Whether the placement policy is enabled or disabled */ + state?: PlacementPolicyState; + /** Display name of the placement policy */ + displayName?: string; + /** The provisioning state */ + readonly provisioningState?: PlacementPolicyProvisioningState; +} + +export function placementPolicyPropertiesSerializer( + item: PlacementPolicyProperties, +): any { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + }; +} + +export function placementPolicyPropertiesDeserializer( + item: any, +): PlacementPolicyProperties { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + provisioningState: item["provisioningState"], + }; +} + +/** Alias for PlacementPolicyPropertiesUnion */ +export type PlacementPolicyPropertiesUnion = + | VmPlacementPolicyProperties + | VmHostPlacementPolicyProperties + | PlacementPolicyProperties; + +export function placementPolicyPropertiesUnionSerializer( + item: PlacementPolicyPropertiesUnion, +): any { + switch (item.type) { + case "VmVm": + return vmPlacementPolicyPropertiesSerializer( + item as VmPlacementPolicyProperties, + ); + + case "VmHost": + return vmHostPlacementPolicyPropertiesSerializer( + item as VmHostPlacementPolicyProperties, + ); + + default: + return placementPolicyPropertiesSerializer(item); + } +} + +export function placementPolicyPropertiesUnionDeserializer( + item: any, +): PlacementPolicyPropertiesUnion { + switch (item.type) { + case "VmVm": + return vmPlacementPolicyPropertiesDeserializer( + item as VmPlacementPolicyProperties, + ); + + case "VmHost": + return vmHostPlacementPolicyPropertiesDeserializer( + item as VmHostPlacementPolicyProperties, + ); + + default: + return placementPolicyPropertiesDeserializer(item); + } +} + +/** Placement Policy type */ +export enum KnownPlacementPolicyType { + VmVm = "VmVm", + VmHost = "VmHost", +} + +/** + * Placement Policy type \ + * {@link KnownPlacementPolicyType} can be used interchangeably with PlacementPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VmVm** \ + * **VmHost** + */ +export type PlacementPolicyType = string; + +/** Placement Policy state */ +export enum KnownPlacementPolicyState { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * Placement Policy state \ + * {@link KnownPlacementPolicyState} can be used interchangeably with PlacementPolicyState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type PlacementPolicyState = string; + +/** Placement Policy provisioning state */ +export enum KnownPlacementPolicyProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Placement Policy provisioning state \ + * {@link KnownPlacementPolicyProvisioningState} can be used interchangeably with PlacementPolicyProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type PlacementPolicyProvisioningState = string; + +/** VM-VM placement policy properties */ +export interface VmPlacementPolicyProperties extends PlacementPolicyProperties { + /** Virtual machine members list */ + vmMembers: string[]; + /** placement policy affinity type */ + affinityType: AffinityType; + /** placement policy type */ + type: "VmVm"; +} + +export function vmPlacementPolicyPropertiesSerializer( + item: VmPlacementPolicyProperties, +): any { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + vmMembers: item["vmMembers"].map((p: any) => { + return p; + }), + affinityType: item["affinityType"], + }; +} + +export function vmPlacementPolicyPropertiesDeserializer( + item: any, +): VmPlacementPolicyProperties { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + provisioningState: item["provisioningState"], + vmMembers: item["vmMembers"].map((p: any) => { + return p; + }), + affinityType: item["affinityType"], + }; +} + +/** Affinity type */ +export enum KnownAffinityType { + /** is affinity */ + Affinity = "Affinity", + /** is anti-affinity */ + AntiAffinity = "AntiAffinity", +} + +/** + * Affinity type \ + * {@link KnownAffinityType} can be used interchangeably with AffinityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Affinity**: is affinity \ + * **AntiAffinity**: is anti-affinity + */ +export type AffinityType = string; + +/** VM-Host placement policy properties */ +export interface VmHostPlacementPolicyProperties + extends PlacementPolicyProperties { + /** Virtual machine members list */ + vmMembers: string[]; + /** Host members list */ + hostMembers: string[]; + /** placement policy affinity type */ + affinityType: AffinityType; + /** vm-host placement policy affinity strength (should/must) */ + affinityStrength?: AffinityStrength; + /** placement policy azure hybrid benefit opt-in type */ + azureHybridBenefitType?: AzureHybridBenefitType; + /** placement policy type */ + type: "VmHost"; +} + +export function vmHostPlacementPolicyPropertiesSerializer( + item: VmHostPlacementPolicyProperties, +): any { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + vmMembers: item["vmMembers"].map((p: any) => { + return p; + }), + hostMembers: item["hostMembers"].map((p: any) => { + return p; + }), + affinityType: item["affinityType"], + affinityStrength: item["affinityStrength"], + azureHybridBenefitType: item["azureHybridBenefitType"], + }; +} + +export function vmHostPlacementPolicyPropertiesDeserializer( + item: any, +): VmHostPlacementPolicyProperties { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + provisioningState: item["provisioningState"], + vmMembers: item["vmMembers"].map((p: any) => { + return p; + }), + hostMembers: item["hostMembers"].map((p: any) => { + return p; + }), + affinityType: item["affinityType"], + affinityStrength: item["affinityStrength"], + azureHybridBenefitType: item["azureHybridBenefitType"], + }; +} + +/** Affinity Strength */ +export enum KnownAffinityStrength { + /** is should */ + Should = "Should", + /** is must */ + Must = "Must", +} + +/** + * Affinity Strength \ + * {@link KnownAffinityStrength} can be used interchangeably with AffinityStrength, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Should**: is should \ + * **Must**: is must + */ +export type AffinityStrength = string; + +/** Azure Hybrid Benefit type */ +export enum KnownAzureHybridBenefitType { + /** is SqlHost */ + SqlHost = "SqlHost", + /** is None */ + None = "None", +} + +/** + * Azure Hybrid Benefit type \ + * {@link KnownAzureHybridBenefitType} can be used interchangeably with AzureHybridBenefitType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SqlHost**: is SqlHost \ + * **None**: is None + */ +export type AzureHybridBenefitType = string; + +/** An update of a DRS placement policy resource */ +export interface PlacementPolicyUpdate { + /** The properties of a placement policy resource that may be updated */ + properties?: PlacementPolicyUpdateProperties; +} + +export function placementPolicyUpdateSerializer( + item: PlacementPolicyUpdate, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : placementPolicyUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The properties of a placement policy resource that may be updated */ +export interface PlacementPolicyUpdateProperties { + /** Whether the placement policy is enabled or disabled */ + state?: PlacementPolicyState; + /** Virtual machine members list */ + vmMembers?: string[]; + /** Host members list */ + hostMembers?: string[]; + /** vm-host placement policy affinity strength (should/must) */ + affinityStrength?: AffinityStrength; + /** placement policy azure hybrid benefit opt-in type */ + azureHybridBenefitType?: AzureHybridBenefitType; +} + +export function placementPolicyUpdatePropertiesSerializer( + item: PlacementPolicyUpdateProperties, +): any { + return { + state: item["state"], + vmMembers: !item["vmMembers"] + ? item["vmMembers"] + : item["vmMembers"].map((p: any) => { + return p; + }), + hostMembers: !item["hostMembers"] + ? item["hostMembers"] + : item["hostMembers"].map((p: any) => { + return p; + }), + affinityStrength: item["affinityStrength"], + azureHybridBenefitType: item["azureHybridBenefitType"], + }; +} + +/** The response of a VirtualMachine list operation. */ +export interface _VirtualMachinesList { + /** The VirtualMachine items on this page */ + value: VirtualMachine[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualMachinesListDeserializer( + item: any, +): _VirtualMachinesList { + return { + value: virtualMachineArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualMachineArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachineDeserializer(item); + }); +} + +/** Virtual Machine */ +export interface VirtualMachine extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: VirtualMachineProperties; +} + +export function virtualMachineDeserializer(item: any): VirtualMachine { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : virtualMachinePropertiesDeserializer(item["properties"]), + }; +} + +/** Virtual Machine Properties */ +export interface VirtualMachineProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: VirtualMachineProvisioningState; + /** Display name of the VM. */ + readonly displayName?: string; + /** Virtual machine managed object reference id */ + readonly moRefId?: string; + /** Path to virtual machine's folder starting from datacenter virtual machine folder */ + readonly folderPath?: string; + /** Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ + readonly restrictMovement?: VirtualMachineRestrictMovementState; +} + +export function virtualMachinePropertiesDeserializer( + item: any, +): VirtualMachineProperties { + return { + provisioningState: item["provisioningState"], + displayName: item["displayName"], + moRefId: item["moRefId"], + folderPath: item["folderPath"], + restrictMovement: item["restrictMovement"], + }; +} + +/** Virtual Machine provisioning state */ +export enum KnownVirtualMachineProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * Virtual Machine provisioning state \ + * {@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**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type VirtualMachineProvisioningState = string; + +/** Virtual Machine Restrict Movement state */ +export enum KnownVirtualMachineRestrictMovementState { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * Virtual Machine Restrict Movement state \ + * {@link KnownVirtualMachineRestrictMovementState} can be used interchangeably with VirtualMachineRestrictMovementState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type VirtualMachineRestrictMovementState = string; + +/** Set VM DRS-driven movement to restricted (enabled) or not (disabled) */ +export interface VirtualMachineRestrictMovement { + /** Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ + restrictMovement?: VirtualMachineRestrictMovementState; +} + +export function virtualMachineRestrictMovementSerializer( + item: VirtualMachineRestrictMovement, +): any { + return { restrictMovement: item["restrictMovement"] }; +} + +/** The response of a Addon list operation. */ +export interface _AddonList { + /** The Addon items on this page */ + value: Addon[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _addonListDeserializer(item: any): _AddonList { + return { + value: addonArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function addonArraySerializer(result: Array): any[] { + return result.map((item) => { + return addonSerializer(item); + }); +} + +export function addonArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return addonDeserializer(item); + }); +} + +/** An addon resource */ +export interface Addon extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: AddonPropertiesUnion; +} + +export function addonSerializer(item: Addon): any { + return { + properties: !item["properties"] + ? item["properties"] + : addonPropertiesUnionSerializer(item["properties"]), + }; +} + +export function addonDeserializer(item: any): Addon { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : addonPropertiesUnionDeserializer(item["properties"]), + }; +} + +/** The properties of an addon */ +export interface AddonProperties { + /** Addon type */ + /** The discriminator possible values: SRM, VR, HCX, Arc */ + addonType: AddonType; + /** The state of the addon provisioning */ + readonly provisioningState?: AddonProvisioningState; +} + +export function addonPropertiesSerializer(item: AddonProperties): any { + return { addonType: item["addonType"] }; +} + +export function addonPropertiesDeserializer(item: any): AddonProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + }; +} + +/** Alias for AddonPropertiesUnion */ +export type AddonPropertiesUnion = + | AddonSrmProperties + | AddonVrProperties + | AddonHcxProperties + | AddonArcProperties + | AddonProperties; + +export function addonPropertiesUnionSerializer( + item: AddonPropertiesUnion, +): any { + switch (item.addonType) { + case "SRM": + return addonSrmPropertiesSerializer(item as AddonSrmProperties); + + case "VR": + return addonVrPropertiesSerializer(item as AddonVrProperties); + + case "HCX": + return addonHcxPropertiesSerializer(item as AddonHcxProperties); + + case "Arc": + return addonArcPropertiesSerializer(item as AddonArcProperties); + + default: + return addonPropertiesSerializer(item); + } +} + +export function addonPropertiesUnionDeserializer( + item: any, +): AddonPropertiesUnion { + switch (item.addonType) { + case "SRM": + return addonSrmPropertiesDeserializer(item as AddonSrmProperties); + + case "VR": + return addonVrPropertiesDeserializer(item as AddonVrProperties); + + case "HCX": + return addonHcxPropertiesDeserializer(item as AddonHcxProperties); + + case "Arc": + return addonArcPropertiesDeserializer(item as AddonArcProperties); + + default: + return addonPropertiesDeserializer(item); + } +} + +/** Addon type */ +export enum KnownAddonType { + SRM = "SRM", + VR = "VR", + HCX = "HCX", + Arc = "Arc", +} + +/** + * Addon type \ + * {@link KnownAddonType} can be used interchangeably with AddonType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SRM** \ + * **VR** \ + * **HCX** \ + * **Arc** + */ +export type AddonType = string; + +/** Addon provisioning state */ +export enum KnownAddonProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is cancelled */ + Cancelled = "Cancelled", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Addon provisioning state \ + * {@link KnownAddonProvisioningState} can be used interchangeably with AddonProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Cancelled**: is cancelled \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type AddonProvisioningState = string; + +/** The properties of a Site Recovery Manager (SRM) addon */ +export interface AddonSrmProperties extends AddonProperties { + /** The Site Recovery Manager (SRM) license */ + licenseKey?: string; + /** The type of private cloud addon */ + addonType: "SRM"; +} + +export function addonSrmPropertiesSerializer(item: AddonSrmProperties): any { + return { addonType: item["addonType"], licenseKey: item["licenseKey"] }; +} + +export function addonSrmPropertiesDeserializer(item: any): AddonSrmProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + licenseKey: item["licenseKey"], + }; +} + +/** The properties of a vSphere Replication (VR) addon */ +export interface AddonVrProperties extends AddonProperties { + /** The vSphere Replication Server (VRS) count */ + vrsCount: number; + /** The type of private cloud addon */ + addonType: "VR"; +} + +export function addonVrPropertiesSerializer(item: AddonVrProperties): any { + return { addonType: item["addonType"], vrsCount: item["vrsCount"] }; +} + +export function addonVrPropertiesDeserializer(item: any): AddonVrProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + vrsCount: item["vrsCount"], + }; +} + +/** The properties of an HCX addon */ +export interface AddonHcxProperties extends AddonProperties { + /** The HCX offer, example VMware MaaS Cloud Provider (Enterprise) */ + offer: string; + /** The type of private cloud addon */ + addonType: "HCX"; +} + +export function addonHcxPropertiesSerializer(item: AddonHcxProperties): any { + return { addonType: item["addonType"], offer: item["offer"] }; +} + +export function addonHcxPropertiesDeserializer(item: any): AddonHcxProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + offer: item["offer"], + }; +} + +/** The properties of an Arc addon */ +export interface AddonArcProperties extends AddonProperties { + /** The VMware vCenter resource ID */ + vCenter?: string; + /** The type of private cloud addon */ + addonType: "Arc"; +} + +export function addonArcPropertiesSerializer(item: AddonArcProperties): any { + return { addonType: item["addonType"], vCenter: item["vCenter"] }; +} + +export function addonArcPropertiesDeserializer(item: any): AddonArcProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + vCenter: item["vCenter"], + }; +} + +/** The response of a CloudLink list operation. */ +export interface _CloudLinkList { + /** The CloudLink items on this page */ + value: CloudLink[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _cloudLinkListDeserializer(item: any): _CloudLinkList { + return { + value: cloudLinkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function cloudLinkArraySerializer(result: Array): any[] { + return result.map((item) => { + return cloudLinkSerializer(item); + }); +} + +export function cloudLinkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return cloudLinkDeserializer(item); + }); +} + +/** A cloud link resource */ +export interface CloudLink extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: CloudLinkProperties; +} + +export function cloudLinkSerializer(item: CloudLink): any { + return { + properties: !item["properties"] + ? item["properties"] + : cloudLinkPropertiesSerializer(item["properties"]), + }; +} + +export function cloudLinkDeserializer(item: any): CloudLink { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : cloudLinkPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of a cloud link. */ +export interface CloudLinkProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: CloudLinkProvisioningState; + /** The state of the cloud link. */ + readonly status?: CloudLinkStatus; + /** Identifier of the other private cloud participating in the link. */ + linkedCloud?: string; +} + +export function cloudLinkPropertiesSerializer(item: CloudLinkProperties): any { + return { linkedCloud: item["linkedCloud"] }; +} + +export function cloudLinkPropertiesDeserializer( + item: any, +): CloudLinkProperties { + return { + provisioningState: item["provisioningState"], + status: item["status"], + linkedCloud: item["linkedCloud"], + }; +} + +/** cloud link provisioning state */ +export enum KnownCloudLinkProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * cloud link provisioning state \ + * {@link KnownCloudLinkProvisioningState} can be used interchangeably with CloudLinkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type CloudLinkProvisioningState = string; + +/** Cloud Link status */ +export enum KnownCloudLinkStatus { + /** is active */ + Active = "Active", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is failed */ + Failed = "Failed", + /** is disconnected */ + Disconnected = "Disconnected", +} + +/** + * Cloud Link status \ + * {@link KnownCloudLinkStatus} can be used interchangeably with CloudLinkStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active**: is active \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Failed**: is failed \ + * **Disconnected**: is disconnected + */ +export type CloudLinkStatus = string; + +/** The response of a GlobalReachConnection list operation. */ +export interface _GlobalReachConnectionList { + /** The GlobalReachConnection items on this page */ + value: GlobalReachConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _globalReachConnectionListDeserializer( + item: any, +): _GlobalReachConnectionList { + return { + value: globalReachConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function globalReachConnectionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return globalReachConnectionSerializer(item); + }); +} + +export function globalReachConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return globalReachConnectionDeserializer(item); + }); +} + +/** A global reach connection resource */ +export interface GlobalReachConnection extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: GlobalReachConnectionProperties; +} + +export function globalReachConnectionSerializer( + item: GlobalReachConnection, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : globalReachConnectionPropertiesSerializer(item["properties"]), + }; +} + +export function globalReachConnectionDeserializer( + item: any, +): GlobalReachConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : globalReachConnectionPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of a global reach connection */ +export interface GlobalReachConnectionProperties { + /** The state of the ExpressRoute Circuit Authorization provisioning */ + readonly provisioningState?: GlobalReachConnectionProvisioningState; + /** + * The network used for global reach carved out from the original network block + * provided for the private cloud + */ + readonly addressPrefix?: string; + /** + * Authorization key from the peer express route used for the global reach + * connection + */ + authorizationKey?: string; + /** The connection status of the global reach connection */ + readonly circuitConnectionStatus?: GlobalReachConnectionStatus; + /** + * Identifier of the ExpressRoute Circuit to peer with in the global reach + * connection + */ + peerExpressRouteCircuit?: string; + /** + * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + * global reach connection + */ + expressRouteId?: string; +} + +export function globalReachConnectionPropertiesSerializer( + item: GlobalReachConnectionProperties, +): any { + return { + authorizationKey: item["authorizationKey"], + peerExpressRouteCircuit: item["peerExpressRouteCircuit"], + expressRouteId: item["expressRouteId"], + }; +} + +export function globalReachConnectionPropertiesDeserializer( + item: any, +): GlobalReachConnectionProperties { + return { + provisioningState: item["provisioningState"], + addressPrefix: item["addressPrefix"], + authorizationKey: item["authorizationKey"], + circuitConnectionStatus: item["circuitConnectionStatus"], + peerExpressRouteCircuit: item["peerExpressRouteCircuit"], + expressRouteId: item["expressRouteId"], + }; +} + +/** Global Reach Connection provisioning state */ +export enum KnownGlobalReachConnectionProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is updating */ + Updating = "Updating", +} + +/** + * Global Reach Connection provisioning state \ + * {@link KnownGlobalReachConnectionProvisioningState} can be used interchangeably with GlobalReachConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Updating**: is updating + */ +export type GlobalReachConnectionProvisioningState = string; + +/** Global Reach Connection status */ +export enum KnownGlobalReachConnectionStatus { + /** is connected */ + Connected = "Connected", + /** is connecting */ + Connecting = "Connecting", + /** is disconnected */ + Disconnected = "Disconnected", +} + +/** + * Global Reach Connection status \ + * {@link KnownGlobalReachConnectionStatus} can be used interchangeably with GlobalReachConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: is connected \ + * **Connecting**: is connecting \ + * **Disconnected**: is disconnected + */ +export type GlobalReachConnectionStatus = string; + +/** The response of a ExpressRouteAuthorization list operation. */ +export interface _ExpressRouteAuthorizationList { + /** The ExpressRouteAuthorization items on this page */ + value: ExpressRouteAuthorization[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _expressRouteAuthorizationListDeserializer( + item: any, +): _ExpressRouteAuthorizationList { + return { + value: expressRouteAuthorizationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function expressRouteAuthorizationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteAuthorizationSerializer(item); + }); +} + +export function expressRouteAuthorizationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return expressRouteAuthorizationDeserializer(item); + }); +} + +/** ExpressRoute Circuit Authorization */ +export interface ExpressRouteAuthorization extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ExpressRouteAuthorizationProperties; +} + +export function expressRouteAuthorizationSerializer( + item: ExpressRouteAuthorization, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : expressRouteAuthorizationPropertiesSerializer(item["properties"]), + }; +} + +export function expressRouteAuthorizationDeserializer( + item: any, +): ExpressRouteAuthorization { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : expressRouteAuthorizationPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of an ExpressRoute Circuit Authorization resource */ +export interface ExpressRouteAuthorizationProperties { + /** The state of the ExpressRoute Circuit Authorization provisioning */ + readonly provisioningState?: ExpressRouteAuthorizationProvisioningState; + /** The ID of the ExpressRoute Circuit Authorization */ + readonly expressRouteAuthorizationId?: string; + /** The key of the ExpressRoute Circuit Authorization */ + readonly expressRouteAuthorizationKey?: string; + /** The ID of the ExpressRoute Circuit */ + expressRouteId?: string; +} + +export function expressRouteAuthorizationPropertiesSerializer( + item: ExpressRouteAuthorizationProperties, +): any { + return { expressRouteId: item["expressRouteId"] }; +} + +export function expressRouteAuthorizationPropertiesDeserializer( + item: any, +): ExpressRouteAuthorizationProperties { + return { + provisioningState: item["provisioningState"], + expressRouteAuthorizationId: item["expressRouteAuthorizationId"], + expressRouteAuthorizationKey: item["expressRouteAuthorizationKey"], + expressRouteId: item["expressRouteId"], + }; +} + +/** Express Route Circuit Authorization provisioning state */ +export enum KnownExpressRouteAuthorizationProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is updating */ + Updating = "Updating", +} + +/** + * Express Route Circuit Authorization provisioning state \ + * {@link KnownExpressRouteAuthorizationProvisioningState} can be used interchangeably with ExpressRouteAuthorizationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Updating**: is updating + */ +export type ExpressRouteAuthorizationProvisioningState = string; + +/** The response of a HcxEnterpriseSite list operation. */ +export interface _HcxEnterpriseSiteList { + /** The HcxEnterpriseSite items on this page */ + value: HcxEnterpriseSite[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _hcxEnterpriseSiteListDeserializer( + item: any, +): _HcxEnterpriseSiteList { + return { + value: hcxEnterpriseSiteArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function hcxEnterpriseSiteArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return hcxEnterpriseSiteSerializer(item); + }); +} + +export function hcxEnterpriseSiteArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return hcxEnterpriseSiteDeserializer(item); + }); +} + +/** An HCX Enterprise Site resource */ +export interface HcxEnterpriseSite extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: HcxEnterpriseSiteProperties; +} + +export function hcxEnterpriseSiteSerializer(item: HcxEnterpriseSite): any { + return { + properties: !item["properties"] + ? item["properties"] + : hcxEnterpriseSitePropertiesSerializer(item["properties"]), + }; +} + +export function hcxEnterpriseSiteDeserializer(item: any): HcxEnterpriseSite { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : hcxEnterpriseSitePropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of an HCX Enterprise Site */ +export interface HcxEnterpriseSiteProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: HcxEnterpriseSiteProvisioningState; + /** The activation key */ + readonly activationKey?: string; + /** The status of the HCX Enterprise Site */ + readonly status?: HcxEnterpriseSiteStatus; +} + +export function hcxEnterpriseSitePropertiesSerializer( + item: HcxEnterpriseSiteProperties, +): any { + return item; +} + +export function hcxEnterpriseSitePropertiesDeserializer( + item: any, +): HcxEnterpriseSiteProperties { + return { + provisioningState: item["provisioningState"], + activationKey: item["activationKey"], + status: item["status"], + }; +} + +/** HCX Enterprise Site provisioning state */ +export enum KnownHcxEnterpriseSiteProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * HCX Enterprise Site provisioning state \ + * {@link KnownHcxEnterpriseSiteProvisioningState} can be used interchangeably with HcxEnterpriseSiteProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. + */ +export type HcxEnterpriseSiteProvisioningState = string; + +/** HCX Enterprise Site status */ +export enum KnownHcxEnterpriseSiteStatus { + /** is available */ + Available = "Available", + /** is consumed */ + Consumed = "Consumed", + /** is deactivated */ + Deactivated = "Deactivated", + /** is deleted */ + Deleted = "Deleted", +} + +/** + * HCX Enterprise Site status \ + * {@link KnownHcxEnterpriseSiteStatus} can be used interchangeably with HcxEnterpriseSiteStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: is available \ + * **Consumed**: is consumed \ + * **Deactivated**: is deactivated \ + * **Deleted**: is deleted + */ +export type HcxEnterpriseSiteStatus = string; + +/** The response of a Datastore list operation. */ +export interface _DatastoreList { + /** The Datastore items on this page */ + value: Datastore[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _datastoreListDeserializer(item: any): _DatastoreList { + return { + value: datastoreArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function datastoreArraySerializer(result: Array): any[] { + return result.map((item) => { + return datastoreSerializer(item); + }); +} + +export function datastoreArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return datastoreDeserializer(item); + }); +} + +/** A datastore resource */ +export interface Datastore extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: DatastoreProperties; +} + +export function datastoreSerializer(item: Datastore): any { + return { + properties: !item["properties"] + ? item["properties"] + : datastorePropertiesSerializer(item["properties"]), + }; +} + +export function datastoreDeserializer(item: any): Datastore { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : datastorePropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of a datastore */ +export interface DatastoreProperties { + /** The state of the datastore provisioning */ + readonly provisioningState?: DatastoreProvisioningState; + /** An Azure NetApp Files volume */ + netAppVolume?: NetAppVolume; + /** An iSCSI volume */ + diskPoolVolume?: DiskPoolVolume; + /** An Elastic SAN volume */ + elasticSanVolume?: ElasticSanVolume; + /** The operational status of the datastore */ + readonly status?: DatastoreStatus; +} + +export function datastorePropertiesSerializer(item: DatastoreProperties): any { + return { + netAppVolume: !item["netAppVolume"] + ? item["netAppVolume"] + : netAppVolumeSerializer(item["netAppVolume"]), + diskPoolVolume: !item["diskPoolVolume"] + ? item["diskPoolVolume"] + : diskPoolVolumeSerializer(item["diskPoolVolume"]), + elasticSanVolume: !item["elasticSanVolume"] + ? item["elasticSanVolume"] + : elasticSanVolumeSerializer(item["elasticSanVolume"]), + }; +} + +export function datastorePropertiesDeserializer( + item: any, +): DatastoreProperties { + return { + provisioningState: item["provisioningState"], + netAppVolume: !item["netAppVolume"] + ? item["netAppVolume"] + : netAppVolumeDeserializer(item["netAppVolume"]), + diskPoolVolume: !item["diskPoolVolume"] + ? item["diskPoolVolume"] + : diskPoolVolumeDeserializer(item["diskPoolVolume"]), + elasticSanVolume: !item["elasticSanVolume"] + ? item["elasticSanVolume"] + : elasticSanVolumeDeserializer(item["elasticSanVolume"]), + status: item["status"], + }; +} + +/** datastore provisioning state */ +export enum KnownDatastoreProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is cancelled */ + Cancelled = "Cancelled", + /** is pending */ + Pending = "Pending", + /** is creating */ + Creating = "Creating", + /** is updating */ + Updating = "Updating", + /** is deleting */ + Deleting = "Deleting", +} + +/** + * datastore provisioning state \ + * {@link KnownDatastoreProvisioningState} can be used interchangeably with DatastoreProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Cancelled**: is cancelled \ + * **Pending**: is pending \ + * **Creating**: is creating \ + * **Updating**: is updating \ + * **Deleting**: is deleting + */ +export type DatastoreProvisioningState = string; + +/** An Azure NetApp Files volume from Microsoft.NetApp provider */ +export interface NetAppVolume { + /** Azure resource ID of the NetApp volume */ + id: string; +} + +export function netAppVolumeSerializer(item: NetAppVolume): any { + return { id: item["id"] }; +} + +export function netAppVolumeDeserializer(item: any): NetAppVolume { + return { + id: item["id"], + }; +} + +/** An iSCSI volume from Microsoft.StoragePool provider */ +export interface DiskPoolVolume { + /** Azure resource ID of the iSCSI target */ + targetId: string; + /** Name of the LUN to be used for datastore */ + lunName: string; + /** + * Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN + */ + mountOption?: MountOptionEnum; + /** Device path */ + readonly path?: string; +} + +export function diskPoolVolumeSerializer(item: DiskPoolVolume): any { + return { + targetId: item["targetId"], + lunName: item["lunName"], + mountOption: item["mountOption"], + }; +} + +export function diskPoolVolumeDeserializer(item: any): DiskPoolVolume { + return { + targetId: item["targetId"], + lunName: item["lunName"], + mountOption: item["mountOption"], + path: item["path"], + }; +} + +/** mount option */ +export enum KnownMountOptionEnum { + /** is mount */ + MOUNT = "MOUNT", + /** is attach */ + ATTACH = "ATTACH", +} + +/** + * mount option \ + * {@link KnownMountOptionEnum} can be used interchangeably with MountOptionEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MOUNT**: is mount \ + * **ATTACH**: is attach + */ +export type MountOptionEnum = string; + +/** An Elastic SAN volume from Microsoft.ElasticSan provider */ +export interface ElasticSanVolume { + /** Azure resource ID of the Elastic SAN Volume */ + targetId: string; +} + +export function elasticSanVolumeSerializer(item: ElasticSanVolume): any { + return { targetId: item["targetId"] }; +} + +export function elasticSanVolumeDeserializer(item: any): ElasticSanVolume { + return { + targetId: item["targetId"], + }; +} + +/** datastore status */ +export enum KnownDatastoreStatus { + /** is unknown */ + Unknown = "Unknown", + /** is accessible */ + Accessible = "Accessible", + /** is inaccessible */ + Inaccessible = "Inaccessible", + /** is attached */ + Attached = "Attached", + /** is detached */ + Detached = "Detached", + /** is lost communication */ + LostCommunication = "LostCommunication", + /** is dead or error */ + DeadOrError = "DeadOrError", +} + +/** + * datastore status \ + * {@link KnownDatastoreStatus} can be used interchangeably with DatastoreStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: is unknown \ + * **Accessible**: is accessible \ + * **Inaccessible**: is inaccessible \ + * **Attached**: is attached \ + * **Detached**: is detached \ + * **LostCommunication**: is lost communication \ + * **DeadOrError**: is dead or error + */ +export type DatastoreStatus = string; + +/** The response of a Cluster list operation. */ +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); + }); +} + +/** A cluster resource */ +export interface Cluster extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ClusterProperties; + /** The SKU (Stock Keeping Unit) assigned to this resource. */ + sku: Sku; +} + +export function clusterSerializer(item: Cluster): any { + return { + properties: !item["properties"] + ? item["properties"] + : clusterPropertiesSerializer(item["properties"]), + sku: skuSerializer(item["sku"]), + }; +} + +export function clusterDeserializer(item: any): Cluster { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : clusterPropertiesDeserializer(item["properties"]), + sku: skuDeserializer(item["sku"]), + }; +} + +/** The properties of a cluster */ +export interface ClusterProperties { + /** The cluster size */ + clusterSize?: number; + /** The state of the cluster provisioning */ + readonly provisioningState?: ClusterProvisioningState; + /** The identity */ + readonly clusterId?: number; + /** The hosts */ + hosts?: string[]; + /** Name of the vsan datastore associated with the cluster */ + vsanDatastoreName?: string; +} + +export function clusterPropertiesSerializer(item: ClusterProperties): any { + return { + clusterSize: item["clusterSize"], + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + vsanDatastoreName: item["vsanDatastoreName"], + }; +} + +export function clusterPropertiesDeserializer(item: any): ClusterProperties { + return { + clusterSize: item["clusterSize"], + provisioningState: item["provisioningState"], + clusterId: item["clusterId"], + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + vsanDatastoreName: item["vsanDatastoreName"], + }; +} + +/** Cluster provisioning state */ +export enum KnownClusterProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is cancelled */ + Cancelled = "Cancelled", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Cluster provisioning state \ + * {@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**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Cancelled**: is cancelled \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type ClusterProvisioningState = string; + +/** The resource model definition representing SKU */ +export interface Sku { + /** The name of the SKU. Ex - P3. It is typically a letter+number code */ + name: string; + /** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */ + tier?: SkuTier; + /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */ + size?: string; + /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ + family?: string; + /** If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. */ + capacity?: number; +} + +export function skuSerializer(item: Sku): any { + return { + name: item["name"], + tier: item["tier"], + size: item["size"], + family: item["family"], + capacity: item["capacity"], + }; +} + +export function skuDeserializer(item: any): Sku { + return { + name: item["name"], + tier: item["tier"], + size: item["size"], + family: item["family"], + capacity: item["capacity"], + }; +} + +/** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */ +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +/** An update of a cluster resource */ +export interface ClusterUpdate { + /** The SKU (Stock Keeping Unit) assigned to this resource. */ + sku?: Sku; + /** The properties of a cluster resource that may be updated */ + properties?: ClusterUpdateProperties; +} + +export function clusterUpdateSerializer(item: ClusterUpdate): any { + return { + sku: !item["sku"] ? item["sku"] : skuSerializer(item["sku"]), + properties: !item["properties"] + ? item["properties"] + : clusterUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The properties of a cluster that may be updated */ +export interface ClusterUpdateProperties { + /** The cluster size */ + clusterSize?: number; + /** The hosts */ + hosts?: string[]; +} + +export function clusterUpdatePropertiesSerializer( + item: ClusterUpdateProperties, +): any { + return { + clusterSize: item["clusterSize"], + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + }; +} + +/** List of all zones and associated hosts for a cluster */ +export interface ClusterZoneList { + /** Zone and associated hosts info */ + zones?: ClusterZone[]; +} + +export function clusterZoneListDeserializer(item: any): ClusterZoneList { + return { + zones: !item["zones"] + ? item["zones"] + : clusterZoneArrayDeserializer(item["zones"]), + }; +} + +export function clusterZoneArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clusterZoneDeserializer(item); + }); +} + +/** Zone and associated hosts info */ +export interface ClusterZone { + /** List of hosts belonging to the availability zone in a cluster */ + readonly hosts?: string[]; + /** Availability zone identifier */ + readonly zone?: string; +} + +export function clusterZoneDeserializer(item: any): ClusterZone { + return { + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + zone: item["zone"], + }; +} + +/** The response of a PrivateCloud list operation. */ +export interface _PrivateCloudList { + /** The PrivateCloud items on this page */ + value: PrivateCloud[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateCloudListDeserializer(item: any): _PrivateCloudList { + return { + value: privateCloudArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function privateCloudArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return privateCloudSerializer(item); + }); +} + +export function privateCloudArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateCloudDeserializer(item); + }); +} + +/** A private cloud resource */ +export interface PrivateCloud extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: PrivateCloudProperties; + /** The SKU (Stock Keeping Unit) assigned to this resource. */ + sku: Sku; + /** The managed service identities assigned to this resource. */ + identity?: PrivateCloudIdentity; +} + +export function privateCloudSerializer(item: PrivateCloud): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : privateCloudPropertiesSerializer(item["properties"]), + sku: skuSerializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : privateCloudIdentitySerializer(item["identity"]), + }; +} + +export function privateCloudDeserializer(item: any): PrivateCloud { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : privateCloudPropertiesDeserializer(item["properties"]), + sku: skuDeserializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : privateCloudIdentityDeserializer(item["identity"]), + }; +} + +/** The properties of a private cloud resource */ +export interface PrivateCloudProperties { + /** The default cluster used for management */ + managementCluster: ManagementCluster; + /** Connectivity to internet is enabled or disabled */ + internet?: InternetEnum; + /** vCenter Single Sign On Identity Sources */ + identitySources?: IdentitySource[]; + /** Properties describing how the cloud is distributed across availability zones */ + availability?: AvailabilityProperties; + /** Customer managed key encryption, can be enabled or disabled */ + encryption?: Encryption; + /** + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + */ + extendedNetworkBlocks?: string[]; + /** The provisioning state */ + readonly provisioningState?: PrivateCloudProvisioningState; + /** An ExpressRoute Circuit */ + circuit?: Circuit; + /** The endpoints */ + readonly endpoints?: Endpoints; + /** + * The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22 + */ + networkBlock: string; + /** Network used to access vCenter Server and NSX-T Manager */ + readonly managementNetwork?: string; + /** Used for virtual machine cold migration, cloning, and snapshot migration */ + readonly provisioningNetwork?: string; + /** Used for live migration of virtual machines */ + readonly vmotionNetwork?: string; + /** Optionally, set the vCenter admin password when the private cloud is created */ + vcenterPassword?: string; + /** Optionally, set the NSX-T Manager password when the private cloud is created */ + nsxtPassword?: string; + /** Thumbprint of the vCenter Server SSL certificate */ + readonly vcenterCertificateThumbprint?: string; + /** Thumbprint of the NSX-T Manager SSL certificate */ + readonly nsxtCertificateThumbprint?: string; + /** Array of cloud link IDs from other clouds that connect to this one */ + readonly externalCloudLinks?: string[]; + /** + * A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud + */ + secondaryCircuit?: Circuit; + /** + * Flag to indicate whether the private cloud has the quota for provisioned NSX + * Public IP count raised from 64 to 1024 + */ + readonly nsxPublicIpQuotaRaised?: NsxPublicIpQuotaRaisedEnum; + /** Azure resource ID of the virtual network */ + virtualNetworkId?: string; + /** The type of DNS zone to use. */ + dnsZoneType?: DnsZoneType; +} + +export function privateCloudPropertiesSerializer( + item: PrivateCloudProperties, +): any { + return { + managementCluster: managementClusterSerializer(item["managementCluster"]), + internet: item["internet"], + identitySources: !item["identitySources"] + ? item["identitySources"] + : identitySourceArraySerializer(item["identitySources"]), + availability: !item["availability"] + ? item["availability"] + : availabilityPropertiesSerializer(item["availability"]), + encryption: !item["encryption"] + ? item["encryption"] + : encryptionSerializer(item["encryption"]), + extendedNetworkBlocks: !item["extendedNetworkBlocks"] + ? item["extendedNetworkBlocks"] + : item["extendedNetworkBlocks"].map((p: any) => { + return p; + }), + circuit: !item["circuit"] + ? item["circuit"] + : circuitSerializer(item["circuit"]), + networkBlock: item["networkBlock"], + vcenterPassword: item["vcenterPassword"], + nsxtPassword: item["nsxtPassword"], + secondaryCircuit: !item["secondaryCircuit"] + ? item["secondaryCircuit"] + : circuitSerializer(item["secondaryCircuit"]), + virtualNetworkId: item["virtualNetworkId"], + dnsZoneType: item["dnsZoneType"], + }; +} + +export function privateCloudPropertiesDeserializer( + item: any, +): PrivateCloudProperties { + return { + managementCluster: managementClusterDeserializer(item["managementCluster"]), + internet: item["internet"], + identitySources: !item["identitySources"] + ? item["identitySources"] + : identitySourceArrayDeserializer(item["identitySources"]), + availability: !item["availability"] + ? item["availability"] + : availabilityPropertiesDeserializer(item["availability"]), + encryption: !item["encryption"] + ? item["encryption"] + : encryptionDeserializer(item["encryption"]), + extendedNetworkBlocks: !item["extendedNetworkBlocks"] + ? item["extendedNetworkBlocks"] + : item["extendedNetworkBlocks"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + circuit: !item["circuit"] + ? item["circuit"] + : circuitDeserializer(item["circuit"]), + endpoints: !item["endpoints"] + ? item["endpoints"] + : endpointsDeserializer(item["endpoints"]), + networkBlock: item["networkBlock"], + managementNetwork: item["managementNetwork"], + provisioningNetwork: item["provisioningNetwork"], + vmotionNetwork: item["vmotionNetwork"], + vcenterPassword: item["vcenterPassword"], + nsxtPassword: item["nsxtPassword"], + vcenterCertificateThumbprint: item["vcenterCertificateThumbprint"], + nsxtCertificateThumbprint: item["nsxtCertificateThumbprint"], + externalCloudLinks: !item["externalCloudLinks"] + ? item["externalCloudLinks"] + : item["externalCloudLinks"].map((p: any) => { + return p; + }), + secondaryCircuit: !item["secondaryCircuit"] + ? item["secondaryCircuit"] + : circuitDeserializer(item["secondaryCircuit"]), + nsxPublicIpQuotaRaised: item["nsxPublicIpQuotaRaised"], + virtualNetworkId: item["virtualNetworkId"], + dnsZoneType: item["dnsZoneType"], + }; +} + +/** The properties of a management cluster */ +export interface ManagementCluster { + /** The cluster size */ + clusterSize?: number; + /** The state of the cluster provisioning */ + readonly provisioningState?: ClusterProvisioningState; + /** The identity */ + readonly clusterId?: number; + /** The hosts */ + hosts?: string[]; + /** Name of the vsan datastore associated with the cluster */ + vsanDatastoreName?: string; +} + +export function managementClusterSerializer(item: ManagementCluster): any { + return { + clusterSize: item["clusterSize"], + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + vsanDatastoreName: item["vsanDatastoreName"], + }; +} + +export function managementClusterDeserializer(item: any): ManagementCluster { + return { + clusterSize: item["clusterSize"], + provisioningState: item["provisioningState"], + clusterId: item["clusterId"], + hosts: !item["hosts"] + ? item["hosts"] + : item["hosts"].map((p: any) => { + return p; + }), + vsanDatastoreName: item["vsanDatastoreName"], + }; +} + +/** Whether internet is enabled or disabled */ +export enum KnownInternetEnum { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * Whether internet is enabled or disabled \ + * {@link KnownInternetEnum} can be used interchangeably with InternetEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type InternetEnum = string; + +export function identitySourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return identitySourceSerializer(item); + }); +} + +export function identitySourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return identitySourceDeserializer(item); + }); +} + +/** vCenter Single Sign On Identity Source */ +export interface IdentitySource { + /** The name of the identity source */ + name?: string; + /** The domain's NetBIOS name */ + alias?: string; + /** The domain's dns name */ + domain?: string; + /** The base distinguished name for users */ + baseUserDN?: string; + /** The base distinguished name for groups */ + baseGroupDN?: string; + /** Primary server URL */ + primaryServer?: string; + /** Secondary server URL */ + secondaryServer?: string; + /** Protect LDAP communication using SSL certificate (LDAPS) */ + ssl?: SslEnum; + /** + * The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group + */ + username?: string; + /** + * The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. + */ + password?: string; +} + +export function identitySourceSerializer(item: IdentitySource): any { + return { + name: item["name"], + alias: item["alias"], + domain: item["domain"], + baseUserDN: item["baseUserDN"], + baseGroupDN: item["baseGroupDN"], + primaryServer: item["primaryServer"], + secondaryServer: item["secondaryServer"], + ssl: item["ssl"], + username: item["username"], + password: item["password"], + }; +} + +export function identitySourceDeserializer(item: any): IdentitySource { + return { + name: item["name"], + alias: item["alias"], + domain: item["domain"], + baseUserDN: item["baseUserDN"], + baseGroupDN: item["baseGroupDN"], + primaryServer: item["primaryServer"], + secondaryServer: item["secondaryServer"], + ssl: item["ssl"], + username: item["username"], + password: item["password"], + }; +} + +/** Whether SSL is enabled or disabled */ +export enum KnownSslEnum { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * Whether SSL is enabled or disabled \ + * {@link KnownSslEnum} can be used interchangeably with SslEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type SslEnum = string; + +/** The properties describing private cloud availability zone distribution */ +export interface AvailabilityProperties { + /** The availability strategy for the private cloud */ + strategy?: AvailabilityStrategy; + /** The primary availability zone for the private cloud */ + zone?: number; + /** The secondary availability zone for the private cloud */ + secondaryZone?: number; +} + +export function availabilityPropertiesSerializer( + item: AvailabilityProperties, +): any { + return { + strategy: item["strategy"], + zone: item["zone"], + secondaryZone: item["secondaryZone"], + }; +} + +export function availabilityPropertiesDeserializer( + item: any, +): AvailabilityProperties { + return { + strategy: item["strategy"], + zone: item["zone"], + secondaryZone: item["secondaryZone"], + }; +} + +/** Whether the private clouds is available in a single zone or two zones */ +export enum KnownAvailabilityStrategy { + /** in single zone */ + SingleZone = "SingleZone", + /** in two zones */ + DualZone = "DualZone", +} + +/** + * Whether the private clouds is available in a single zone or two zones \ + * {@link KnownAvailabilityStrategy} can be used interchangeably with AvailabilityStrategy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleZone**: in single zone \ + * **DualZone**: in two zones + */ +export type AvailabilityStrategy = string; + +/** The properties of customer managed encryption key */ +export interface Encryption { + /** Status of customer managed encryption key */ + status?: EncryptionState; + /** The key vault where the encryption key is stored */ + keyVaultProperties?: EncryptionKeyVaultProperties; +} + +export function encryptionSerializer(item: Encryption): any { + return { + status: item["status"], + keyVaultProperties: !item["keyVaultProperties"] + ? item["keyVaultProperties"] + : encryptionKeyVaultPropertiesSerializer(item["keyVaultProperties"]), + }; +} + +export function encryptionDeserializer(item: any): Encryption { + return { + status: item["status"], + keyVaultProperties: !item["keyVaultProperties"] + ? item["keyVaultProperties"] + : encryptionKeyVaultPropertiesDeserializer(item["keyVaultProperties"]), + }; +} + +/** Whether encryption is enabled or disabled */ +export enum KnownEncryptionState { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * Whether encryption is enabled or disabled \ + * {@link KnownEncryptionState} can be used interchangeably with EncryptionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type EncryptionState = string; + +/** An Encryption Key */ +export interface EncryptionKeyVaultProperties { + /** The name of the key. */ + keyName?: string; + /** The version of the key. */ + keyVersion?: string; + /** The auto-detected version of the key if versionType is auto-detected. */ + readonly autoDetectedKeyVersion?: string; + /** The URL of the vault. */ + keyVaultUrl?: string; + /** The state of key provided */ + readonly keyState?: EncryptionKeyStatus; + /** Property of the key if user provided or auto detected */ + readonly versionType?: EncryptionVersionType; +} + +export function encryptionKeyVaultPropertiesSerializer( + item: EncryptionKeyVaultProperties, +): any { + return { + keyName: item["keyName"], + keyVersion: item["keyVersion"], + keyVaultUrl: item["keyVaultUrl"], + }; +} + +export function encryptionKeyVaultPropertiesDeserializer( + item: any, +): EncryptionKeyVaultProperties { + return { + keyName: item["keyName"], + keyVersion: item["keyVersion"], + autoDetectedKeyVersion: item["autoDetectedKeyVersion"], + keyVaultUrl: item["keyVaultUrl"], + keyState: item["keyState"], + versionType: item["versionType"], + }; +} + +/** Whether the the encryption key is connected or access denied */ +export enum KnownEncryptionKeyStatus { + /** is connected */ + Connected = "Connected", + /** is access denied */ + AccessDenied = "AccessDenied", +} + +/** + * Whether the the encryption key is connected or access denied \ + * {@link KnownEncryptionKeyStatus} can be used interchangeably with EncryptionKeyStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: is connected \ + * **AccessDenied**: is access denied + */ +export type EncryptionKeyStatus = string; + +/** Whether the encryption version is fixed or auto-detected */ +export enum KnownEncryptionVersionType { + /** is fixed */ + Fixed = "Fixed", + /** is auto-detected */ + AutoDetected = "AutoDetected", +} + +/** + * Whether the encryption version is fixed or auto-detected \ + * {@link KnownEncryptionVersionType} can be used interchangeably with EncryptionVersionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Fixed**: is fixed \ + * **AutoDetected**: is auto-detected + */ +export type EncryptionVersionType = string; + +/** private cloud provisioning state */ +export enum KnownPrivateCloudProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is cancelled */ + Cancelled = "Cancelled", + /** is pending */ + Pending = "Pending", + /** is building */ + Building = "Building", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * private cloud provisioning state \ + * {@link KnownPrivateCloudProvisioningState} can be used interchangeably with PrivateCloudProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Cancelled**: is cancelled \ + * **Pending**: is pending \ + * **Building**: is building \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type PrivateCloudProvisioningState = string; + +/** An ExpressRoute Circuit */ +export interface Circuit { + /** CIDR of primary subnet */ + readonly primarySubnet?: string; + /** CIDR of secondary subnet */ + readonly secondarySubnet?: string; + /** Identifier of the ExpressRoute Circuit (Microsoft Colo only) */ + readonly expressRouteID?: string; + /** ExpressRoute Circuit private peering identifier */ + readonly expressRoutePrivatePeeringID?: string; +} + +export function circuitSerializer(item: Circuit): any { + return item; +} + +export function circuitDeserializer(item: any): Circuit { + return { + primarySubnet: item["primarySubnet"], + secondarySubnet: item["secondarySubnet"], + expressRouteID: item["expressRouteID"], + expressRoutePrivatePeeringID: item["expressRoutePrivatePeeringID"], + }; +} + +/** Endpoint addresses */ +export interface Endpoints { + /** Endpoint FQDN for the NSX-T Data Center manager */ + readonly nsxtManager?: string; + /** Endpoint FQDN for Virtual Center Server Appliance */ + readonly vcsa?: string; + /** Endpoint FQDN for the HCX Cloud Manager */ + readonly hcxCloudManager?: string; + /** Endpoint IP for the NSX-T Data Center manager */ + readonly nsxtManagerIp?: string; + /** Endpoint IP for Virtual Center Server Appliance */ + readonly vcenterIp?: string; + /** Endpoint IP for the HCX Cloud Manager */ + readonly hcxCloudManagerIp?: string; +} + +export function endpointsDeserializer(item: any): Endpoints { + return { + nsxtManager: item["nsxtManager"], + vcsa: item["vcsa"], + hcxCloudManager: item["hcxCloudManager"], + nsxtManagerIp: item["nsxtManagerIp"], + vcenterIp: item["vcenterIp"], + hcxCloudManagerIp: item["hcxCloudManagerIp"], + }; +} + +/** NSX public IP quota raised */ +export enum KnownNsxPublicIpQuotaRaisedEnum { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * NSX public IP quota raised \ + * {@link KnownNsxPublicIpQuotaRaisedEnum} can be used interchangeably with NsxPublicIpQuotaRaisedEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type NsxPublicIpQuotaRaisedEnum = string; + +/** The type of DNS zone. */ +export enum KnownDnsZoneType { + /** Primary DNS zone. */ + Public = "Public", + /** Private DNS zone. */ + Private = "Private", +} + +/** + * The type of DNS zone. \ + * {@link KnownDnsZoneType} can be used interchangeably with DnsZoneType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Public**: Primary DNS zone. \ + * **Private**: Private DNS zone. + */ +export type DnsZoneType = string; + +/** Managed service identity (either system assigned, or none) */ +export interface PrivateCloudIdentity { + /** 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: SystemAssignedServiceIdentityType; +} + +export function privateCloudIdentitySerializer( + item: PrivateCloudIdentity, +): any { + return { type: item["type"] }; +} + +export function privateCloudIdentityDeserializer( + item: any, +): PrivateCloudIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + }; +} + +/** Type of managed service identity (either system assigned, or none). */ +export enum KnownSystemAssignedServiceIdentityType { + /** No managed system identity. */ + None = "None", + /** System assigned managed system identity. */ + SystemAssigned = "SystemAssigned", +} + +/** + * Type of managed service identity (either system assigned, or none). \ + * {@link KnownSystemAssignedServiceIdentityType} can be used interchangeably with SystemAssignedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No managed system identity. \ + * **SystemAssigned**: System assigned managed system identity. + */ +export type SystemAssignedServiceIdentityType = 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"], + location: item["location"], + }; +} + +/** An update to a private cloud resource */ +export interface PrivateCloudUpdate { + /** Resource tags. */ + tags?: Record; + /** The SKU (Stock Keeping Unit) assigned to this resource. */ + sku?: Sku; + /** The managed service identities assigned to this resource. */ + identity?: PrivateCloudIdentity; + /** The updatable properties of a private cloud resource */ + properties?: PrivateCloudUpdateProperties; +} + +export function privateCloudUpdateSerializer(item: PrivateCloudUpdate): any { + return { + tags: item["tags"], + sku: !item["sku"] ? item["sku"] : skuSerializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : privateCloudIdentitySerializer(item["identity"]), + properties: !item["properties"] + ? item["properties"] + : privateCloudUpdatePropertiesSerializer(item["properties"]), + }; +} + +/** The properties of a private cloud resource that may be updated */ +export interface PrivateCloudUpdateProperties { + /** The default cluster used for management */ + managementCluster?: ManagementCluster; + /** Connectivity to internet is enabled or disabled */ + internet?: InternetEnum; + /** vCenter Single Sign On Identity Sources */ + identitySources?: IdentitySource[]; + /** Properties describing how the cloud is distributed across availability zones */ + availability?: AvailabilityProperties; + /** Customer managed key encryption, can be enabled or disabled */ + encryption?: Encryption; + /** + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + */ + extendedNetworkBlocks?: string[]; + /** The type of DNS zone to use. */ + dnsZoneType?: DnsZoneType; +} + +export function privateCloudUpdatePropertiesSerializer( + item: PrivateCloudUpdateProperties, +): any { + return { + managementCluster: !item["managementCluster"] + ? item["managementCluster"] + : managementClusterSerializer(item["managementCluster"]), + internet: item["internet"], + identitySources: !item["identitySources"] + ? item["identitySources"] + : identitySourceArraySerializer(item["identitySources"]), + availability: !item["availability"] + ? item["availability"] + : availabilityPropertiesSerializer(item["availability"]), + encryption: !item["encryption"] + ? item["encryption"] + : encryptionSerializer(item["encryption"]), + extendedNetworkBlocks: !item["extendedNetworkBlocks"] + ? item["extendedNetworkBlocks"] + : item["extendedNetworkBlocks"].map((p: any) => { + return p; + }), + dnsZoneType: item["dnsZoneType"], + }; +} + +/** Administrative credentials for accessing vCenter and NSX-T */ +export interface AdminCredentials { + /** NSX-T Manager username */ + readonly nsxtUsername?: string; + /** NSX-T Manager password */ + readonly nsxtPassword?: string; + /** vCenter admin username */ + readonly vcenterUsername?: string; + /** vCenter admin password */ + readonly vcenterPassword?: string; +} + +export function adminCredentialsDeserializer(item: any): AdminCredentials { + return { + nsxtUsername: item["nsxtUsername"], + nsxtPassword: item["nsxtPassword"], + vcenterUsername: item["vcenterUsername"], + vcenterPassword: item["vcenterPassword"], + }; +} + +/** Subscription trial availability */ +export interface Trial { + /** Trial status */ + readonly status?: TrialStatus; + /** Number of trial hosts available */ + readonly availableHosts?: number; +} + +export function trialDeserializer(item: any): Trial { + return { + status: item["status"], + availableHosts: item["availableHosts"], + }; +} + +/** trial status */ +export enum KnownTrialStatus { + /** is available */ + TrialAvailable = "TrialAvailable", + /** is used */ + TrialUsed = "TrialUsed", + /** is disabled */ + TrialDisabled = "TrialDisabled", +} + +/** + * trial status \ + * {@link KnownTrialStatus} can be used interchangeably with TrialStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrialAvailable**: is available \ + * **TrialUsed**: is used \ + * **TrialDisabled**: is disabled + */ +export type TrialStatus = string; + +/** Subscription quotas */ +export interface Quota { + /** Remaining hosts quota by sku type */ + readonly hostsRemaining?: Record; + /** Host quota is active for current subscription */ + readonly quotaEnabled?: QuotaEnabled; +} + +export function quotaDeserializer(item: any): Quota { + return { + hostsRemaining: item["hostsRemaining"], + quotaEnabled: item["quotaEnabled"], + }; +} + +/** quota enabled */ +export enum KnownQuotaEnabled { + /** is enabled */ + Enabled = "Enabled", + /** is disabled */ + Disabled = "Disabled", +} + +/** + * quota enabled \ + * {@link KnownQuotaEnabled} can be used interchangeably with QuotaEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: is enabled \ + * **Disabled**: is disabled + */ +export type QuotaEnabled = string; + +/** 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 and 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. */ + "user,system" = "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; + +/** Script Output Stream type */ +export enum KnownScriptOutputStreamType { + /** is information */ + Information = "Information", + /** is warning */ + Warning = "Warning", + /** is output */ + Output = "Output", + /** is error */ + Error = "Error", +} + +/** + * Script Output Stream type \ + * {@link KnownScriptOutputStreamType} can be used interchangeably with ScriptOutputStreamType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Information**: is information \ + * **Warning**: is warning \ + * **Output**: is output \ + * **Error**: is error + */ +export type ScriptOutputStreamType = string; + +/** Azure VMware Solution API versions. */ +export enum KnownVersions { + /** Azure VMware Solution API version 2023-09-01. */ + v2023_09_01 = "2023-09-01", +} diff --git a/sdk/avs/arm-avs/src/models/parameters.ts b/sdk/avs/arm-avs/src/models/parameters.ts deleted file mode 100644 index 5a1b6d215b81..000000000000 --- a/sdk/avs/arm-avs/src/models/parameters.ts +++ /dev/null @@ -1,562 +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 { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - Sku as SkuMapper, - PrivateCloud as PrivateCloudMapper, - PrivateCloudUpdate as PrivateCloudUpdateMapper, - Addon as AddonMapper, - ExpressRouteAuthorization as ExpressRouteAuthorizationMapper, - CloudLink as CloudLinkMapper, - Cluster as ClusterMapper, - ClusterUpdate as ClusterUpdateMapper, - Datastore as DatastoreMapper, - PlacementPolicy as PlacementPolicyMapper, - PlacementPolicyUpdate as PlacementPolicyUpdateMapper, - VirtualMachineRestrictMovement as VirtualMachineRestrictMovementMapper, - GlobalReachConnection as GlobalReachConnectionMapper, - HcxEnterpriseSite as HcxEnterpriseSiteMapper, - IscsiPath as IscsiPathMapper, - ScriptExecution as ScriptExecutionMapper, - WorkloadNetworkDhcp as WorkloadNetworkDhcpMapper, - WorkloadNetworkDnsService as WorkloadNetworkDnsServiceMapper, - WorkloadNetworkDnsZone as WorkloadNetworkDnsZoneMapper, - WorkloadNetworkPortMirroring as WorkloadNetworkPortMirroringMapper, - WorkloadNetworkPublicIP as WorkloadNetworkPublicIPMapper, - WorkloadNetworkSegment as WorkloadNetworkSegmentMapper, - WorkloadNetworkVMGroup as WorkloadNetworkVMGroupMapper, -} from "../models/mappers"; - -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: "2023-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 location: OperationURLParameter = { - parameterPath: "location", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "location", - 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 sku: OperationParameter = { - parameterPath: ["options", "sku"], - mapper: SkuMapper, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const privateCloudName: OperationURLParameter = { - parameterPath: "privateCloudName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "privateCloudName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const privateCloud: OperationParameter = { - parameterPath: "privateCloud", - mapper: PrivateCloudMapper, -}; - -export const privateCloudUpdate: OperationParameter = { - parameterPath: "privateCloudUpdate", - mapper: PrivateCloudUpdateMapper, -}; - -export const addonName: OperationURLParameter = { - parameterPath: "addonName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "addonName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const addon: OperationParameter = { - parameterPath: "addon", - mapper: AddonMapper, -}; - -export const authorizationName: OperationURLParameter = { - parameterPath: "authorizationName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "authorizationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const authorization: OperationParameter = { - parameterPath: "authorization", - mapper: ExpressRouteAuthorizationMapper, -}; - -export const cloudLinkName: OperationURLParameter = { - parameterPath: "cloudLinkName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "cloudLinkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const cloudLink: OperationParameter = { - parameterPath: "cloudLink", - mapper: CloudLinkMapper, -}; - -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "clusterName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const cluster: OperationParameter = { - parameterPath: "cluster", - mapper: ClusterMapper, -}; - -export const clusterUpdate: OperationParameter = { - parameterPath: "clusterUpdate", - mapper: ClusterUpdateMapper, -}; - -export const datastoreName: OperationURLParameter = { - parameterPath: "datastoreName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "datastoreName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const datastore: OperationParameter = { - parameterPath: "datastore", - mapper: DatastoreMapper, -}; - -export const placementPolicyName: OperationURLParameter = { - parameterPath: "placementPolicyName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "placementPolicyName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const placementPolicy: OperationParameter = { - parameterPath: "placementPolicy", - mapper: PlacementPolicyMapper, -}; - -export const placementPolicyUpdate: OperationParameter = { - parameterPath: "placementPolicyUpdate", - mapper: PlacementPolicyUpdateMapper, -}; - -export const virtualMachineId: OperationURLParameter = { - parameterPath: "virtualMachineId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "virtualMachineId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const restrictMovement: OperationParameter = { - parameterPath: "restrictMovement", - mapper: VirtualMachineRestrictMovementMapper, -}; - -export const globalReachConnectionName: OperationURLParameter = { - parameterPath: "globalReachConnectionName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "globalReachConnectionName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const globalReachConnection: OperationParameter = { - parameterPath: "globalReachConnection", - mapper: GlobalReachConnectionMapper, -}; - -export const hcxEnterpriseSiteName: OperationURLParameter = { - parameterPath: "hcxEnterpriseSiteName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "hcxEnterpriseSiteName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const hcxEnterpriseSite: OperationParameter = { - parameterPath: "hcxEnterpriseSite", - mapper: HcxEnterpriseSiteMapper, -}; - -export const resource: OperationParameter = { - parameterPath: "resource", - mapper: IscsiPathMapper, -}; - -export const scriptExecutionName: OperationURLParameter = { - parameterPath: "scriptExecutionName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "scriptExecutionName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const scriptExecution: OperationParameter = { - parameterPath: "scriptExecution", - mapper: ScriptExecutionMapper, -}; - -export const scriptOutputStreamType: OperationParameter = { - parameterPath: ["options", "scriptOutputStreamType"], - mapper: { - serializedName: "scriptOutputStreamType", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, -}; - -export const scriptPackageName: OperationURLParameter = { - parameterPath: "scriptPackageName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._@]+$"), - }, - serializedName: "scriptPackageName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const scriptCmdletName: OperationURLParameter = { - parameterPath: "scriptCmdletName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "scriptCmdletName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const dhcpId: OperationURLParameter = { - parameterPath: "dhcpId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "dhcpId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkDhcp: OperationParameter = { - parameterPath: "workloadNetworkDhcp", - mapper: WorkloadNetworkDhcpMapper, -}; - -export const dnsServiceId: OperationURLParameter = { - parameterPath: "dnsServiceId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "dnsServiceId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkDnsService: OperationParameter = { - parameterPath: "workloadNetworkDnsService", - mapper: WorkloadNetworkDnsServiceMapper, -}; - -export const dnsZoneId: OperationURLParameter = { - parameterPath: "dnsZoneId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "dnsZoneId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkDnsZone: OperationParameter = { - parameterPath: "workloadNetworkDnsZone", - mapper: WorkloadNetworkDnsZoneMapper, -}; - -export const gatewayId: OperationURLParameter = { - parameterPath: "gatewayId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "gatewayId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const portMirroringId: OperationURLParameter = { - parameterPath: "portMirroringId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "portMirroringId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkPortMirroring: OperationParameter = { - parameterPath: "workloadNetworkPortMirroring", - mapper: WorkloadNetworkPortMirroringMapper, -}; - -export const publicIPId: OperationURLParameter = { - parameterPath: "publicIPId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "publicIPId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkPublicIP: OperationParameter = { - parameterPath: "workloadNetworkPublicIP", - mapper: WorkloadNetworkPublicIPMapper, -}; - -export const segmentId: OperationURLParameter = { - parameterPath: "segmentId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "segmentId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkSegment: OperationParameter = { - parameterPath: "workloadNetworkSegment", - mapper: WorkloadNetworkSegmentMapper, -}; - -export const vmGroupId: OperationURLParameter = { - parameterPath: "vmGroupId", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._]+$"), - }, - serializedName: "vmGroupId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const workloadNetworkVMGroup: OperationParameter = { - parameterPath: "workloadNetworkVMGroup", - mapper: WorkloadNetworkVMGroupMapper, -}; diff --git a/sdk/avs/arm-avs/src/operations/addons.ts b/sdk/avs/arm-avs/src/operations/addons.ts deleted file mode 100644 index f41c4c340945..000000000000 --- a/sdk/avs/arm-avs/src/operations/addons.ts +++ /dev/null @@ -1,492 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Addons } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - Addon, - AddonsListNextOptionalParams, - AddonsListOptionalParams, - AddonsListResponse, - AddonsGetOptionalParams, - AddonsGetResponse, - AddonsCreateOrUpdateOptionalParams, - AddonsCreateOrUpdateResponse, - AddonsDeleteOptionalParams, - AddonsListNextResponse, -} from "../models"; - -/// -/** Class containing Addons operations. */ -export class AddonsImpl implements Addons { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Addons class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List Addon resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: AddonsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: AddonsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AddonsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: AddonsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List Addon resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: AddonsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, addonName, options }, - getOperationSpec, - ); - } - - /** - * Create a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param addon Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - addon: Addon, - options?: AddonsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AddonsCreateOrUpdateResponse - > - > { - 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, privateCloudName, addonName, addon, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - AddonsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param addon Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - addon: Addon, - options?: AddonsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - addonName, - addon, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, addonName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - addonName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: AddonsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AddonList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Addon, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.addonName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Addon, - }, - 201: { - bodyMapper: Mappers.Addon, - }, - 202: { - bodyMapper: Mappers.Addon, - }, - 204: { - bodyMapper: Mappers.Addon, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.addon, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.addonName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.addonName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AddonList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/authorizations.ts b/sdk/avs/arm-avs/src/operations/authorizations.ts deleted file mode 100644 index f4688c754646..000000000000 --- a/sdk/avs/arm-avs/src/operations/authorizations.ts +++ /dev/null @@ -1,498 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Authorizations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - ExpressRouteAuthorization, - AuthorizationsListNextOptionalParams, - AuthorizationsListOptionalParams, - AuthorizationsListResponse, - AuthorizationsGetOptionalParams, - AuthorizationsGetResponse, - AuthorizationsCreateOrUpdateOptionalParams, - AuthorizationsCreateOrUpdateResponse, - AuthorizationsDeleteOptionalParams, - AuthorizationsListNextResponse, -} from "../models"; - -/// -/** Class containing Authorizations operations. */ -export class AuthorizationsImpl implements Authorizations { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Authorizations class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List ExpressRouteAuthorization resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: AuthorizationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: AuthorizationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AuthorizationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: AuthorizationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List ExpressRouteAuthorization resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: AuthorizationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, authorizationName, options }, - getOperationSpec, - ); - } - - /** - * Create a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param authorization Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - authorization: ExpressRouteAuthorization, - options?: AuthorizationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AuthorizationsCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - authorizationName, - authorization, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - AuthorizationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param authorization Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - authorization: ExpressRouteAuthorization, - options?: AuthorizationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - authorizationName, - authorization, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, authorizationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - authorizationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: AuthorizationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteAuthorizationList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteAuthorization, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteAuthorization, - }, - 201: { - bodyMapper: Mappers.ExpressRouteAuthorization, - }, - 202: { - bodyMapper: Mappers.ExpressRouteAuthorization, - }, - 204: { - bodyMapper: Mappers.ExpressRouteAuthorization, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.authorization, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.authorizationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExpressRouteAuthorizationList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/cloudLinks.ts b/sdk/avs/arm-avs/src/operations/cloudLinks.ts deleted file mode 100644 index 490e736648fd..000000000000 --- a/sdk/avs/arm-avs/src/operations/cloudLinks.ts +++ /dev/null @@ -1,498 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CloudLinks } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - CloudLink, - CloudLinksListNextOptionalParams, - CloudLinksListOptionalParams, - CloudLinksListResponse, - CloudLinksGetOptionalParams, - CloudLinksGetResponse, - CloudLinksCreateOrUpdateOptionalParams, - CloudLinksCreateOrUpdateResponse, - CloudLinksDeleteOptionalParams, - CloudLinksListNextResponse, -} from "../models"; - -/// -/** Class containing CloudLinks operations. */ -export class CloudLinksImpl implements CloudLinks { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class CloudLinks class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List CloudLink resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: CloudLinksListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: CloudLinksListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CloudLinksListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: CloudLinksListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List CloudLink resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: CloudLinksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, cloudLinkName, options }, - getOperationSpec, - ); - } - - /** - * Create a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param cloudLink Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - cloudLink: CloudLink, - options?: CloudLinksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudLinksCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - cloudLinkName, - cloudLink, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - CloudLinksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param cloudLink Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - cloudLink: CloudLink, - options?: CloudLinksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - cloudLinkName, - cloudLink, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, cloudLinkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - cloudLinkName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: CloudLinksListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudLinkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudLink, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.cloudLinkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CloudLink, - }, - 201: { - bodyMapper: Mappers.CloudLink, - }, - 202: { - bodyMapper: Mappers.CloudLink, - }, - 204: { - bodyMapper: Mappers.CloudLink, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.cloudLink, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.cloudLinkName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.cloudLinkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudLinkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/clusters.ts b/sdk/avs/arm-avs/src/operations/clusters.ts deleted file mode 100644 index 28ff74c3d427..000000000000 --- a/sdk/avs/arm-avs/src/operations/clusters.ts +++ /dev/null @@ -1,683 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Clusters } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - Cluster, - ClustersListNextOptionalParams, - ClustersListOptionalParams, - ClustersListResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClusterUpdate, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersListZonesOptionalParams, - ClustersListZonesResponse, - ClustersListNextResponse, -} from "../models"; - -/// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Clusters class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List Cluster resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: ClustersListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: ClustersListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClustersListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: ClustersListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List Cluster resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: ClustersListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, options }, - getOperationSpec, - ); - } - - /** - * Create a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param cluster Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - 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, - privateCloudName, - clusterName, - cluster, - 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 Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param cluster Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - clusterName, - cluster, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param clusterUpdate The cluster properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - clusterUpdate: ClusterUpdate, - options?: ClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - 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, - privateCloudName, - clusterName, - clusterUpdate, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ClustersUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param clusterUpdate The cluster properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - clusterUpdate: ClusterUpdate, - options?: ClustersUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - privateCloudName, - clusterName, - clusterUpdate, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, clusterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - clusterName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List hosts by zone in a cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - listZones( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersListZonesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, options }, - listZonesOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: ClustersListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Cluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/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.cluster, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/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.clusterUpdate, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listZonesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClusterZoneList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/datastores.ts b/sdk/avs/arm-avs/src/operations/datastores.ts deleted file mode 100644 index 825573d96ec4..000000000000 --- a/sdk/avs/arm-avs/src/operations/datastores.ts +++ /dev/null @@ -1,545 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Datastores } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - Datastore, - DatastoresListNextOptionalParams, - DatastoresListOptionalParams, - DatastoresListResponse, - DatastoresGetOptionalParams, - DatastoresGetResponse, - DatastoresCreateOrUpdateOptionalParams, - DatastoresCreateOrUpdateResponse, - DatastoresDeleteOptionalParams, - DatastoresListNextResponse, -} from "../models"; - -/// -/** Class containing Datastores operations. */ -export class DatastoresImpl implements Datastores { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Datastores class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List Datastore resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: DatastoresListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: DatastoresListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DatastoresListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - privateCloudName, - clusterName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: DatastoresListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * List Datastore resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: DatastoresListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, options }, - listOperationSpec, - ); - } - - /** - * Get a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - options, - }, - getOperationSpec, - ); - } - - /** - * Create a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param datastore Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - datastore: Datastore, - options?: DatastoresCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DatastoresCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - clusterName, - datastoreName, - datastore, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - DatastoresCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param datastore Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - datastore: Datastore, - options?: DatastoresCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - datastore, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresDeleteOptionalParams, - ): Promise, void>> { - 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, - privateCloudName, - clusterName, - datastoreName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - nextLink: string, - options?: DatastoresListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DatastoreList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Datastore, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.datastoreName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Datastore, - }, - 201: { - bodyMapper: Mappers.Datastore, - }, - 202: { - bodyMapper: Mappers.Datastore, - }, - 204: { - bodyMapper: Mappers.Datastore, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.datastore, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.datastoreName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.datastoreName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DatastoreList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/globalReachConnections.ts b/sdk/avs/arm-avs/src/operations/globalReachConnections.ts deleted file mode 100644 index 2dc7c5ca573c..000000000000 --- a/sdk/avs/arm-avs/src/operations/globalReachConnections.ts +++ /dev/null @@ -1,508 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GlobalReachConnections } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - GlobalReachConnection, - GlobalReachConnectionsListNextOptionalParams, - GlobalReachConnectionsListOptionalParams, - GlobalReachConnectionsListResponse, - GlobalReachConnectionsGetOptionalParams, - GlobalReachConnectionsGetResponse, - GlobalReachConnectionsCreateOrUpdateOptionalParams, - GlobalReachConnectionsCreateOrUpdateResponse, - GlobalReachConnectionsDeleteOptionalParams, - GlobalReachConnectionsListNextResponse, -} from "../models"; - -/// -/** Class containing GlobalReachConnections operations. */ -export class GlobalReachConnectionsImpl implements GlobalReachConnections { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class GlobalReachConnections class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List GlobalReachConnection resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: GlobalReachConnectionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: GlobalReachConnectionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GlobalReachConnectionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: GlobalReachConnectionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List GlobalReachConnection resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: GlobalReachConnectionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - globalReachConnectionName, - options, - }, - getOperationSpec, - ); - } - - /** - * Create a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param globalReachConnection Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - globalReachConnection: GlobalReachConnection, - options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GlobalReachConnectionsCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - globalReachConnectionName, - globalReachConnection, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - GlobalReachConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param globalReachConnection Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - globalReachConnection: GlobalReachConnection, - options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - globalReachConnection, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsDeleteOptionalParams, - ): Promise, void>> { - 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, - privateCloudName, - globalReachConnectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - globalReachConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: GlobalReachConnectionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalReachConnectionList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalReachConnection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.globalReachConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GlobalReachConnection, - }, - 201: { - bodyMapper: Mappers.GlobalReachConnection, - }, - 202: { - bodyMapper: Mappers.GlobalReachConnection, - }, - 204: { - bodyMapper: Mappers.GlobalReachConnection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.globalReachConnection, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.globalReachConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.globalReachConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalReachConnectionList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts b/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts deleted file mode 100644 index 9ec9b9a7dbcc..000000000000 --- a/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts +++ /dev/null @@ -1,337 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { HcxEnterpriseSites } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - HcxEnterpriseSite, - HcxEnterpriseSitesListNextOptionalParams, - HcxEnterpriseSitesListOptionalParams, - HcxEnterpriseSitesListResponse, - HcxEnterpriseSitesGetOptionalParams, - HcxEnterpriseSitesGetResponse, - HcxEnterpriseSitesCreateOrUpdateOptionalParams, - HcxEnterpriseSitesCreateOrUpdateResponse, - HcxEnterpriseSitesDeleteOptionalParams, - HcxEnterpriseSitesListNextResponse, -} from "../models"; - -/// -/** Class containing HcxEnterpriseSites operations. */ -export class HcxEnterpriseSitesImpl implements HcxEnterpriseSites { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class HcxEnterpriseSites class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List HcxEnterpriseSite resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: HcxEnterpriseSitesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: HcxEnterpriseSitesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: HcxEnterpriseSitesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: HcxEnterpriseSitesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List HcxEnterpriseSite resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: HcxEnterpriseSitesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - options?: HcxEnterpriseSitesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, hcxEnterpriseSiteName, options }, - getOperationSpec, - ); - } - - /** - * Create a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param hcxEnterpriseSite Resource create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - hcxEnterpriseSite: HcxEnterpriseSite, - options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - hcxEnterpriseSite, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Delete a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - options?: HcxEnterpriseSitesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, hcxEnterpriseSiteName, options }, - deleteOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: HcxEnterpriseSitesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HcxEnterpriseSiteList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HcxEnterpriseSite, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.hcxEnterpriseSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.HcxEnterpriseSite, - }, - 201: { - bodyMapper: Mappers.HcxEnterpriseSite, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.hcxEnterpriseSite, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.hcxEnterpriseSiteName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.hcxEnterpriseSiteName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.HcxEnterpriseSiteList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/index.ts b/sdk/avs/arm-avs/src/operations/index.ts deleted file mode 100644 index a633b98e49a3..000000000000 --- a/sdk/avs/arm-avs/src/operations/index.ts +++ /dev/null @@ -1,25 +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"; -export * from "./locations"; -export * from "./privateClouds"; -export * from "./addons"; -export * from "./authorizations"; -export * from "./cloudLinks"; -export * from "./clusters"; -export * from "./datastores"; -export * from "./placementPolicies"; -export * from "./virtualMachines"; -export * from "./globalReachConnections"; -export * from "./hcxEnterpriseSites"; -export * from "./iscsiPaths"; -export * from "./scriptExecutions"; -export * from "./scriptPackages"; -export * from "./scriptCmdlets"; -export * from "./workloadNetworks"; diff --git a/sdk/avs/arm-avs/src/operations/iscsiPaths.ts b/sdk/avs/arm-avs/src/operations/iscsiPaths.ts deleted file mode 100644 index bc1c1217844d..000000000000 --- a/sdk/avs/arm-avs/src/operations/iscsiPaths.ts +++ /dev/null @@ -1,481 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { IscsiPaths } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - IscsiPath, - IscsiPathsListByPrivateCloudNextOptionalParams, - IscsiPathsListByPrivateCloudOptionalParams, - IscsiPathsListByPrivateCloudResponse, - IscsiPathsGetOptionalParams, - IscsiPathsGetResponse, - IscsiPathsCreateOrUpdateOptionalParams, - IscsiPathsCreateOrUpdateResponse, - IscsiPathsDeleteOptionalParams, - IscsiPathsListByPrivateCloudNextResponse, -} from "../models"; - -/// -/** Class containing IscsiPaths operations. */ -export class IscsiPathsImpl implements IscsiPaths { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class IscsiPaths class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List IscsiPath resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listByPrivateCloud( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsListByPrivateCloudOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByPrivateCloudPagingAll( - resourceGroupName, - privateCloudName, - 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.listByPrivateCloudPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listByPrivateCloudPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsListByPrivateCloudOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IscsiPathsListByPrivateCloudResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByPrivateCloud( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByPrivateCloudNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByPrivateCloudPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsListByPrivateCloudOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByPrivateCloudPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List IscsiPath resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listByPrivateCloud( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsListByPrivateCloudOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listByPrivateCloudOperationSpec, - ); - } - - /** - * Get a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - getOperationSpec, - ); - } - - /** - * Create a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - resource: IscsiPath, - options?: IscsiPathsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - IscsiPathsCreateOrUpdateResponse - > - > { - 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, privateCloudName, resource, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - IscsiPathsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param resource Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - resource: IscsiPath, - options?: IscsiPathsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - resource, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByPrivateCloudNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListByPrivateCloud method. - * @param options The options parameters. - */ - private _listByPrivateCloudNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: IscsiPathsListByPrivateCloudNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listByPrivateCloudNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByPrivateCloudOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IscsiPathListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IscsiPath, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IscsiPath, - }, - 201: { - bodyMapper: Mappers.IscsiPath, - }, - 202: { - bodyMapper: Mappers.IscsiPath, - }, - 204: { - bodyMapper: Mappers.IscsiPath, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.resource, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByPrivateCloudNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IscsiPathListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/locations.ts b/sdk/avs/arm-avs/src/operations/locations.ts deleted file mode 100644 index a92036c5bdf3..000000000000 --- a/sdk/avs/arm-avs/src/operations/locations.ts +++ /dev/null @@ -1,107 +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 { Locations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - LocationsCheckQuotaAvailabilityOptionalParams, - LocationsCheckQuotaAvailabilityResponse, - LocationsCheckTrialAvailabilityOptionalParams, - LocationsCheckTrialAvailabilityResponse, -} from "../models"; - -/** Class containing Locations operations. */ -export class LocationsImpl implements Locations { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Locations class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * Return quota for subscription by region - * @param location The name of the Azure region. - * @param options The options parameters. - */ - checkQuotaAvailability( - location: string, - options?: LocationsCheckQuotaAvailabilityOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - checkQuotaAvailabilityOperationSpec, - ); - } - - /** - * Return trial status for subscription by region - * @param location The name of the Azure region. - * @param options The options parameters. - */ - checkTrialAvailability( - location: string, - options?: LocationsCheckTrialAvailabilityOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - checkTrialAvailabilityOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const checkQuotaAvailabilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.Quota, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkTrialAvailabilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.Trial, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.sku, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/operations.ts b/sdk/avs/arm-avs/src/operations/operations.ts deleted file mode 100644 index 03311f677d2c..000000000000 --- a/sdk/avs/arm-avs/src/operations/operations.ts +++ /dev/null @@ -1,149 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List the operations for the provider - * @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); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List the operations for the provider - * @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.AVS/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/avs/arm-avs/src/operations/placementPolicies.ts b/sdk/avs/arm-avs/src/operations/placementPolicies.ts deleted file mode 100644 index a8c697047a7d..000000000000 --- a/sdk/avs/arm-avs/src/operations/placementPolicies.ts +++ /dev/null @@ -1,694 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PlacementPolicies } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - PlacementPolicy, - PlacementPoliciesListNextOptionalParams, - PlacementPoliciesListOptionalParams, - PlacementPoliciesListResponse, - PlacementPoliciesGetOptionalParams, - PlacementPoliciesGetResponse, - PlacementPoliciesCreateOrUpdateOptionalParams, - PlacementPoliciesCreateOrUpdateResponse, - PlacementPolicyUpdate, - PlacementPoliciesUpdateOptionalParams, - PlacementPoliciesUpdateResponse, - PlacementPoliciesDeleteOptionalParams, - PlacementPoliciesListNextResponse, -} from "../models"; - -/// -/** Class containing PlacementPolicies operations. */ -export class PlacementPoliciesImpl implements PlacementPolicies { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class PlacementPolicies class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List PlacementPolicy resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: PlacementPoliciesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: PlacementPoliciesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PlacementPoliciesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - privateCloudName, - clusterName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: PlacementPoliciesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * List PlacementPolicy resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: PlacementPoliciesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, options }, - listOperationSpec, - ); - } - - /** - * Get a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - options, - }, - getOperationSpec, - ); - } - - /** - * Create a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicy Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicy: PlacementPolicy, - options?: PlacementPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PlacementPoliciesCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicy, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PlacementPoliciesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicy Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicy: PlacementPolicy, - options?: PlacementPoliciesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicy, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicyUpdate: PlacementPolicyUpdate, - options?: PlacementPoliciesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PlacementPoliciesUpdateResponse - > - > { - 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, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicyUpdate, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - PlacementPoliciesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicyUpdate: PlacementPolicyUpdate, - options?: PlacementPoliciesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - placementPolicyUpdate, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesDeleteOptionalParams, - ): Promise, void>> { - 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, - privateCloudName, - clusterName, - placementPolicyName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - nextLink: string, - options?: PlacementPoliciesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PlacementPoliciesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PlacementPolicy, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.placementPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PlacementPolicy, - }, - 201: { - bodyMapper: Mappers.PlacementPolicy, - }, - 202: { - bodyMapper: Mappers.PlacementPolicy, - }, - 204: { - bodyMapper: Mappers.PlacementPolicy, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.placementPolicy, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.placementPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PlacementPolicy, - }, - 201: { - bodyMapper: Mappers.PlacementPolicy, - }, - 202: { - bodyMapper: Mappers.PlacementPolicy, - }, - 204: { - bodyMapper: Mappers.PlacementPolicy, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.placementPolicyUpdate, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.placementPolicyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.placementPolicyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PlacementPoliciesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/privateClouds.ts b/sdk/avs/arm-avs/src/operations/privateClouds.ts deleted file mode 100644 index 83c45ed0d618..000000000000 --- a/sdk/avs/arm-avs/src/operations/privateClouds.ts +++ /dev/null @@ -1,993 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateClouds } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - PrivateCloud, - PrivateCloudsListInSubscriptionNextOptionalParams, - PrivateCloudsListInSubscriptionOptionalParams, - PrivateCloudsListInSubscriptionResponse, - PrivateCloudsListNextOptionalParams, - PrivateCloudsListOptionalParams, - PrivateCloudsListResponse, - PrivateCloudsGetOptionalParams, - PrivateCloudsGetResponse, - PrivateCloudsCreateOrUpdateOptionalParams, - PrivateCloudsCreateOrUpdateResponse, - PrivateCloudUpdate, - PrivateCloudsUpdateOptionalParams, - PrivateCloudsUpdateResponse, - PrivateCloudsDeleteOptionalParams, - PrivateCloudsListAdminCredentialsOptionalParams, - PrivateCloudsListAdminCredentialsResponse, - PrivateCloudsRotateNsxtPasswordOptionalParams, - PrivateCloudsRotateNsxtPasswordResponse, - PrivateCloudsRotateVcenterPasswordOptionalParams, - PrivateCloudsRotateVcenterPasswordResponse, - PrivateCloudsListInSubscriptionNextResponse, - PrivateCloudsListNextResponse, -} from "../models"; - -/// -/** Class containing PrivateClouds operations. */ -export class PrivateCloudsImpl implements PrivateClouds { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class PrivateClouds class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List PrivateCloud resources by subscription ID - * @param options The options parameters. - */ - public listInSubscription( - options?: PrivateCloudsListInSubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listInSubscriptionPagingAll(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.listInSubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listInSubscriptionPagingPage( - options?: PrivateCloudsListInSubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateCloudsListInSubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listInSubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listInSubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listInSubscriptionPagingAll( - options?: PrivateCloudsListInSubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listInSubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * List PrivateCloud resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - options?: PrivateCloudsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(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.listPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - options?: PrivateCloudsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateCloudsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - options?: PrivateCloudsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * List PrivateCloud resources by subscription ID - * @param options The options parameters. - */ - private _listInSubscription( - options?: PrivateCloudsListInSubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listInSubscriptionOperationSpec, - ); - } - - /** - * List PrivateCloud resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - options?: PrivateCloudsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listOperationSpec, - ); - } - - /** - * Get a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - getOperationSpec, - ); - } - - /** - * Create a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloud Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - privateCloud: PrivateCloud, - options?: PrivateCloudsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsCreateOrUpdateResponse - > - > { - 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, privateCloudName, privateCloud, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateCloudsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloud Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - privateCloud: PrivateCloud, - options?: PrivateCloudsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - privateCloud, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloudUpdate The private cloud properties to be updated. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - privateCloudName: string, - privateCloudUpdate: PrivateCloudUpdate, - options?: PrivateCloudsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsUpdateResponse - > - > { - 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, - privateCloudName, - privateCloudUpdate, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateCloudsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloudUpdate The private cloud properties to be updated. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - privateCloudUpdate: PrivateCloudUpdate, - options?: PrivateCloudsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - privateCloudName, - privateCloudUpdate, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsDeleteOptionalParams, - ): Promise, void>> { - 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, privateCloudName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List the admin credentials for the private cloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listAdminCredentials( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsListAdminCredentialsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listAdminCredentialsOperationSpec, - ); - } - - /** - * Rotate the NSX-T Manager password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginRotateNsxtPassword( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateNsxtPasswordOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsRotateNsxtPasswordResponse - > - > { - 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, privateCloudName, options }, - spec: rotateNsxtPasswordOperationSpec, - }); - const poller = await createHttpPoller< - PrivateCloudsRotateNsxtPasswordResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Rotate the NSX-T Manager password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginRotateNsxtPasswordAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateNsxtPasswordOptionalParams, - ): Promise { - const poller = await this.beginRotateNsxtPassword( - resourceGroupName, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Rotate the vCenter password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginRotateVcenterPassword( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateVcenterPasswordOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsRotateVcenterPasswordResponse - > - > { - 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, privateCloudName, options }, - spec: rotateVcenterPasswordOperationSpec, - }); - const poller = await createHttpPoller< - PrivateCloudsRotateVcenterPasswordResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Rotate the vCenter password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginRotateVcenterPasswordAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateVcenterPasswordOptionalParams, - ): Promise { - const poller = await this.beginRotateVcenterPassword( - resourceGroupName, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListInSubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListInSubscription method. - * @param options The options parameters. - */ - private _listInSubscriptionNext( - nextLink: string, - options?: PrivateCloudsListInSubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listInSubscriptionNextOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - nextLink: string, - options?: PrivateCloudsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listInSubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloudList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloudList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloud, - }, - 201: { - bodyMapper: Mappers.PrivateCloud, - }, - 202: { - bodyMapper: Mappers.PrivateCloud, - }, - 204: { - bodyMapper: Mappers.PrivateCloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.privateCloud, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloud, - }, - 201: { - bodyMapper: Mappers.PrivateCloud, - }, - 202: { - bodyMapper: Mappers.PrivateCloud, - }, - 204: { - bodyMapper: Mappers.PrivateCloud, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.privateCloudUpdate, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAdminCredentialsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AdminCredentials, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const rotateNsxtPasswordOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.PrivateCloudsRotateNsxtPasswordHeaders, - }, - 201: { - headersMapper: Mappers.PrivateCloudsRotateNsxtPasswordHeaders, - }, - 202: { - headersMapper: Mappers.PrivateCloudsRotateNsxtPasswordHeaders, - }, - 204: { - headersMapper: Mappers.PrivateCloudsRotateNsxtPasswordHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const rotateVcenterPasswordOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.PrivateCloudsRotateVcenterPasswordHeaders, - }, - 201: { - headersMapper: Mappers.PrivateCloudsRotateVcenterPasswordHeaders, - }, - 202: { - headersMapper: Mappers.PrivateCloudsRotateVcenterPasswordHeaders, - }, - 204: { - headersMapper: Mappers.PrivateCloudsRotateVcenterPasswordHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listInSubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloudList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateCloudList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts b/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts deleted file mode 100644 index a018893dc895..000000000000 --- a/sdk/avs/arm-avs/src/operations/scriptCmdlets.ts +++ /dev/null @@ -1,274 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ScriptCmdlets } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - ScriptCmdlet, - ScriptCmdletsListNextOptionalParams, - ScriptCmdletsListOptionalParams, - ScriptCmdletsListResponse, - ScriptCmdletsGetOptionalParams, - ScriptCmdletsGetResponse, - ScriptCmdletsListNextResponse, -} from "../models"; - -/// -/** Class containing ScriptCmdlets operations. */ -export class ScriptCmdletsImpl implements ScriptCmdlets { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class ScriptCmdlets class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List ScriptCmdlet resources by ScriptPackage - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptCmdletsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - scriptPackageName, - 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( - resourceGroupName, - privateCloudName, - scriptPackageName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptCmdletsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ScriptCmdletsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - privateCloudName, - scriptPackageName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - scriptPackageName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptCmdletsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - scriptPackageName, - options, - )) { - yield* page; - } - } - - /** - * List ScriptCmdlet resources by ScriptPackage - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptCmdletsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, scriptPackageName, options }, - listOperationSpec, - ); - } - - /** - * Get a ScriptCmdlet - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param scriptCmdletName Name of the script cmdlet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - scriptCmdletName: string, - options?: ScriptCmdletsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - options, - }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - nextLink: string, - options?: ScriptCmdletsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - scriptPackageName, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptCmdletsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptPackageName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptCmdlet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptPackageName, - Parameters.scriptCmdletName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptCmdletsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptPackageName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/scriptExecutions.ts b/sdk/avs/arm-avs/src/operations/scriptExecutions.ts deleted file mode 100644 index 6cf86fd26805..000000000000 --- a/sdk/avs/arm-avs/src/operations/scriptExecutions.ts +++ /dev/null @@ -1,548 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ScriptExecutions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - ScriptExecution, - ScriptExecutionsListNextOptionalParams, - ScriptExecutionsListOptionalParams, - ScriptExecutionsListResponse, - ScriptExecutionsGetOptionalParams, - ScriptExecutionsGetResponse, - ScriptExecutionsCreateOrUpdateOptionalParams, - ScriptExecutionsCreateOrUpdateResponse, - ScriptExecutionsDeleteOptionalParams, - ScriptExecutionsGetExecutionLogsOptionalParams, - ScriptExecutionsGetExecutionLogsResponse, - ScriptExecutionsListNextResponse, -} from "../models"; - -/// -/** Class containing ScriptExecutions operations. */ -export class ScriptExecutionsImpl implements ScriptExecutions { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class ScriptExecutions class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List ScriptExecution resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptExecutionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptExecutionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ScriptExecutionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptExecutionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List ScriptExecution resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptExecutionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, scriptExecutionName, options }, - getOperationSpec, - ); - } - - /** - * Create a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - scriptExecution: ScriptExecution, - options?: ScriptExecutionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ScriptExecutionsCreateOrUpdateResponse - > - > { - 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, - privateCloudName, - scriptExecutionName, - scriptExecution, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ScriptExecutionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - scriptExecution: ScriptExecution, - options?: ScriptExecutionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - privateCloudName, - scriptExecutionName, - scriptExecution, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsDeleteOptionalParams, - ): Promise, void>> { - 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, - privateCloudName, - scriptExecutionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - privateCloudName, - scriptExecutionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Return the logs for a script execution resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - getExecutionLogs( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsGetExecutionLogsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, scriptExecutionName, options }, - getExecutionLogsOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: ScriptExecutionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptExecutionsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptExecution, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptExecutionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ScriptExecution, - }, - 201: { - bodyMapper: Mappers.ScriptExecution, - }, - 202: { - bodyMapper: Mappers.ScriptExecution, - }, - 204: { - bodyMapper: Mappers.ScriptExecution, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.scriptExecution, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptExecutionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptExecutionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getExecutionLogsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ScriptExecution, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.scriptOutputStreamType, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptExecutionName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptExecutionsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/scriptPackages.ts b/sdk/avs/arm-avs/src/operations/scriptPackages.ts deleted file mode 100644 index 402c5c150841..000000000000 --- a/sdk/avs/arm-avs/src/operations/scriptPackages.ts +++ /dev/null @@ -1,240 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ScriptPackages } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - ScriptPackage, - ScriptPackagesListNextOptionalParams, - ScriptPackagesListOptionalParams, - ScriptPackagesListResponse, - ScriptPackagesGetOptionalParams, - ScriptPackagesGetResponse, - ScriptPackagesListNextResponse, -} from "../models"; - -/// -/** Class containing ScriptPackages operations. */ -export class ScriptPackagesImpl implements ScriptPackages { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class ScriptPackages class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List ScriptPackage resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptPackagesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptPackagesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ScriptPackagesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptPackagesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List ScriptPackage resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptPackagesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a ScriptPackage - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptPackagesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, scriptPackageName, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: ScriptPackagesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptPackagesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptPackage, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.scriptPackageName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScriptPackagesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/virtualMachines.ts b/sdk/avs/arm-avs/src/operations/virtualMachines.ts deleted file mode 100644 index 1621be93d3fa..000000000000 --- a/sdk/avs/arm-avs/src/operations/virtualMachines.ts +++ /dev/null @@ -1,423 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { VirtualMachines } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - VirtualMachine, - VirtualMachinesListNextOptionalParams, - VirtualMachinesListOptionalParams, - VirtualMachinesListResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachineRestrictMovement, - VirtualMachinesRestrictMovementOptionalParams, - VirtualMachinesRestrictMovementResponse, - VirtualMachinesListNextResponse, -} from "../models"; - -/// -/** Class containing VirtualMachines operations. */ -export class VirtualMachinesImpl implements VirtualMachines { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class VirtualMachines class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List VirtualMachine resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: VirtualMachinesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: VirtualMachinesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualMachinesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - privateCloudName, - clusterName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: VirtualMachinesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * List VirtualMachine resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: VirtualMachinesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, options }, - listOperationSpec, - ); - } - - /** - * Get a VirtualMachine - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - options?: VirtualMachinesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - options, - }, - getOperationSpec, - ); - } - - /** - * Enable or disable DRS-driven VM movement restriction - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. - * @param options The options parameters. - */ - async beginRestrictMovement( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - restrictMovement: VirtualMachineRestrictMovement, - options?: VirtualMachinesRestrictMovementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesRestrictMovementResponse - > - > { - 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, - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - options, - }, - spec: restrictMovementOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesRestrictMovementResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Enable or disable DRS-driven VM movement restriction - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. - * @param options The options parameters. - */ - async beginRestrictMovementAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - restrictMovement: VirtualMachineRestrictMovement, - options?: VirtualMachinesRestrictMovementOptionalParams, - ): Promise { - const poller = await this.beginRestrictMovement( - resourceGroupName, - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - nextLink: string, - options?: VirtualMachinesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.virtualMachineId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const restrictMovementOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.VirtualMachinesRestrictMovementHeaders, - }, - 201: { - headersMapper: Mappers.VirtualMachinesRestrictMovementHeaders, - }, - 202: { - headersMapper: Mappers.VirtualMachinesRestrictMovementHeaders, - }, - 204: { - headersMapper: Mappers.VirtualMachinesRestrictMovementHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.restrictMovement, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - Parameters.virtualMachineId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachinesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operations/workloadNetworks.ts b/sdk/avs/arm-avs/src/operations/workloadNetworks.ts deleted file mode 100644 index d34376b3a995..000000000000 --- a/sdk/avs/arm-avs/src/operations/workloadNetworks.ts +++ /dev/null @@ -1,4743 +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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { WorkloadNetworks } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - WorkloadNetwork, - WorkloadNetworksListNextOptionalParams, - WorkloadNetworksListOptionalParams, - WorkloadNetworksListResponse, - WorkloadNetworkDhcp, - WorkloadNetworksListDhcpNextOptionalParams, - WorkloadNetworksListDhcpOptionalParams, - WorkloadNetworksListDhcpResponse, - WorkloadNetworkDnsService, - WorkloadNetworksListDnsServicesNextOptionalParams, - WorkloadNetworksListDnsServicesOptionalParams, - WorkloadNetworksListDnsServicesResponse, - WorkloadNetworkDnsZone, - WorkloadNetworksListDnsZonesNextOptionalParams, - WorkloadNetworksListDnsZonesOptionalParams, - WorkloadNetworksListDnsZonesResponse, - WorkloadNetworkGateway, - WorkloadNetworksListGatewaysNextOptionalParams, - WorkloadNetworksListGatewaysOptionalParams, - WorkloadNetworksListGatewaysResponse, - WorkloadNetworkPortMirroring, - WorkloadNetworksListPortMirroringNextOptionalParams, - WorkloadNetworksListPortMirroringOptionalParams, - WorkloadNetworksListPortMirroringResponse, - WorkloadNetworkPublicIP, - WorkloadNetworksListPublicIPsNextOptionalParams, - WorkloadNetworksListPublicIPsOptionalParams, - WorkloadNetworksListPublicIPsResponse, - WorkloadNetworkSegment, - WorkloadNetworksListSegmentsNextOptionalParams, - WorkloadNetworksListSegmentsOptionalParams, - WorkloadNetworksListSegmentsResponse, - WorkloadNetworkVirtualMachine, - WorkloadNetworksListVirtualMachinesNextOptionalParams, - WorkloadNetworksListVirtualMachinesOptionalParams, - WorkloadNetworksListVirtualMachinesResponse, - WorkloadNetworkVMGroup, - WorkloadNetworksListVMGroupsNextOptionalParams, - WorkloadNetworksListVMGroupsOptionalParams, - WorkloadNetworksListVMGroupsResponse, - WorkloadNetworksGetOptionalParams, - WorkloadNetworksGetResponse, - WorkloadNetworksGetDhcpOptionalParams, - WorkloadNetworksGetDhcpResponse, - WorkloadNetworksCreateDhcpOptionalParams, - WorkloadNetworksCreateDhcpResponse, - WorkloadNetworksUpdateDhcpOptionalParams, - WorkloadNetworksUpdateDhcpResponse, - WorkloadNetworksDeleteDhcpOptionalParams, - WorkloadNetworksGetDnsServiceOptionalParams, - WorkloadNetworksGetDnsServiceResponse, - WorkloadNetworksCreateDnsServiceOptionalParams, - WorkloadNetworksCreateDnsServiceResponse, - WorkloadNetworksUpdateDnsServiceOptionalParams, - WorkloadNetworksUpdateDnsServiceResponse, - WorkloadNetworksDeleteDnsServiceOptionalParams, - WorkloadNetworksGetDnsZoneOptionalParams, - WorkloadNetworksGetDnsZoneResponse, - WorkloadNetworksCreateDnsZoneOptionalParams, - WorkloadNetworksCreateDnsZoneResponse, - WorkloadNetworksUpdateDnsZoneOptionalParams, - WorkloadNetworksUpdateDnsZoneResponse, - WorkloadNetworksDeleteDnsZoneOptionalParams, - WorkloadNetworksGetGatewayOptionalParams, - WorkloadNetworksGetGatewayResponse, - WorkloadNetworksGetPortMirroringOptionalParams, - WorkloadNetworksGetPortMirroringResponse, - WorkloadNetworksCreatePortMirroringOptionalParams, - WorkloadNetworksCreatePortMirroringResponse, - WorkloadNetworksUpdatePortMirroringOptionalParams, - WorkloadNetworksUpdatePortMirroringResponse, - WorkloadNetworksDeletePortMirroringOptionalParams, - WorkloadNetworksGetPublicIPOptionalParams, - WorkloadNetworksGetPublicIPResponse, - WorkloadNetworksCreatePublicIPOptionalParams, - WorkloadNetworksCreatePublicIPResponse, - WorkloadNetworksDeletePublicIPOptionalParams, - WorkloadNetworksGetSegmentOptionalParams, - WorkloadNetworksGetSegmentResponse, - WorkloadNetworksCreateSegmentsOptionalParams, - WorkloadNetworksCreateSegmentsResponse, - WorkloadNetworksUpdateSegmentsOptionalParams, - WorkloadNetworksUpdateSegmentsResponse, - WorkloadNetworksDeleteSegmentOptionalParams, - WorkloadNetworksGetVirtualMachineOptionalParams, - WorkloadNetworksGetVirtualMachineResponse, - WorkloadNetworksGetVMGroupOptionalParams, - WorkloadNetworksGetVMGroupResponse, - WorkloadNetworksCreateVMGroupOptionalParams, - WorkloadNetworksCreateVMGroupResponse, - WorkloadNetworksUpdateVMGroupOptionalParams, - WorkloadNetworksUpdateVMGroupResponse, - WorkloadNetworksDeleteVMGroupOptionalParams, - WorkloadNetworksListNextResponse, - WorkloadNetworksListDhcpNextResponse, - WorkloadNetworksListDnsServicesNextResponse, - WorkloadNetworksListDnsZonesNextResponse, - WorkloadNetworksListGatewaysNextResponse, - WorkloadNetworksListPortMirroringNextResponse, - WorkloadNetworksListPublicIPsNextResponse, - WorkloadNetworksListSegmentsNextResponse, - WorkloadNetworksListVirtualMachinesNextResponse, - WorkloadNetworksListVMGroupsNextResponse, -} from "../models"; - -/// -/** Class containing WorkloadNetworks operations. */ -export class WorkloadNetworksImpl implements WorkloadNetworks { - private readonly client: AzureVMwareSolutionAPI; - - /** - * Initialize a new instance of the class WorkloadNetworks class. - * @param client Reference to the service client - */ - constructor(client: AzureVMwareSolutionAPI) { - this.client = client; - } - - /** - * List WorkloadNetwork resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - privateCloudName, - 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( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, privateCloudName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listDhcp( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDhcpOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listDhcpPagingAll( - resourceGroupName, - privateCloudName, - 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.listDhcpPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listDhcpPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDhcpOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListDhcpResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listDhcp( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listDhcpNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listDhcpPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDhcpOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listDhcpPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listDnsServices( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsServicesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listDnsServicesPagingAll( - resourceGroupName, - privateCloudName, - 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.listDnsServicesPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listDnsServicesPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsServicesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListDnsServicesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listDnsServices( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listDnsServicesNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listDnsServicesPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsServicesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listDnsServicesPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listDnsZones( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsZonesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listDnsZonesPagingAll( - resourceGroupName, - privateCloudName, - 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.listDnsZonesPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listDnsZonesPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsZonesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListDnsZonesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listDnsZones( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listDnsZonesNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listDnsZonesPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsZonesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listDnsZonesPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listGateways( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListGatewaysOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listGatewaysPagingAll( - resourceGroupName, - privateCloudName, - 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.listGatewaysPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listGatewaysPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListGatewaysOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListGatewaysResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listGateways( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listGatewaysNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listGatewaysPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListGatewaysOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listGatewaysPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listPortMirroring( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPortMirroringOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPortMirroringPagingAll( - resourceGroupName, - privateCloudName, - 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.listPortMirroringPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPortMirroringPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPortMirroringOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListPortMirroringResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listPortMirroring( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listPortMirroringNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPortMirroringPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPortMirroringOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPortMirroringPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listPublicIPs( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPublicIPsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPublicIPsPagingAll( - resourceGroupName, - privateCloudName, - 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.listPublicIPsPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listPublicIPsPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPublicIPsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListPublicIPsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listPublicIPs( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listPublicIPsNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPublicIPsPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPublicIPsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPublicIPsPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listSegments( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListSegmentsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listSegmentsPagingAll( - resourceGroupName, - privateCloudName, - 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.listSegmentsPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listSegmentsPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListSegmentsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListSegmentsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listSegments( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listSegmentsNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listSegmentsPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListSegmentsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listSegmentsPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listVirtualMachines( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVirtualMachinesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVirtualMachinesPagingAll( - resourceGroupName, - privateCloudName, - 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.listVirtualMachinesPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listVirtualMachinesPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVirtualMachinesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListVirtualMachinesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVirtualMachines( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVirtualMachinesNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVirtualMachinesPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVirtualMachinesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVirtualMachinesPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - public listVMGroups( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVMGroupsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listVMGroupsPagingAll( - resourceGroupName, - privateCloudName, - 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.listVMGroupsPagingPage( - resourceGroupName, - privateCloudName, - options, - settings, - ); - }, - }; - } - - private async *listVMGroupsPagingPage( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVMGroupsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkloadNetworksListVMGroupsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listVMGroups( - resourceGroupName, - privateCloudName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listVMGroupsNext( - resourceGroupName, - privateCloudName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listVMGroupsPagingAll( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVMGroupsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listVMGroupsPagingPage( - resourceGroupName, - privateCloudName, - options, - )) { - yield* page; - } - } - - /** - * List WorkloadNetwork resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listOperationSpec, - ); - } - - /** - * Get a WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - getOperationSpec, - ); - } - - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listDhcp( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDhcpOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listDhcpOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - getDhcp( - resourceGroupName: string, - dhcpId: string, - privateCloudName: string, - options?: WorkloadNetworksGetDhcpOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dhcpId, privateCloudName, options }, - getDhcpOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksCreateDhcpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDhcpResponse - > - > { - 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, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - options, - }, - spec: createDhcpOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreateDhcpResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksCreateDhcpOptionalParams, - ): Promise { - const poller = await this.beginCreateDhcp( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksUpdateDhcpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDhcpResponse - > - > { - 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, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - options, - }, - spec: updateDhcpOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdateDhcpResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksUpdateDhcpOptionalParams, - ): Promise { - const poller = await this.beginUpdateDhcp( - resourceGroupName, - privateCloudName, - dhcpId, - workloadNetworkDhcp, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param options The options parameters. - */ - async beginDeleteDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - options?: WorkloadNetworksDeleteDhcpOptionalParams, - ): Promise, void>> { - 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, privateCloudName, dhcpId, options }, - spec: deleteDhcpOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param options The options parameters. - */ - async beginDeleteDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - options?: WorkloadNetworksDeleteDhcpOptionalParams, - ): Promise { - const poller = await this.beginDeleteDhcp( - resourceGroupName, - privateCloudName, - dhcpId, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listDnsServices( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsServicesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listDnsServicesOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param options The options parameters. - */ - getDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - options?: WorkloadNetworksGetDnsServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, dnsServiceId, options }, - getDnsServiceOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksCreateDnsServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDnsServiceResponse - > - > { - 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, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - options, - }, - spec: createDnsServiceOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreateDnsServiceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDnsServiceAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksCreateDnsServiceOptionalParams, - ): Promise { - const poller = await this.beginCreateDnsService( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksUpdateDnsServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDnsServiceResponse - > - > { - 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, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - options, - }, - spec: updateDnsServiceOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdateDnsServiceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDnsServiceAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksUpdateDnsServiceOptionalParams, - ): Promise { - const poller = await this.beginUpdateDnsService( - resourceGroupName, - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteDnsService( - resourceGroupName: string, - dnsServiceId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsServiceOptionalParams, - ): Promise, void>> { - 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, dnsServiceId, privateCloudName, options }, - spec: deleteDnsServiceOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteDnsServiceAndWait( - resourceGroupName: string, - dnsServiceId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsServiceOptionalParams, - ): Promise { - const poller = await this.beginDeleteDnsService( - resourceGroupName, - dnsServiceId, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listDnsZones( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsZonesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listDnsZonesOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param options The options parameters. - */ - getDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - options?: WorkloadNetworksGetDnsZoneOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, dnsZoneId, options }, - getDnsZoneOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksCreateDnsZoneOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDnsZoneResponse - > - > { - 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, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - options, - }, - spec: createDnsZoneOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreateDnsZoneResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param options The options parameters. - */ - async beginCreateDnsZoneAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksCreateDnsZoneOptionalParams, - ): Promise { - const poller = await this.beginCreateDnsZone( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksUpdateDnsZoneOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDnsZoneResponse - > - > { - 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, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - options, - }, - spec: updateDnsZoneOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdateDnsZoneResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateDnsZoneAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksUpdateDnsZoneOptionalParams, - ): Promise { - const poller = await this.beginUpdateDnsZone( - resourceGroupName, - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteDnsZone( - resourceGroupName: string, - dnsZoneId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsZoneOptionalParams, - ): Promise, void>> { - 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, dnsZoneId, privateCloudName, options }, - spec: deleteDnsZoneOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteDnsZoneAndWait( - resourceGroupName: string, - dnsZoneId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsZoneOptionalParams, - ): Promise { - const poller = await this.beginDeleteDnsZone( - resourceGroupName, - dnsZoneId, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listGateways( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListGatewaysOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listGatewaysOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkGateway - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param gatewayId The ID of the NSX Gateway - * @param options The options parameters. - */ - getGateway( - resourceGroupName: string, - privateCloudName: string, - gatewayId: string, - options?: WorkloadNetworksGetGatewayOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, gatewayId, options }, - getGatewayOperationSpec, - ); - } - - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listPortMirroring( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPortMirroringOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listPortMirroringOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param options The options parameters. - */ - getPortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - options?: WorkloadNetworksGetPortMirroringOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, portMirroringId, options }, - getPortMirroringOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param options The options parameters. - */ - async beginCreatePortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksCreatePortMirroringOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreatePortMirroringResponse - > - > { - 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, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - options, - }, - spec: createPortMirroringOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreatePortMirroringResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param options The options parameters. - */ - async beginCreatePortMirroringAndWait( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksCreatePortMirroringOptionalParams, - ): Promise { - const poller = await this.beginCreatePortMirroring( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdatePortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksUpdatePortMirroringOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdatePortMirroringResponse - > - > { - 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, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - options, - }, - spec: updatePortMirroringOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdatePortMirroringResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdatePortMirroringAndWait( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksUpdatePortMirroringOptionalParams, - ): Promise { - const poller = await this.beginUpdatePortMirroring( - resourceGroupName, - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeletePortMirroring( - resourceGroupName: string, - portMirroringId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePortMirroringOptionalParams, - ): Promise, void>> { - 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, portMirroringId, privateCloudName, options }, - spec: deletePortMirroringOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeletePortMirroringAndWait( - resourceGroupName: string, - portMirroringId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePortMirroringOptionalParams, - ): Promise { - const poller = await this.beginDeletePortMirroring( - resourceGroupName, - portMirroringId, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listPublicIPs( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPublicIPsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listPublicIPsOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param options The options parameters. - */ - getPublicIP( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - options?: WorkloadNetworksGetPublicIPOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, publicIPId, options }, - getPublicIPOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param options The options parameters. - */ - async beginCreatePublicIP( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - workloadNetworkPublicIP: WorkloadNetworkPublicIP, - options?: WorkloadNetworksCreatePublicIPOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreatePublicIPResponse - > - > { - 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, - privateCloudName, - publicIPId, - workloadNetworkPublicIP, - options, - }, - spec: createPublicIPOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreatePublicIPResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param options The options parameters. - */ - async beginCreatePublicIPAndWait( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - workloadNetworkPublicIP: WorkloadNetworkPublicIP, - options?: WorkloadNetworksCreatePublicIPOptionalParams, - ): Promise { - const poller = await this.beginCreatePublicIP( - resourceGroupName, - privateCloudName, - publicIPId, - workloadNetworkPublicIP, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeletePublicIP( - resourceGroupName: string, - publicIPId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePublicIPOptionalParams, - ): Promise, void>> { - 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, publicIPId, privateCloudName, options }, - spec: deletePublicIPOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeletePublicIPAndWait( - resourceGroupName: string, - publicIPId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePublicIPOptionalParams, - ): Promise { - const poller = await this.beginDeletePublicIP( - resourceGroupName, - publicIPId, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listSegments( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListSegmentsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listSegmentsOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - getSegment( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksGetSegmentOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, segmentId, options }, - getSegmentOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment Resource create parameters. - * @param options The options parameters. - */ - async beginCreateSegments( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksCreateSegmentsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateSegmentsResponse - > - > { - 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, - privateCloudName, - segmentId, - workloadNetworkSegment, - options, - }, - spec: createSegmentsOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreateSegmentsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment Resource create parameters. - * @param options The options parameters. - */ - async beginCreateSegmentsAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksCreateSegmentsOptionalParams, - ): Promise { - const poller = await this.beginCreateSegments( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateSegments( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksUpdateSegmentsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateSegmentsResponse - > - > { - 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, - privateCloudName, - segmentId, - workloadNetworkSegment, - options, - }, - spec: updateSegmentsOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdateSegmentsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateSegmentsAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksUpdateSegmentsOptionalParams, - ): Promise { - const poller = await this.beginUpdateSegments( - resourceGroupName, - privateCloudName, - segmentId, - workloadNetworkSegment, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - async beginDeleteSegment( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksDeleteSegmentOptionalParams, - ): Promise, void>> { - 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, privateCloudName, segmentId, options }, - spec: deleteSegmentOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - async beginDeleteSegmentAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksDeleteSegmentOptionalParams, - ): Promise { - const poller = await this.beginDeleteSegment( - resourceGroupName, - privateCloudName, - segmentId, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listVirtualMachines( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVirtualMachinesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listVirtualMachinesOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkVirtualMachine - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param virtualMachineId ID of the virtual machine. - * @param options The options parameters. - */ - getVirtualMachine( - resourceGroupName: string, - privateCloudName: string, - virtualMachineId: string, - options?: WorkloadNetworksGetVirtualMachineOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, virtualMachineId, options }, - getVirtualMachineOperationSpec, - ); - } - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - private _listVMGroups( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVMGroupsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, options }, - listVMGroupsOperationSpec, - ); - } - - /** - * Get a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param options The options parameters. - */ - getVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - options?: WorkloadNetworksGetVMGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, vmGroupId, options }, - getVMGroupOperationSpec, - ); - } - - /** - * Create a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup Resource create parameters. - * @param options The options parameters. - */ - async beginCreateVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksCreateVMGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateVMGroupResponse - > - > { - 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, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - options, - }, - spec: createVMGroupOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksCreateVMGroupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup Resource create parameters. - * @param options The options parameters. - */ - async beginCreateVMGroupAndWait( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksCreateVMGroupOptionalParams, - ): Promise { - const poller = await this.beginCreateVMGroup( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksUpdateVMGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateVMGroupResponse - > - > { - 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, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - options, - }, - spec: updateVMGroupOperationSpec, - }); - const poller = await createHttpPoller< - WorkloadNetworksUpdateVMGroupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param options The options parameters. - */ - async beginUpdateVMGroupAndWait( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksUpdateVMGroupOptionalParams, - ): Promise { - const poller = await this.beginUpdateVMGroup( - resourceGroupName, - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteVMGroup( - resourceGroupName: string, - vmGroupId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteVMGroupOptionalParams, - ): Promise, void>> { - 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, vmGroupId, privateCloudName, options }, - spec: deleteVMGroupOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - async beginDeleteVMGroupAndWait( - resourceGroupName: string, - vmGroupId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteVMGroupOptionalParams, - ): Promise { - const poller = await this.beginDeleteVMGroup( - resourceGroupName, - vmGroupId, - privateCloudName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listNextOperationSpec, - ); - } - - /** - * ListDhcpNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListDhcp method. - * @param options The options parameters. - */ - private _listDhcpNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListDhcpNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listDhcpNextOperationSpec, - ); - } - - /** - * ListDnsServicesNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListDnsServices method. - * @param options The options parameters. - */ - private _listDnsServicesNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListDnsServicesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listDnsServicesNextOperationSpec, - ); - } - - /** - * ListDnsZonesNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListDnsZones method. - * @param options The options parameters. - */ - private _listDnsZonesNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListDnsZonesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listDnsZonesNextOperationSpec, - ); - } - - /** - * ListGatewaysNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListGateways method. - * @param options The options parameters. - */ - private _listGatewaysNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListGatewaysNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listGatewaysNextOperationSpec, - ); - } - - /** - * ListPortMirroringNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListPortMirroring method. - * @param options The options parameters. - */ - private _listPortMirroringNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListPortMirroringNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listPortMirroringNextOperationSpec, - ); - } - - /** - * ListPublicIPsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListPublicIPs method. - * @param options The options parameters. - */ - private _listPublicIPsNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListPublicIPsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listPublicIPsNextOperationSpec, - ); - } - - /** - * ListSegmentsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListSegments method. - * @param options The options parameters. - */ - private _listSegmentsNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListSegmentsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listSegmentsNextOperationSpec, - ); - } - - /** - * ListVirtualMachinesNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListVirtualMachines method. - * @param options The options parameters. - */ - private _listVirtualMachinesNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListVirtualMachinesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listVirtualMachinesNextOperationSpec, - ); - } - - /** - * ListVMGroupsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param nextLink The nextLink from the previous successful call to the ListVMGroups method. - * @param options The options parameters. - */ - private _listVMGroupsNext( - resourceGroupName: string, - privateCloudName: string, - nextLink: string, - options?: WorkloadNetworksListVMGroupsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, privateCloudName, nextLink, options }, - listVMGroupsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDhcpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDhcpList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getDhcpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dhcpId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createDhcpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDhcp, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dhcpId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateDhcpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDhcp, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDhcp, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dhcpId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteDhcpOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dhcpId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDnsServicesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsServicesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getDnsServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsServiceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createDnsServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDnsService, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsServiceId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateDnsServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDnsService, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDnsService, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsServiceId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteDnsServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsServiceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDnsZonesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsZonesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getDnsZoneOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsZoneId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createDnsZoneOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDnsZone, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsZoneId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateDnsZoneOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkDnsZone, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkDnsZone, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsZoneId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteDnsZoneOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.dnsZoneId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listGatewaysOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkGatewayList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getGatewayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkGateway, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPortMirroringOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPortMirroringList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getPortMirroringOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.portMirroringId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createPortMirroringOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkPortMirroring, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.portMirroringId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updatePortMirroringOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkPortMirroring, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkPortMirroring, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.portMirroringId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deletePortMirroringOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.portMirroringId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPublicIPsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPublicIPsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getPublicIPOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPublicIP, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.publicIPId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createPublicIPOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPublicIP, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkPublicIP, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkPublicIP, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkPublicIP, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkPublicIP, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.publicIPId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deletePublicIPOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.publicIPId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listSegmentsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkSegmentsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getSegmentOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.segmentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createSegmentsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkSegment, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.segmentId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateSegmentsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkSegment, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkSegment, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.segmentId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteSegmentOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.segmentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachinesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVirtualMachinesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getVirtualMachineOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVirtualMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.virtualMachineId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVMGroupsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVMGroupsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getVMGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.vmGroupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createVMGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkVMGroup, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.vmGroupId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateVMGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 201: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 202: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - 204: { - bodyMapper: Mappers.WorkloadNetworkVMGroup, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.workloadNetworkVMGroup, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.vmGroupId, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteVMGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - Parameters.vmGroupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDhcpNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDhcpList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDnsServicesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsServicesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDnsZonesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkDnsZonesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listGatewaysNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkGatewayList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPortMirroringNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPortMirroringList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPublicIPsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkPublicIPsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listSegmentsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkSegmentsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVirtualMachinesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVirtualMachinesList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listVMGroupsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadNetworkVMGroupsList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.privateCloudName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/addons.ts b/sdk/avs/arm-avs/src/operationsInterfaces/addons.ts deleted file mode 100644 index 12acc4869355..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/addons.ts +++ /dev/null @@ -1,109 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Addon, - AddonsListOptionalParams, - AddonsGetOptionalParams, - AddonsGetResponse, - AddonsCreateOrUpdateOptionalParams, - AddonsCreateOrUpdateResponse, - AddonsDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a Addons. */ -export interface Addons { - /** - * List Addon resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: AddonsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsGetOptionalParams, - ): Promise; - /** - * Create a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param addon Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - addon: Addon, - options?: AddonsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AddonsCreateOrUpdateResponse - > - >; - /** - * Create a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param addon Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - addon: Addon, - options?: AddonsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Addon - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param addonName Name of the addon. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - addonName: string, - options?: AddonsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/authorizations.ts b/sdk/avs/arm-avs/src/operationsInterfaces/authorizations.ts deleted file mode 100644 index ae58c044e1ca..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/authorizations.ts +++ /dev/null @@ -1,109 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ExpressRouteAuthorization, - AuthorizationsListOptionalParams, - AuthorizationsGetOptionalParams, - AuthorizationsGetResponse, - AuthorizationsCreateOrUpdateOptionalParams, - AuthorizationsCreateOrUpdateResponse, - AuthorizationsDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a Authorizations. */ -export interface Authorizations { - /** - * List ExpressRouteAuthorization resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: AuthorizationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsGetOptionalParams, - ): Promise; - /** - * Create a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param authorization Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - authorization: ExpressRouteAuthorization, - options?: AuthorizationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AuthorizationsCreateOrUpdateResponse - > - >; - /** - * Create a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param authorization Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - authorization: ExpressRouteAuthorization, - options?: AuthorizationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a ExpressRouteAuthorization - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param authorizationName Name of the ExpressRoute Circuit Authorization - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - authorizationName: string, - options?: AuthorizationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/cloudLinks.ts b/sdk/avs/arm-avs/src/operationsInterfaces/cloudLinks.ts deleted file mode 100644 index 2809b00e055a..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/cloudLinks.ts +++ /dev/null @@ -1,109 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - CloudLink, - CloudLinksListOptionalParams, - CloudLinksGetOptionalParams, - CloudLinksGetResponse, - CloudLinksCreateOrUpdateOptionalParams, - CloudLinksCreateOrUpdateResponse, - CloudLinksDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a CloudLinks. */ -export interface CloudLinks { - /** - * List CloudLink resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: CloudLinksListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksGetOptionalParams, - ): Promise; - /** - * Create a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param cloudLink Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - cloudLink: CloudLink, - options?: CloudLinksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudLinksCreateOrUpdateResponse - > - >; - /** - * Create a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param cloudLink Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - cloudLink: CloudLink, - options?: CloudLinksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a CloudLink - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param cloudLinkName Name of the cloud link. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - cloudLinkName: string, - options?: CloudLinksDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/clusters.ts b/sdk/avs/arm-avs/src/operationsInterfaces/clusters.ts deleted file mode 100644 index 821ba9cdd454..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,162 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Cluster, - ClustersListOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClusterUpdate, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersListZonesOptionalParams, - ClustersListZonesResponse, -} from "../models"; - -/// -/** Interface representing a Clusters. */ -export interface Clusters { - /** - * List Cluster resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: ClustersListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersGetOptionalParams, - ): Promise; - /** - * Create a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param cluster Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersCreateOrUpdateResponse - > - >; - /** - * Create a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param cluster Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - cluster: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param clusterUpdate The cluster properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - clusterUpdate: ClusterUpdate, - options?: ClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpdateResponse - > - >; - /** - * Update a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param clusterUpdate The cluster properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - clusterUpdate: ClusterUpdate, - options?: ClustersUpdateOptionalParams, - ): Promise; - /** - * Delete a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise; - /** - * List hosts by zone in a cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - listZones( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: ClustersListZonesOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/datastores.ts b/sdk/avs/arm-avs/src/operationsInterfaces/datastores.ts deleted file mode 100644 index 613c7c7595da..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/datastores.ts +++ /dev/null @@ -1,121 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Datastore, - DatastoresListOptionalParams, - DatastoresGetOptionalParams, - DatastoresGetResponse, - DatastoresCreateOrUpdateOptionalParams, - DatastoresCreateOrUpdateResponse, - DatastoresDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a Datastores. */ -export interface Datastores { - /** - * List Datastore resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: DatastoresListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresGetOptionalParams, - ): Promise; - /** - * Create a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param datastore Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - datastore: Datastore, - options?: DatastoresCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - DatastoresCreateOrUpdateResponse - > - >; - /** - * Create a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param datastore Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - datastore: Datastore, - options?: DatastoresCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Datastore - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param datastoreName Name of the datastore - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - datastoreName: string, - options?: DatastoresDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/globalReachConnections.ts b/sdk/avs/arm-avs/src/operationsInterfaces/globalReachConnections.ts deleted file mode 100644 index 29675e67f1b4..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/globalReachConnections.ts +++ /dev/null @@ -1,109 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - GlobalReachConnection, - GlobalReachConnectionsListOptionalParams, - GlobalReachConnectionsGetOptionalParams, - GlobalReachConnectionsGetResponse, - GlobalReachConnectionsCreateOrUpdateOptionalParams, - GlobalReachConnectionsCreateOrUpdateResponse, - GlobalReachConnectionsDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a GlobalReachConnections. */ -export interface GlobalReachConnections { - /** - * List GlobalReachConnection resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: GlobalReachConnectionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsGetOptionalParams, - ): Promise; - /** - * Create a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param globalReachConnection Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - globalReachConnection: GlobalReachConnection, - options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GlobalReachConnectionsCreateOrUpdateResponse - > - >; - /** - * Create a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param globalReachConnection Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - globalReachConnection: GlobalReachConnection, - options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a GlobalReachConnection - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param globalReachConnectionName Name of the global reach connection - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - globalReachConnectionName: string, - options?: GlobalReachConnectionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/hcxEnterpriseSites.ts b/sdk/avs/arm-avs/src/operationsInterfaces/hcxEnterpriseSites.ts deleted file mode 100644 index ceb0fb4f2fb3..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/hcxEnterpriseSites.ts +++ /dev/null @@ -1,75 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - HcxEnterpriseSite, - HcxEnterpriseSitesListOptionalParams, - HcxEnterpriseSitesGetOptionalParams, - HcxEnterpriseSitesGetResponse, - HcxEnterpriseSitesCreateOrUpdateOptionalParams, - HcxEnterpriseSitesCreateOrUpdateResponse, - HcxEnterpriseSitesDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a HcxEnterpriseSites. */ -export interface HcxEnterpriseSites { - /** - * List HcxEnterpriseSite resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: HcxEnterpriseSitesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - options?: HcxEnterpriseSitesGetOptionalParams, - ): Promise; - /** - * Create a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param hcxEnterpriseSite Resource create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - hcxEnterpriseSite: HcxEnterpriseSite, - options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a HcxEnterpriseSite - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - privateCloudName: string, - hcxEnterpriseSiteName: string, - options?: HcxEnterpriseSitesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/index.ts b/sdk/avs/arm-avs/src/operationsInterfaces/index.ts deleted file mode 100644 index a633b98e49a3..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,25 +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"; -export * from "./locations"; -export * from "./privateClouds"; -export * from "./addons"; -export * from "./authorizations"; -export * from "./cloudLinks"; -export * from "./clusters"; -export * from "./datastores"; -export * from "./placementPolicies"; -export * from "./virtualMachines"; -export * from "./globalReachConnections"; -export * from "./hcxEnterpriseSites"; -export * from "./iscsiPaths"; -export * from "./scriptExecutions"; -export * from "./scriptPackages"; -export * from "./scriptCmdlets"; -export * from "./workloadNetworks"; diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/iscsiPaths.ts b/sdk/avs/arm-avs/src/operationsInterfaces/iscsiPaths.ts deleted file mode 100644 index 783d79ae58bd..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/iscsiPaths.ts +++ /dev/null @@ -1,99 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - IscsiPath, - IscsiPathsListByPrivateCloudOptionalParams, - IscsiPathsGetOptionalParams, - IscsiPathsGetResponse, - IscsiPathsCreateOrUpdateOptionalParams, - IscsiPathsCreateOrUpdateResponse, - IscsiPathsDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a IscsiPaths. */ -export interface IscsiPaths { - /** - * List IscsiPath resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listByPrivateCloud( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsListByPrivateCloudOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsGetOptionalParams, - ): Promise; - /** - * Create a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - resource: IscsiPath, - options?: IscsiPathsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - IscsiPathsCreateOrUpdateResponse - > - >; - /** - * Create a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param resource Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - resource: IscsiPath, - options?: IscsiPathsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a IscsiPath - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: IscsiPathsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/locations.ts b/sdk/avs/arm-avs/src/operationsInterfaces/locations.ts deleted file mode 100644 index 93bef8650ca3..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/locations.ts +++ /dev/null @@ -1,36 +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 { - LocationsCheckQuotaAvailabilityOptionalParams, - LocationsCheckQuotaAvailabilityResponse, - LocationsCheckTrialAvailabilityOptionalParams, - LocationsCheckTrialAvailabilityResponse, -} from "../models"; - -/** Interface representing a Locations. */ -export interface Locations { - /** - * Return quota for subscription by region - * @param location The name of the Azure region. - * @param options The options parameters. - */ - checkQuotaAvailability( - location: string, - options?: LocationsCheckQuotaAvailabilityOptionalParams, - ): Promise; - /** - * Return trial status for subscription by region - * @param location The name of the Azure region. - * @param options The options parameters. - */ - checkTrialAvailability( - location: string, - options?: LocationsCheckTrialAvailabilityOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/operations.ts b/sdk/avs/arm-avs/src/operationsInterfaces/operations.ts deleted file mode 100644 index 251f5f582e64..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * List the operations for the provider - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/placementPolicies.ts b/sdk/avs/arm-avs/src/operationsInterfaces/placementPolicies.ts deleted file mode 100644 index d0e37f6302f9..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/placementPolicies.ts +++ /dev/null @@ -1,163 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PlacementPolicy, - PlacementPoliciesListOptionalParams, - PlacementPoliciesGetOptionalParams, - PlacementPoliciesGetResponse, - PlacementPoliciesCreateOrUpdateOptionalParams, - PlacementPoliciesCreateOrUpdateResponse, - PlacementPolicyUpdate, - PlacementPoliciesUpdateOptionalParams, - PlacementPoliciesUpdateResponse, - PlacementPoliciesDeleteOptionalParams, -} from "../models"; - -/// -/** Interface representing a PlacementPolicies. */ -export interface PlacementPolicies { - /** - * List PlacementPolicy resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: PlacementPoliciesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesGetOptionalParams, - ): Promise; - /** - * Create a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicy Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicy: PlacementPolicy, - options?: PlacementPoliciesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PlacementPoliciesCreateOrUpdateResponse - > - >; - /** - * Create a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicy Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicy: PlacementPolicy, - options?: PlacementPoliciesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicyUpdate: PlacementPolicyUpdate, - options?: PlacementPoliciesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PlacementPoliciesUpdateResponse - > - >; - /** - * Update a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - placementPolicyUpdate: PlacementPolicyUpdate, - options?: PlacementPoliciesUpdateOptionalParams, - ): Promise; - /** - * Delete a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a PlacementPolicy - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param placementPolicyName Name of the placement policy. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - placementPolicyName: string, - options?: PlacementPoliciesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/privateClouds.ts b/sdk/avs/arm-avs/src/operationsInterfaces/privateClouds.ts deleted file mode 100644 index 1da1898d9396..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/privateClouds.ts +++ /dev/null @@ -1,210 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PrivateCloud, - PrivateCloudsListInSubscriptionOptionalParams, - PrivateCloudsListOptionalParams, - PrivateCloudsGetOptionalParams, - PrivateCloudsGetResponse, - PrivateCloudsCreateOrUpdateOptionalParams, - PrivateCloudsCreateOrUpdateResponse, - PrivateCloudUpdate, - PrivateCloudsUpdateOptionalParams, - PrivateCloudsUpdateResponse, - PrivateCloudsDeleteOptionalParams, - PrivateCloudsListAdminCredentialsOptionalParams, - PrivateCloudsListAdminCredentialsResponse, - PrivateCloudsRotateNsxtPasswordOptionalParams, - PrivateCloudsRotateNsxtPasswordResponse, - PrivateCloudsRotateVcenterPasswordOptionalParams, - PrivateCloudsRotateVcenterPasswordResponse, -} from "../models"; - -/// -/** Interface representing a PrivateClouds. */ -export interface PrivateClouds { - /** - * List PrivateCloud resources by subscription ID - * @param options The options parameters. - */ - listInSubscription( - options?: PrivateCloudsListInSubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List PrivateCloud resources by resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - options?: PrivateCloudsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsGetOptionalParams, - ): Promise; - /** - * Create a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloud Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - privateCloud: PrivateCloud, - options?: PrivateCloudsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsCreateOrUpdateResponse - > - >; - /** - * Create a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloud Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - privateCloud: PrivateCloud, - options?: PrivateCloudsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloudUpdate The private cloud properties to be updated. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - privateCloudName: string, - privateCloudUpdate: PrivateCloudUpdate, - options?: PrivateCloudsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsUpdateResponse - > - >; - /** - * Update a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param privateCloudUpdate The private cloud properties to be updated. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - privateCloudUpdate: PrivateCloudUpdate, - options?: PrivateCloudsUpdateOptionalParams, - ): Promise; - /** - * Delete a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsDeleteOptionalParams, - ): Promise; - /** - * List the admin credentials for the private cloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listAdminCredentials( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsListAdminCredentialsOptionalParams, - ): Promise; - /** - * Rotate the NSX-T Manager password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginRotateNsxtPassword( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateNsxtPasswordOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsRotateNsxtPasswordResponse - > - >; - /** - * Rotate the NSX-T Manager password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginRotateNsxtPasswordAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateNsxtPasswordOptionalParams, - ): Promise; - /** - * Rotate the vCenter password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginRotateVcenterPassword( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateVcenterPasswordOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateCloudsRotateVcenterPasswordResponse - > - >; - /** - * Rotate the vCenter password - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginRotateVcenterPasswordAndWait( - resourceGroupName: string, - privateCloudName: string, - options?: PrivateCloudsRotateVcenterPasswordOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/scriptCmdlets.ts b/sdk/avs/arm-avs/src/operationsInterfaces/scriptCmdlets.ts deleted file mode 100644 index 0b80303cfb86..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/scriptCmdlets.ts +++ /dev/null @@ -1,48 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ScriptCmdlet, - ScriptCmdletsListOptionalParams, - ScriptCmdletsGetOptionalParams, - ScriptCmdletsGetResponse, -} from "../models"; - -/// -/** Interface representing a ScriptCmdlets. */ -export interface ScriptCmdlets { - /** - * List ScriptCmdlet resources by ScriptPackage - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptCmdletsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a ScriptCmdlet - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param scriptCmdletName Name of the script cmdlet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - scriptCmdletName: string, - options?: ScriptCmdletsGetOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/scriptExecutions.ts b/sdk/avs/arm-avs/src/operationsInterfaces/scriptExecutions.ts deleted file mode 100644 index 8db7c1c0c46f..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/scriptExecutions.ts +++ /dev/null @@ -1,124 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ScriptExecution, - ScriptExecutionsListOptionalParams, - ScriptExecutionsGetOptionalParams, - ScriptExecutionsGetResponse, - ScriptExecutionsCreateOrUpdateOptionalParams, - ScriptExecutionsCreateOrUpdateResponse, - ScriptExecutionsDeleteOptionalParams, - ScriptExecutionsGetExecutionLogsOptionalParams, - ScriptExecutionsGetExecutionLogsResponse, -} from "../models"; - -/// -/** Interface representing a ScriptExecutions. */ -export interface ScriptExecutions { - /** - * List ScriptExecution resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptExecutionsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsGetOptionalParams, - ): Promise; - /** - * Create a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - scriptExecution: ScriptExecution, - options?: ScriptExecutionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ScriptExecutionsCreateOrUpdateResponse - > - >; - /** - * Create a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - scriptExecution: ScriptExecution, - options?: ScriptExecutionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a ScriptExecution - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsDeleteOptionalParams, - ): Promise; - /** - * Return the logs for a script execution resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptExecutionName Name of the script cmdlet. - * @param options The options parameters. - */ - getExecutionLogs( - resourceGroupName: string, - privateCloudName: string, - scriptExecutionName: string, - options?: ScriptExecutionsGetExecutionLogsOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/scriptPackages.ts b/sdk/avs/arm-avs/src/operationsInterfaces/scriptPackages.ts deleted file mode 100644 index eae121a9049d..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/scriptPackages.ts +++ /dev/null @@ -1,44 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ScriptPackage, - ScriptPackagesListOptionalParams, - ScriptPackagesGetOptionalParams, - ScriptPackagesGetResponse, -} from "../models"; - -/// -/** Interface representing a ScriptPackages. */ -export interface ScriptPackages { - /** - * List ScriptPackage resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: ScriptPackagesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a ScriptPackage - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param scriptPackageName Name of the script package. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - scriptPackageName: string, - options?: ScriptPackagesGetOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/virtualMachines.ts b/sdk/avs/arm-avs/src/operationsInterfaces/virtualMachines.ts deleted file mode 100644 index 0e07cd7312d8..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/virtualMachines.ts +++ /dev/null @@ -1,91 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - VirtualMachine, - VirtualMachinesListOptionalParams, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachineRestrictMovement, - VirtualMachinesRestrictMovementOptionalParams, - VirtualMachinesRestrictMovementResponse, -} from "../models"; - -/// -/** Interface representing a VirtualMachines. */ -export interface VirtualMachines { - /** - * List VirtualMachine resources by Cluster - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - options?: VirtualMachinesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a VirtualMachine - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - options?: VirtualMachinesGetOptionalParams, - ): Promise; - /** - * Enable or disable DRS-driven VM movement restriction - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. - * @param options The options parameters. - */ - beginRestrictMovement( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - restrictMovement: VirtualMachineRestrictMovement, - options?: VirtualMachinesRestrictMovementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesRestrictMovementResponse - > - >; - /** - * Enable or disable DRS-driven VM movement restriction - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param clusterName Name of the cluster - * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. - * @param options The options parameters. - */ - beginRestrictMovementAndWait( - resourceGroupName: string, - privateCloudName: string, - clusterName: string, - virtualMachineId: string, - restrictMovement: VirtualMachineRestrictMovement, - options?: VirtualMachinesRestrictMovementOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/operationsInterfaces/workloadNetworks.ts b/sdk/avs/arm-avs/src/operationsInterfaces/workloadNetworks.ts deleted file mode 100644 index a7feaf74716f..000000000000 --- a/sdk/avs/arm-avs/src/operationsInterfaces/workloadNetworks.ts +++ /dev/null @@ -1,965 +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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - WorkloadNetwork, - WorkloadNetworksListOptionalParams, - WorkloadNetworkDhcp, - WorkloadNetworksListDhcpOptionalParams, - WorkloadNetworkDnsService, - WorkloadNetworksListDnsServicesOptionalParams, - WorkloadNetworkDnsZone, - WorkloadNetworksListDnsZonesOptionalParams, - WorkloadNetworkGateway, - WorkloadNetworksListGatewaysOptionalParams, - WorkloadNetworkPortMirroring, - WorkloadNetworksListPortMirroringOptionalParams, - WorkloadNetworkPublicIP, - WorkloadNetworksListPublicIPsOptionalParams, - WorkloadNetworkSegment, - WorkloadNetworksListSegmentsOptionalParams, - WorkloadNetworkVirtualMachine, - WorkloadNetworksListVirtualMachinesOptionalParams, - WorkloadNetworkVMGroup, - WorkloadNetworksListVMGroupsOptionalParams, - WorkloadNetworksGetOptionalParams, - WorkloadNetworksGetResponse, - WorkloadNetworksGetDhcpOptionalParams, - WorkloadNetworksGetDhcpResponse, - WorkloadNetworksCreateDhcpOptionalParams, - WorkloadNetworksCreateDhcpResponse, - WorkloadNetworksUpdateDhcpOptionalParams, - WorkloadNetworksUpdateDhcpResponse, - WorkloadNetworksDeleteDhcpOptionalParams, - WorkloadNetworksGetDnsServiceOptionalParams, - WorkloadNetworksGetDnsServiceResponse, - WorkloadNetworksCreateDnsServiceOptionalParams, - WorkloadNetworksCreateDnsServiceResponse, - WorkloadNetworksUpdateDnsServiceOptionalParams, - WorkloadNetworksUpdateDnsServiceResponse, - WorkloadNetworksDeleteDnsServiceOptionalParams, - WorkloadNetworksGetDnsZoneOptionalParams, - WorkloadNetworksGetDnsZoneResponse, - WorkloadNetworksCreateDnsZoneOptionalParams, - WorkloadNetworksCreateDnsZoneResponse, - WorkloadNetworksUpdateDnsZoneOptionalParams, - WorkloadNetworksUpdateDnsZoneResponse, - WorkloadNetworksDeleteDnsZoneOptionalParams, - WorkloadNetworksGetGatewayOptionalParams, - WorkloadNetworksGetGatewayResponse, - WorkloadNetworksGetPortMirroringOptionalParams, - WorkloadNetworksGetPortMirroringResponse, - WorkloadNetworksCreatePortMirroringOptionalParams, - WorkloadNetworksCreatePortMirroringResponse, - WorkloadNetworksUpdatePortMirroringOptionalParams, - WorkloadNetworksUpdatePortMirroringResponse, - WorkloadNetworksDeletePortMirroringOptionalParams, - WorkloadNetworksGetPublicIPOptionalParams, - WorkloadNetworksGetPublicIPResponse, - WorkloadNetworksCreatePublicIPOptionalParams, - WorkloadNetworksCreatePublicIPResponse, - WorkloadNetworksDeletePublicIPOptionalParams, - WorkloadNetworksGetSegmentOptionalParams, - WorkloadNetworksGetSegmentResponse, - WorkloadNetworksCreateSegmentsOptionalParams, - WorkloadNetworksCreateSegmentsResponse, - WorkloadNetworksUpdateSegmentsOptionalParams, - WorkloadNetworksUpdateSegmentsResponse, - WorkloadNetworksDeleteSegmentOptionalParams, - WorkloadNetworksGetVirtualMachineOptionalParams, - WorkloadNetworksGetVirtualMachineResponse, - WorkloadNetworksGetVMGroupOptionalParams, - WorkloadNetworksGetVMGroupResponse, - WorkloadNetworksCreateVMGroupOptionalParams, - WorkloadNetworksCreateVMGroupResponse, - WorkloadNetworksUpdateVMGroupOptionalParams, - WorkloadNetworksUpdateVMGroupResponse, - WorkloadNetworksDeleteVMGroupOptionalParams, -} from "../models"; - -/// -/** Interface representing a WorkloadNetworks. */ -export interface WorkloadNetworks { - /** - * List WorkloadNetwork resources by PrivateCloud - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - list( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listDhcp( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDhcpOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listDnsServices( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsServicesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listDnsZones( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListDnsZonesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listGateways( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListGatewaysOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listPortMirroring( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPortMirroringOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listPublicIPs( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListPublicIPsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listSegments( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListSegmentsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listVirtualMachines( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVirtualMachinesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - listVMGroups( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksListVMGroupsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a WorkloadNetwork - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - get( - resourceGroupName: string, - privateCloudName: string, - options?: WorkloadNetworksGetOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - getDhcp( - resourceGroupName: string, - dhcpId: string, - privateCloudName: string, - options?: WorkloadNetworksGetDhcpOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp Resource create parameters. - * @param options The options parameters. - */ - beginCreateDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksCreateDhcpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDhcpResponse - > - >; - /** - * Create a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp Resource create parameters. - * @param options The options parameters. - */ - beginCreateDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksCreateDhcpOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksUpdateDhcpOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDhcpResponse - > - >; - /** - * Update a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param workloadNetworkDhcp The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - workloadNetworkDhcp: WorkloadNetworkDhcp, - options?: WorkloadNetworksUpdateDhcpOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param options The options parameters. - */ - beginDeleteDhcp( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - options?: WorkloadNetworksDeleteDhcpOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkDhcp - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dhcpId The ID of the DHCP configuration - * @param options The options parameters. - */ - beginDeleteDhcpAndWait( - resourceGroupName: string, - privateCloudName: string, - dhcpId: string, - options?: WorkloadNetworksDeleteDhcpOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param options The options parameters. - */ - getDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - options?: WorkloadNetworksGetDnsServiceOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param options The options parameters. - */ - beginCreateDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksCreateDnsServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDnsServiceResponse - > - >; - /** - * Create a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param options The options parameters. - */ - beginCreateDnsServiceAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksCreateDnsServiceOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDnsService( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksUpdateDnsServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDnsServiceResponse - > - >; - /** - * Update a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDnsServiceAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsServiceId: string, - workloadNetworkDnsService: WorkloadNetworkDnsService, - options?: WorkloadNetworksUpdateDnsServiceOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteDnsService( - resourceGroupName: string, - dnsServiceId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsServiceOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkDnsService - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteDnsServiceAndWait( - resourceGroupName: string, - dnsServiceId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsServiceOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param options The options parameters. - */ - getDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - options?: WorkloadNetworksGetDnsZoneOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param options The options parameters. - */ - beginCreateDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksCreateDnsZoneOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateDnsZoneResponse - > - >; - /** - * Create a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param options The options parameters. - */ - beginCreateDnsZoneAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksCreateDnsZoneOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDnsZone( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksUpdateDnsZoneOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateDnsZoneResponse - > - >; - /** - * Update a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateDnsZoneAndWait( - resourceGroupName: string, - privateCloudName: string, - dnsZoneId: string, - workloadNetworkDnsZone: WorkloadNetworkDnsZone, - options?: WorkloadNetworksUpdateDnsZoneOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteDnsZone( - resourceGroupName: string, - dnsZoneId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsZoneOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkDnsZone - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteDnsZoneAndWait( - resourceGroupName: string, - dnsZoneId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteDnsZoneOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkGateway - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param gatewayId The ID of the NSX Gateway - * @param options The options parameters. - */ - getGateway( - resourceGroupName: string, - privateCloudName: string, - gatewayId: string, - options?: WorkloadNetworksGetGatewayOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param options The options parameters. - */ - getPortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - options?: WorkloadNetworksGetPortMirroringOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param options The options parameters. - */ - beginCreatePortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksCreatePortMirroringOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreatePortMirroringResponse - > - >; - /** - * Create a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param options The options parameters. - */ - beginCreatePortMirroringAndWait( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksCreatePortMirroringOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdatePortMirroring( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksUpdatePortMirroringOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdatePortMirroringResponse - > - >; - /** - * Update a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdatePortMirroringAndWait( - resourceGroupName: string, - privateCloudName: string, - portMirroringId: string, - workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, - options?: WorkloadNetworksUpdatePortMirroringOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeletePortMirroring( - resourceGroupName: string, - portMirroringId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePortMirroringOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkPortMirroring - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeletePortMirroringAndWait( - resourceGroupName: string, - portMirroringId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePortMirroringOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param options The options parameters. - */ - getPublicIP( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - options?: WorkloadNetworksGetPublicIPOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param options The options parameters. - */ - beginCreatePublicIP( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - workloadNetworkPublicIP: WorkloadNetworkPublicIP, - options?: WorkloadNetworksCreatePublicIPOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreatePublicIPResponse - > - >; - /** - * Create a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param options The options parameters. - */ - beginCreatePublicIPAndWait( - resourceGroupName: string, - privateCloudName: string, - publicIPId: string, - workloadNetworkPublicIP: WorkloadNetworkPublicIP, - options?: WorkloadNetworksCreatePublicIPOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeletePublicIP( - resourceGroupName: string, - publicIPId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePublicIPOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkPublicIP - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeletePublicIPAndWait( - resourceGroupName: string, - publicIPId: string, - privateCloudName: string, - options?: WorkloadNetworksDeletePublicIPOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - getSegment( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksGetSegmentOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment Resource create parameters. - * @param options The options parameters. - */ - beginCreateSegments( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksCreateSegmentsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateSegmentsResponse - > - >; - /** - * Create a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment Resource create parameters. - * @param options The options parameters. - */ - beginCreateSegmentsAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksCreateSegmentsOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateSegments( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksUpdateSegmentsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateSegmentsResponse - > - >; - /** - * Update a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param workloadNetworkSegment The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateSegmentsAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - workloadNetworkSegment: WorkloadNetworkSegment, - options?: WorkloadNetworksUpdateSegmentsOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - beginDeleteSegment( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksDeleteSegmentOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkSegment - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param segmentId The ID of the NSX Segment - * @param options The options parameters. - */ - beginDeleteSegmentAndWait( - resourceGroupName: string, - privateCloudName: string, - segmentId: string, - options?: WorkloadNetworksDeleteSegmentOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkVirtualMachine - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param virtualMachineId ID of the virtual machine. - * @param options The options parameters. - */ - getVirtualMachine( - resourceGroupName: string, - privateCloudName: string, - virtualMachineId: string, - options?: WorkloadNetworksGetVirtualMachineOptionalParams, - ): Promise; - /** - * Get a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param options The options parameters. - */ - getVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - options?: WorkloadNetworksGetVMGroupOptionalParams, - ): Promise; - /** - * Create a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup Resource create parameters. - * @param options The options parameters. - */ - beginCreateVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksCreateVMGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksCreateVMGroupResponse - > - >; - /** - * Create a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup Resource create parameters. - * @param options The options parameters. - */ - beginCreateVMGroupAndWait( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksCreateVMGroupOptionalParams, - ): Promise; - /** - * Update a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateVMGroup( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksUpdateVMGroupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkloadNetworksUpdateVMGroupResponse - > - >; - /** - * Update a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param options The options parameters. - */ - beginUpdateVMGroupAndWait( - resourceGroupName: string, - privateCloudName: string, - vmGroupId: string, - workloadNetworkVMGroup: WorkloadNetworkVMGroup, - options?: WorkloadNetworksUpdateVMGroupOptionalParams, - ): Promise; - /** - * Delete a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteVMGroup( - resourceGroupName: string, - vmGroupId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteVMGroupOptionalParams, - ): Promise, void>>; - /** - * Delete a WorkloadNetworkVMGroup - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud - * @param options The options parameters. - */ - beginDeleteVMGroupAndWait( - resourceGroupName: string, - vmGroupId: string, - privateCloudName: string, - options?: WorkloadNetworksDeleteVMGroupOptionalParams, - ): Promise; -} diff --git a/sdk/avs/arm-avs/src/pagingHelper.ts b/sdk/avs/arm-avs/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/avs/arm-avs/src/pagingHelper.ts +++ /dev/null @@ -1,39 +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/avs/arm-avs/src/restorePollerHelpers.ts b/sdk/avs/arm-avs/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..8c7d10c861eb --- /dev/null +++ b/sdk/avs/arm-avs/src/restorePollerHelpers.ts @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AvsClient } from "./avsClient.js"; +import { + _privateCloudsCreateOrUpdateDeserialize, + _privateCloudsUpdateDeserialize, + _privateCloudsDeleteDeserialize, + _privateCloudsRotateVcenterPasswordDeserialize, + _privateCloudsRotateNsxtPasswordDeserialize, +} from "./api/privateClouds/index.js"; +import { + _clustersCreateOrUpdateDeserialize, + _clustersUpdateDeserialize, + _clustersDeleteDeserialize, +} from "./api/clusters/index.js"; +import { + _datastoresCreateOrUpdateDeserialize, + _datastoresDeleteDeserialize, +} from "./api/datastores/index.js"; +import { + _authorizationsCreateOrUpdateDeserialize, + _authorizationsDeleteDeserialize, +} from "./api/authorizations/index.js"; +import { + _globalReachConnectionsCreateOrUpdateDeserialize, + _globalReachConnectionsDeleteDeserialize, +} from "./api/globalReachConnections/index.js"; +import { + _cloudLinksCreateOrUpdateDeserialize, + _cloudLinksDeleteDeserialize, +} from "./api/cloudLinks/index.js"; +import { + _addonsCreateOrUpdateDeserialize, + _addonsDeleteDeserialize, +} from "./api/addons/index.js"; +import { _virtualMachinesRestrictMovementDeserialize } from "./api/virtualMachines/index.js"; +import { + _placementPoliciesCreateOrUpdateDeserialize, + _placementPoliciesUpdateDeserialize, + _placementPoliciesDeleteDeserialize, +} from "./api/placementPolicies/index.js"; +import { + _scriptExecutionsCreateOrUpdateDeserialize, + _scriptExecutionsDeleteDeserialize, +} from "./api/scriptExecutions/index.js"; +import { + _iscsiPathsCreateOrUpdateDeserialize, + _iscsiPathsDeleteDeserialize, +} from "./api/iscsiPaths/index.js"; +import { + _workloadNetworksCreateSegmentDeserialize, + _workloadNetworksUpdateSegmentDeserialize, + _workloadNetworksDeleteSegmentDeserialize, + _workloadNetworksCreateDhcpDeserialize, + _workloadNetworksUpdateDhcpDeserialize, + _workloadNetworksDeleteDhcpDeserialize, + _workloadNetworksCreatePortMirroringDeserialize, + _workloadNetworksUpdatePortMirroringDeserialize, + _workloadNetworksDeletePortMirroringDeserialize, + _workloadNetworksCreateVMGroupDeserialize, + _workloadNetworksUpdateVMGroupDeserialize, + _workloadNetworksDeleteVMGroupDeserialize, + _workloadNetworksCreateDnsServiceDeserialize, + _workloadNetworksUpdateDnsServiceDeserialize, + _workloadNetworksDeleteDnsServiceDeserialize, + _workloadNetworksCreateDnsZoneDeserialize, + _workloadNetworksUpdateDnsZoneDeserialize, + _workloadNetworksDeleteDnsZoneDeserialize, + _workloadNetworksCreatePublicIPDeserialize, + _workloadNetworksDeletePublicIPDeserialize, +} from "./api/workloadNetworks/index.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: AvsClient, + 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}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _privateCloudsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _privateCloudsUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _privateCloudsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword": + { + deserializer: _privateCloudsRotateVcenterPasswordDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword": + { + deserializer: _privateCloudsRotateNsxtPasswordDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _clustersCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _clustersUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _clustersDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}": + { + deserializer: _datastoresCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}": + { + deserializer: _datastoresDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}": + { + deserializer: _authorizationsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}": + { + deserializer: _authorizationsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}": + { + deserializer: _globalReachConnectionsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}": + { + deserializer: _globalReachConnectionsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}": + { + deserializer: _cloudLinksCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}": + { + deserializer: _cloudLinksDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}": + { + deserializer: _addonsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}": + { + deserializer: _addonsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement": + { + deserializer: _virtualMachinesRestrictMovementDeserialize, + expectedStatuses: ["202", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _placementPoliciesCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _placementPoliciesUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _placementPoliciesDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}": + { + deserializer: _scriptExecutionsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}": + { + deserializer: _scriptExecutionsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}": + { + deserializer: _iscsiPathsCreateOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}": + { + deserializer: _iscsiPathsDeleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}": + { + deserializer: _workloadNetworksCreateSegmentDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}": + { + deserializer: _workloadNetworksUpdateSegmentDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}": + { + deserializer: _workloadNetworksDeleteSegmentDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}": + { + deserializer: _workloadNetworksCreateDhcpDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}": + { + deserializer: _workloadNetworksUpdateDhcpDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}": + { + deserializer: _workloadNetworksDeleteDhcpDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}": + { + deserializer: _workloadNetworksCreatePortMirroringDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}": + { + deserializer: _workloadNetworksUpdatePortMirroringDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}": + { + deserializer: _workloadNetworksDeletePortMirroringDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}": + { + deserializer: _workloadNetworksCreateVMGroupDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}": + { + deserializer: _workloadNetworksUpdateVMGroupDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}": + { + deserializer: _workloadNetworksDeleteVMGroupDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}": + { + deserializer: _workloadNetworksCreateDnsServiceDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}": + { + deserializer: _workloadNetworksUpdateDnsServiceDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}": + { + deserializer: _workloadNetworksDeleteDnsServiceDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}": + { + deserializer: _workloadNetworksCreateDnsZoneDeserialize, + expectedStatuses: ["200", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}": + { + deserializer: _workloadNetworksUpdateDnsZoneDeserialize, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}": + { + deserializer: _workloadNetworksDeleteDnsZoneDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}": + { + deserializer: _workloadNetworksCreatePublicIPDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}": + { + deserializer: _workloadNetworksDeletePublicIPDeserialize, + expectedStatuses: ["200", "202", "204"], + }, +}; + +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); +} diff --git a/sdk/avs/arm-avs/src/static-helpers/pagingHelpers.ts b/sdk/avs/arm-avs/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..97a81e74e301 --- /dev/null +++ b/sdk/avs/arm-avs/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,274 @@ +// 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< + TElement, + TPage, + TPageSettings + >; + /** + * 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; +} + +/** + * 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 pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).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< + TElement, + TPage, + TPageSettings extends PageSettings, +>( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator< + TElement, + TPage, + TPageSettings extends PageSettings, +>( + 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, + ); + } +} diff --git a/sdk/avs/arm-avs/src/static-helpers/pollingHelpers.ts b/sdk/avs/arm-avs/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..2edbf783be53 --- /dev/null +++ b/sdk/avs/arm-avs/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,137 @@ +// 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; +} +export function getLongRunningPoller< + TResponse extends PathUncheckedResponse, + TResult = void, +>( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = 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 { + response = await client.pathUnchecked(path).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, + }, + }; +} diff --git a/sdk/avs/arm-avs/test/avs_examples.spec.ts b/sdk/avs/arm-avs/test/avs_examples.spec.ts deleted file mode 100644 index 565cce8338be..000000000000 --- a/sdk/avs/arm-avs/test/avs_examples.spec.ts +++ /dev/null @@ -1,116 +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 { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { AzureVMwareSolutionAPI } from "../src/azureVMwareSolutionAPI"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("avs test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: AzureVMwareSolutionAPI; - let location: string; - let resourceGroup: string; - let privateCloudName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new AzureVMwareSolutionAPI(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastasia"; - resourceGroup = "myjstest"; - privateCloudName = "cloud1"; - }); - - afterEach(async function () { - await recorder.stop(); - }); - - //skip private clouds curd function because it costs too long. - it.skip("privateClouds create test", async function () { - const res = await client.privateClouds.beginCreateOrUpdateAndWait( - resourceGroup, - privateCloudName, - { - availability: { - strategy: "SingleZone" - }, - identity: { type: "SystemAssigned" }, - location, - managementCluster: { - clusterId: 1, - clusterSize: 3 - }, - networkBlock: "192.168.0.0/16", - sku: { name: "AV36" }, - tags: {} - }, - testPollingOptions - ); - assert.equal(res.name, privateCloudName); - }).timeout(36000000); - - it.skip("privateClouds get test", async function () { - const res = await client.privateClouds.get(resourceGroup, privateCloudName); - assert.equal(res.name, privateCloudName); - }); - - it.skip("privateClouds list test", async function () { - const resArray = new Array(); - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - assert.equal(resArray.length, 1);//should be 1,but when testing this test there's 2 resources on portal - }); - - it("operation list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - }); - - it.skip("privateClouds delete test", async function () { - const resArray = new Array(); - const res = await client.privateClouds.beginDeleteAndWait(resourceGroup, privateCloudName, testPollingOptions) - for await (let item of client.privateClouds.listInSubscription()) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }); -}) diff --git a/sdk/avs/arm-avs/test/public/sampleTest.spec.ts b/sdk/avs/arm-avs/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..d4919ac91ac5 --- /dev/null +++ b/sdk/avs/arm-avs/test/public/sampleTest.spec.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createRecorder } from "./utils/recordedClient.js"; +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async function () { + // recorder = await createRecorder(this); + }); + + afterEach(async function () { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/avs/arm-avs/test/public/utils/recordedClient.ts b/sdk/avs/arm-avs/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..6e425fdcfdf9 --- /dev/null +++ b/sdk/avs/arm-avs/test/public/utils/recordedClient.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + Recorder, + RecorderStartOptions, + VitestTestContext, +} from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder( + context: VitestTestContext, +): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/avs/arm-avs/tsconfig.browser.config.json b/sdk/avs/arm-avs/tsconfig.browser.config.json new file mode 100644 index 000000000000..091177fcb991 --- /dev/null +++ b/sdk/avs/arm-avs/tsconfig.browser.config.json @@ -0,0 +1,10 @@ +{ + "extends": "./.tshy/build.json", + "include": ["src/**/*.ts", "src/**/*.mts", "test/**/*.spec.ts"], + "exclude": ["test/**/node/**/*.ts"], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/avs/arm-avs/tsconfig.json b/sdk/avs/arm-avs/tsconfig.json index a9cee0351397..72266609583d 100644 --- a/sdk/avs/arm-avs/tsconfig.json +++ b/sdk/avs/arm-avs/tsconfig.json @@ -1,33 +1,16 @@ { + "extends": "../../../tsconfig", "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-avs": [ - "./src/index" - ] - } + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" + "src/**/*.ts", + "src/**/*.mts", + "src/**/*.cts", + "test/**/*.ts", + "test/**/*.ts" ] -} \ No newline at end of file +} diff --git a/sdk/avs/arm-avs/tsp-location.yaml b/sdk/avs/arm-avs/tsp-location.yaml new file mode 100644 index 000000000000..22cacd77fab9 --- /dev/null +++ b/sdk/avs/arm-avs/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/vmware/Microsoft.AVS.Management +commit: 4b45d60e4bfca311a427aa719f3bef61c791eb2d +repo: ../azure-rest-api-specs +additionalDirectories: diff --git a/sdk/avs/arm-avs/vitest.browser.config.ts b/sdk/avs/arm-avs/vitest.browser.config.ts new file mode 100644 index 000000000000..da68c1d231aa --- /dev/null +++ b/sdk/avs/arm-avs/vitest.browser.config.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +export default defineConfig({ + define: { + "process.env": process.env, + }, + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + browser: { + enabled: true, + headless: true, + name: "chromium", + provider: "playwright", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["dist-test/browser/**/*.spec.js"], + coverage: { + include: ["dist-test/browser/**/*.spec.js"], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage-browser", + }, + testTimeout: 1200000, + hookTimeout: 1200000, + }, +}); diff --git a/sdk/avs/arm-avs/vitest.config.ts b/sdk/avs/arm-avs/vitest.config.ts new file mode 100644 index 000000000000..2cf5d0e02c2e --- /dev/null +++ b/sdk/avs/arm-avs/vitest.config.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig } from "vitest/config"; +import { relativeRecordingsPath } from "@azure-tools/test-recorder"; + +export default defineConfig({ + test: { + reporters: ["basic", "junit"], + outputFile: { + junit: "test-results.browser.xml", + }, + fakeTimers: { + toFake: ["setTimeout", "Date"], + }, + watch: false, + include: ["test/**/*.spec.ts"], + exclude: ["test/**/browser/*.spec.ts"], + coverage: { + include: ["src/**/*.ts"], + exclude: [ + "src/**/*-browser.mts", + "src/**/*-react-native.mts", + "vitest*.config.ts", + "samples-dev/**/*.ts", + ], + provider: "istanbul", + reporter: ["text", "json", "html"], + reportsDirectory: "coverage", + }, + testTimeout: 1200000, + hookTimeout: 1200000, + }, +}); diff --git a/sdk/avs/ci.mgmt.yml b/sdk/avs/ci.mgmt.yml index 693331982feb..5ff1aafdef9c 100644 --- a/sdk/avs/ci.mgmt.yml +++ b/sdk/avs/ci.mgmt.yml @@ -1,11 +1,13 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: - main - release/* - hotfix/* + exclude: + - feature/v4 paths: include: - sdk/avs/ci.mgmt.yml