diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 011571578a0f..fac75ceb81c8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2470,7 +2470,7 @@ packages: version: 0.0.0 '@rush-temp/arm-avs@file:projects/arm-avs.tgz': - resolution: {integrity: sha512-uZ+cO/hkUq9C+VMP0HQF4V8E5gDdHQEH5Hpje1N6iP78aeIzDALXPSuIeEe1OGA2HWtGWCjsfFJFV1PVnKWo1w==, tarball: file:projects/arm-avs.tgz} + resolution: {integrity: sha512-9QNLOmv+CHXeOegD7bTAWT0pN+bPnFmPUF76qoHnMJT/NxdJ3WLBAGMUTr29OOgKVFgygD/QA1gqgbyz8qoUDg==, tarball: file:projects/arm-avs.tgz} version: 0.0.0 '@rush-temp/arm-azureadexternalidentities@file:projects/arm-azureadexternalidentities.tgz': @@ -2594,7 +2594,7 @@ packages: version: 0.0.0 '@rush-temp/arm-containerservice-1@file:projects/arm-containerservice-1.tgz': - resolution: {integrity: sha512-H2yKeU6oHswQCWvTfwFbGFv75Wv2+8ebxqToOogIUvk/K4Qi8hZD6wYpeB79DZEfxdRbbVdd5Asn2qT5tOzInw==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-vgysgdhV82uv2nd8l9bKvJTJvaCEVyGTSMg1DBcAtRYlAMqcwgVygvYmeqty5MXNNAHDqBjYRomPsowMITy3QA==, tarball: file:projects/arm-containerservice-1.tgz} version: 0.0.0 '@rush-temp/arm-containerservice@file:projects/arm-containerservice.tgz': @@ -9976,11 +9976,11 @@ snapshots: '@rush-temp/arm-avs@file:projects/arm-avs.tgz(@types/debug@4.1.12)(tsx@4.19.3)(vite@6.3.2(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(yaml@2.7.1)': dependencies: - '@azure/core-lro': 2.7.2 '@types/node': 18.19.86 '@vitest/browser': 3.1.2(playwright@1.52.0)(vite@6.3.2(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.1))(vitest@3.1.2) '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) dotenv: 16.5.0 + eslint: 9.25.0 playwright: 1.52.0 tslib: 2.8.1 typescript: 5.8.3 diff --git a/sdk/avs/arm-avs/CHANGELOG.md b/sdk/avs/arm-avs/CHANGELOG.md deleted file mode 100644 index ccd70a10a6c9..000000000000 --- a/sdk/avs/arm-avs/CHANGELOG.md +++ /dev/null @@ -1,389 +0,0 @@ -# Release History - -## 6.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 6.0.0 (2024-09-19) - -### Features Added - - - Added Interface AddonList - - Added Interface CloudLinkList - - Added Interface ClusterList - - Added Interface DatastoreList - - Added Interface ExpressRouteAuthorizationList - - Added Interface GlobalReachConnectionList - - Added Interface HcxEnterpriseSiteList - - Added Interface PlacementPoliciesList - - Added Interface PrivateCloudIdentity - - Added Interface PrivateCloudList - - Added Interface ScriptCmdletsList - - Added Interface ScriptExecutionsList - - Added Interface ScriptPackagesList - - Added Interface VirtualMachinesList - - Added Interface WorkloadNetworkDhcpList - - Added Interface WorkloadNetworkDnsServicesList - - Added Interface WorkloadNetworkDnsZonesList - - Added Interface WorkloadNetworkGatewayList - - Added Interface WorkloadNetworkList - - Added Interface WorkloadNetworkPortMirroringList - - Added Interface WorkloadNetworkPublicIPsList - - Added Interface WorkloadNetworkSegmentsList - - Added Interface WorkloadNetworkVirtualMachinesList - - Added Interface WorkloadNetworkVMGroupsList - - Added Type Alias ResourceIdentityType - - Added Enum KnownResourceIdentityType - -### Breaking Changes - - - Operation WorkloadNetworks.beginUpdateDhcp has a new signature - - Operation WorkloadNetworks.beginUpdateDhcpAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateDnsService has a new signature - - Operation WorkloadNetworks.beginUpdateDnsServiceAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateDnsZone has a new signature - - Operation WorkloadNetworks.beginUpdateDnsZoneAndWait has a new signature - - Operation WorkloadNetworks.beginUpdatePortMirroring has a new signature - - Operation WorkloadNetworks.beginUpdatePortMirroringAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateSegments has a new signature - - Operation WorkloadNetworks.beginUpdateSegmentsAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateVMGroup has a new signature - - Operation WorkloadNetworks.beginUpdateVMGroupAndWait has a new signature - - Type of parameter identity of interface PrivateCloud is changed from SystemAssignedServiceIdentity to PrivateCloudIdentity - - Type of parameter identity of interface PrivateCloudUpdate is changed from SystemAssignedServiceIdentity to PrivateCloudIdentity - - Removed Enum KnownSystemAssignedServiceIdentityType - - -## 5.0.0 (2024-06-28) - -### Features Added - - - Added operation group IscsiPaths - - Added Interface AddonListResult - - Added Interface AddonsCreateOrUpdateHeaders - - Added Interface AddonsDeleteHeaders - - Added Interface AuthorizationsCreateOrUpdateHeaders - - Added Interface AuthorizationsDeleteHeaders - - Added Interface CloudLinkListResult - - Added Interface CloudLinksCreateOrUpdateHeaders - - Added Interface CloudLinksDeleteHeaders - - Added Interface ClusterListResult - - Added Interface ClustersCreateOrUpdateHeaders - - Added Interface ClustersDeleteHeaders - - Added Interface ClustersUpdateHeaders - - Added Interface DatastoreListResult - - Added Interface DatastoresCreateOrUpdateHeaders - - Added Interface DatastoresDeleteHeaders - - Added Interface ElasticSanVolume - - Added Interface ExpressRouteAuthorizationListResult - - Added Interface GlobalReachConnectionListResult - - Added Interface GlobalReachConnectionsCreateOrUpdateHeaders - - Added Interface GlobalReachConnectionsDeleteHeaders - - Added Interface HcxEnterpriseSiteListResult - - Added Interface IscsiPath - - Added Interface IscsiPathListResult - - Added Interface IscsiPathsCreateOrUpdateHeaders - - Added Interface IscsiPathsCreateOrUpdateOptionalParams - - Added Interface IscsiPathsDeleteHeaders - - Added Interface IscsiPathsDeleteOptionalParams - - Added Interface IscsiPathsGetOptionalParams - - Added Interface IscsiPathsListByPrivateCloudNextOptionalParams - - Added Interface IscsiPathsListByPrivateCloudOptionalParams - - Added Interface OperationListResult - - Added Interface PlacementPoliciesCreateOrUpdateHeaders - - Added Interface PlacementPoliciesDeleteHeaders - - Added Interface PlacementPoliciesUpdateHeaders - - Added Interface PlacementPolicyListResult - - Added Interface PrivateCloudListResult - - Added Interface PrivateCloudsCreateOrUpdateHeaders - - Added Interface PrivateCloudsDeleteHeaders - - Added Interface PrivateCloudsRotateNsxtPasswordHeaders - - Added Interface PrivateCloudsRotateVcenterPasswordHeaders - - Added Interface PrivateCloudsUpdateHeaders - - Added Interface ScriptCmdletListResult - - Added Interface ScriptExecutionListResult - - Added Interface ScriptExecutionsCreateOrUpdateHeaders - - Added Interface ScriptExecutionsDeleteHeaders - - Added Interface ScriptPackageListResult - - Added Interface SystemAssignedServiceIdentity - - Added Interface SystemData - - Added Interface VirtualMachineListResult - - Added Interface VirtualMachinesRestrictMovementHeaders - - Added Interface WorkloadNetworkDhcpEntityUpdate - - Added Interface WorkloadNetworkDhcpListResult - - Added Interface WorkloadNetworkDhcpRelayUpdate - - Added Interface WorkloadNetworkDhcpServerUpdate - - Added Interface WorkloadNetworkDhcpUpdate - - Added Interface WorkloadNetworkDnsServiceListResult - - Added Interface WorkloadNetworkDnsServiceUpdate - - Added Interface WorkloadNetworkDnsZoneListResult - - Added Interface WorkloadNetworkDnsZoneUpdate - - Added Interface WorkloadNetworkGatewayListResult - - Added Interface WorkloadNetworkListResult - - Added Interface WorkloadNetworkPortMirroringListResult - - Added Interface WorkloadNetworkPortMirroringUpdate - - Added Interface WorkloadNetworkPublicIPListResult - - Added Interface WorkloadNetworksCreateDhcpHeaders - - Added Interface WorkloadNetworksCreateDnsServiceHeaders - - Added Interface WorkloadNetworksCreateDnsZoneHeaders - - Added Interface WorkloadNetworksCreatePortMirroringHeaders - - Added Interface WorkloadNetworksCreatePublicIPHeaders - - Added Interface WorkloadNetworksCreateSegmentsHeaders - - Added Interface WorkloadNetworksCreateVMGroupHeaders - - Added Interface WorkloadNetworksDeleteDhcpHeaders - - Added Interface WorkloadNetworksDeleteDnsServiceHeaders - - Added Interface WorkloadNetworksDeleteDnsZoneHeaders - - Added Interface WorkloadNetworksDeletePortMirroringHeaders - - Added Interface WorkloadNetworksDeletePublicIPHeaders - - Added Interface WorkloadNetworksDeleteSegmentHeaders - - Added Interface WorkloadNetworksDeleteVMGroupHeaders - - Added Interface WorkloadNetworkSegmentListResult - - Added Interface WorkloadNetworkSegmentUpdate - - Added Interface WorkloadNetworksUpdateDhcpHeaders - - Added Interface WorkloadNetworksUpdateDnsServiceHeaders - - Added Interface WorkloadNetworksUpdateDnsZoneHeaders - - Added Interface WorkloadNetworksUpdatePortMirroringHeaders - - Added Interface WorkloadNetworksUpdateSegmentsHeaders - - Added Interface WorkloadNetworksUpdateVMGroupHeaders - - Added Interface WorkloadNetworkVirtualMachineListResult - - Added Interface WorkloadNetworkVMGroupListResult - - Added Interface WorkloadNetworkVMGroupUpdate - - Added Type Alias ActionType - - Added Type Alias CloudLinkProvisioningState - - Added Type Alias CreatedByType - - Added Type Alias DnsZoneType - - Added Type Alias HcxEnterpriseSiteProvisioningState - - Added Type Alias IscsiPathProvisioningState - - Added Type Alias IscsiPathsCreateOrUpdateResponse - - Added Type Alias IscsiPathsGetResponse - - Added Type Alias IscsiPathsListByPrivateCloudNextResponse - - Added Type Alias IscsiPathsListByPrivateCloudResponse - - Added Type Alias Origin - - Added Type Alias PrivateCloudsRotateNsxtPasswordResponse - - Added Type Alias PrivateCloudsRotateVcenterPasswordResponse - - Added Type Alias ScriptCmdletAudience - - Added Type Alias ScriptCmdletProvisioningState - - Added Type Alias ScriptPackageProvisioningState - - Added Type Alias SkuTier - - Added Type Alias SystemAssignedServiceIdentityType - - Added Type Alias VirtualMachineProvisioningState - - Added Type Alias VirtualMachinesRestrictMovementResponse - - Added Type Alias WorkloadNetworkDhcpEntityUpdateUnion - - Added Type Alias WorkloadNetworkProvisioningState - - Interface CloudLink has a new optional parameter provisioningState - - Interface Cluster has a new optional parameter vsanDatastoreName - - Interface ClusterUpdate has a new optional parameter sku - - Interface Datastore has a new optional parameter elasticSanVolume - - Interface Endpoints has a new optional parameter hcxCloudManagerIp - - Interface Endpoints has a new optional parameter nsxtManagerIp - - Interface Endpoints has a new optional parameter vcenterIp - - Interface HcxEnterpriseSite has a new optional parameter provisioningState - - Interface ManagementCluster has a new optional parameter clusterId - - Interface ManagementCluster has a new optional parameter clusterSize - - Interface ManagementCluster has a new optional parameter hosts - - Interface ManagementCluster has a new optional parameter provisioningState - - Interface ManagementCluster has a new optional parameter vsanDatastoreName - - Interface Operation has a new optional parameter actionType - - Interface PrivateCloud has a new optional parameter dnsZoneType - - Interface PrivateCloud has a new optional parameter virtualNetworkId - - Interface PrivateCloudUpdate has a new optional parameter dnsZoneType - - Interface PrivateCloudUpdate has a new optional parameter sku - - Interface Resource has a new optional parameter systemData - - Interface ScriptCmdlet has a new optional parameter audience - - Interface ScriptCmdlet has a new optional parameter provisioningState - - Interface ScriptPackage has a new optional parameter provisioningState - - Interface Sku has a new optional parameter capacity - - Interface Sku has a new optional parameter family - - Interface Sku has a new optional parameter size - - Interface Sku has a new optional parameter tier - - Interface VirtualMachine has a new optional parameter provisioningState - - Interface WorkloadNetwork has a new optional parameter provisioningState - - Interface WorkloadNetworkGateway has a new optional parameter provisioningState - - Interface WorkloadNetworkVirtualMachine has a new optional parameter provisioningState - - Type of parameter addonType of interface AddonProperties is changed from "SRM" | "VR" | "HCX" | "Arc" to "Arc" | "HCX" | "SRM" | "VR" - - Type of parameter type of interface PlacementPolicyProperties is changed from "VmVm" | "VmHost" to "VmHost" | "VmVm" - - Type of parameter type of interface ScriptExecutionParameter is changed from "SecureValue" | "Value" | "Credential" to "Credential" | "SecureValue" | "Value" - - Type of parameter dhcpType of interface WorkloadNetworkDhcpEntity is changed from "SERVER" | "RELAY" to "RELAY" | "SERVER" - - Added Enum KnownActionType - - Added Enum KnownCloudLinkProvisioningState - - Added Enum KnownCreatedByType - - Added Enum KnownDnsZoneType - - Added Enum KnownHcxEnterpriseSiteProvisioningState - - Added Enum KnownIscsiPathProvisioningState - - Added Enum KnownOrigin - - Added Enum KnownScriptCmdletAudience - - Added Enum KnownScriptCmdletProvisioningState - - Added Enum KnownScriptPackageProvisioningState - - Added Enum KnownSystemAssignedServiceIdentityType - - Added Enum KnownVirtualMachineProvisioningState - - Added Enum KnownWorkloadNetworkProvisioningState - -### Breaking Changes - - - Operation WorkloadNetworks.beginUpdateDhcp has a new signature - - Operation WorkloadNetworks.beginUpdateDhcpAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateDnsService has a new signature - - Operation WorkloadNetworks.beginUpdateDnsServiceAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateDnsZone has a new signature - - Operation WorkloadNetworks.beginUpdateDnsZoneAndWait has a new signature - - Operation WorkloadNetworks.beginUpdatePortMirroring has a new signature - - Operation WorkloadNetworks.beginUpdatePortMirroringAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateSegments has a new signature - - Operation WorkloadNetworks.beginUpdateSegmentsAndWait has a new signature - - Operation WorkloadNetworks.beginUpdateVMGroup has a new signature - - Operation WorkloadNetworks.beginUpdateVMGroupAndWait has a new signature - - Operation WorkloadNetworks.get has a new signature - - Interface Operation no longer has parameter properties - - Parameter location of interface TrackedResource is now required - - Type of parameter origin of interface Operation is changed from string to Origin - - Type of parameter identity of interface PrivateCloud is changed from PrivateCloudIdentity to SystemAssignedServiceIdentity - - Type of parameter identity of interface PrivateCloudUpdate is changed from PrivateCloudIdentity to SystemAssignedServiceIdentity - - Removed Enum KnownResourceIdentityType - - Removed Enum KnownWorkloadNetworkName - - -## 4.0.0 (2023-08-10) - -### Features Added - - - Added Interface ErrorDetail - - Interface ErrorResponse has a new optional parameter error - - Interface PrivateCloud has a new optional parameter extendedNetworkBlocks - - Interface PrivateCloudUpdate has a new optional parameter extendedNetworkBlocks - - Interface PrivateCloudUpdateProperties has a new optional parameter extendedNetworkBlocks - - Added function getContinuationToken - -### Breaking Changes - - - Interface ErrorResponse no longer has parameter additionalInfo - - Interface ErrorResponse no longer has parameter code - - Interface ErrorResponse no longer has parameter details - - Interface ErrorResponse no longer has parameter message - - Interface ErrorResponse no longer has parameter target - - -## 3.2.0 (2022-10-20) - -### Features Added - - - Added operation Clusters.listZones - - Added operation WorkloadNetworks.get - - Added operation WorkloadNetworks.list - - Added Interface AddonArcProperties - - Added Interface ClustersListZonesOptionalParams - - Added Interface ClusterZone - - Added Interface ClusterZoneList - - Added Interface WorkloadNetwork - - Added Interface WorkloadNetworkList - - Added Interface WorkloadNetworksGetOptionalParams - - Added Interface WorkloadNetworksListNextOptionalParams - - Added Interface WorkloadNetworksListOptionalParams - - Added Type Alias AffinityStrength - - Added Type Alias AzureHybridBenefitType - - Added Type Alias ClustersListZonesResponse - - Added Type Alias NsxPublicIpQuotaRaisedEnum - - Added Type Alias WorkloadNetworkName - - Added Type Alias WorkloadNetworksGetResponse - - Added Type Alias WorkloadNetworksListNextResponse - - Added Type Alias WorkloadNetworksListResponse - - Interface EncryptionKeyVaultProperties has a new optional parameter autoDetectedKeyVersion - - Interface LocationsCheckTrialAvailabilityOptionalParams has a new optional parameter sku - - Interface PlacementPolicyUpdate has a new optional parameter affinityStrength - - Interface PlacementPolicyUpdate has a new optional parameter azureHybridBenefitType - - Interface PrivateCloud has a new optional parameter nsxPublicIpQuotaRaised - - Interface PrivateCloudProperties has a new optional parameter nsxPublicIpQuotaRaised - - Interface ScriptPackage has a new optional parameter company - - Interface ScriptPackage has a new optional parameter uri - - Interface VmHostPlacementPolicyProperties has a new optional parameter affinityStrength - - Interface VmHostPlacementPolicyProperties has a new optional parameter azureHybridBenefitType - - Added Enum KnownAffinityStrength - - Added Enum KnownAzureHybridBenefitType - - Added Enum KnownNsxPublicIpQuotaRaisedEnum - - Added Enum KnownWorkloadNetworkName - - Enum KnownAddonProvisioningState has a new value Canceled - - Enum KnownAddonType has a new value Arc - - Enum KnownClusterProvisioningState has a new value Canceled - - Enum KnownDatastoreProvisioningState has a new value Canceled - - Enum KnownExpressRouteAuthorizationProvisioningState has a new value Canceled - - Enum KnownGlobalReachConnectionProvisioningState has a new value Canceled - - Enum KnownPlacementPolicyProvisioningState has a new value Canceled - - Enum KnownPrivateCloudProvisioningState has a new value Canceled - - Enum KnownScriptExecutionProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkDhcpProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkDnsServiceProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkDnsZoneProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkPortMirroringProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkPublicIPProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkSegmentProvisioningState has a new value Canceled - - Enum KnownWorkloadNetworkVMGroupProvisioningState has a new value Canceled - -## 3.1.2 (2022-10-08) - -### Bugs Fixed - - - revert credential scopes - -## 3.1.1 (2022-09-30) - -### Bugs Fixed - - - fix better user experience of credential scopes in government cloud - -## 3.1.0 (2022-07-05) - -### Features Added - - - Added Interface Addon - - Added Interface AddonHcxProperties - - Added Interface AddonSrmProperties - - Added Interface AddonVrProperties - - Added Interface CloudLink - - Added Interface Cluster - - Added Interface ClusterProperties - - Added Interface Datastore - - Added Interface ExpressRouteAuthorization - - Added Interface GlobalReachConnection - - Added Interface HcxEnterpriseSite - - Added Interface ManagementCluster - - Added Interface PlacementPolicy - - Added Interface PrivateCloud - - Added Interface PrivateCloudProperties - - Added Interface ProxyResource - - Added Interface PSCredentialExecutionParameter - - Added Interface ScriptCmdlet - - Added Interface ScriptExecution - - Added Interface ScriptPackage - - Added Interface ScriptSecureStringExecutionParameter - - Added Interface ScriptStringExecutionParameter - - Added Interface TrackedResource - - Added Interface VirtualMachine - - Added Interface VmHostPlacementPolicyProperties - - Added Interface VmPlacementPolicyProperties - - Added Interface WorkloadNetworkDhcp - - Added Interface WorkloadNetworkDhcpRelay - - Added Interface WorkloadNetworkDhcpServer - - Added Interface WorkloadNetworkDnsService - - Added Interface WorkloadNetworkDnsZone - - Added Interface WorkloadNetworkGateway - - Added Interface WorkloadNetworkPortMirroring - - Added Interface WorkloadNetworkPublicIP - - Added Interface WorkloadNetworkSegment - - Added Interface WorkloadNetworkVirtualMachine - - Added Interface WorkloadNetworkVMGroup - - -## 3.0.0 (2022-01-10) - -The package of @azure/arm-avs is using our next generation design principles since version 3.0.0, which contains breaking changes. - -To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/avs/arm-avs/LICENSE b/sdk/avs/arm-avs/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/avs/arm-avs/LICENSE +++ b/sdk/avs/arm-avs/LICENSE @@ -18,4 +18,4 @@ 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. +SOFTWARE. \ No newline at end of file diff --git a/sdk/avs/arm-avs/README.md b/sdk/avs/arm-avs/README.md index 87dad7c573db..f86a7f437955 100644 --- a/sdk/avs/arm-avs/README.md +++ b/sdk/avs/arm-avs/README.md @@ -1,13 +1,15 @@ -# 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://learn.microsoft.com/javascript/api/@azure/arm-avs?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs/samples) ## Getting started @@ -24,16 +26,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,44 +45,42 @@ 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). Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. ```ts snippet:ReadmeSampleCreateClient_Node -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +import { AVSClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new AzureVMwareSolutionAPI(new DefaultAzureCredential(), subscriptionId); +const client = new AVSClient(new DefaultAzureCredential(), subscriptionId); ``` For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. ```ts snippet:ReadmeSampleCreateClient_Browser import { InteractiveBrowserCredential } from "@azure/identity"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +import { AVSClient } from "@azure/arm-avs"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); -const client = new AzureVMwareSolutionAPI(credential, subscriptionId); + clientId: "" + }); +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 @@ -98,7 +98,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs/samples) directory for detailed examples on how to use this library. ## Contributing @@ -108,10 +108,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/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/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..6d2f8a5914c3 --- /dev/null +++ b/sdk/avs/arm-avs/eslint.config.mjs @@ -0,0 +1,14 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "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-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 e4028a3b1d89..43e0b34a19a8 100644 --- a/sdk/avs/arm-avs/package.json +++ b/sdk/avs/arm-avs/package.json @@ -1,142 +1,152 @@ { "name": "@azure/arm-avs", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for AzureVMwareSolutionAPI.", "version": "6.0.1", + "description": "A generated SDK for AVSClient.", "engines": { "node": ">=18.0.0" }, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-lro": "^2.7.2", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.1", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./api": "./src/api/index.ts", + "./api/workloadNetworks": "src/api/workloadNetworks/index.ts", + "./api/workloadNetworkVmGroups": "src/api/workloadNetworkVmGroups/index.ts", + "./api/workloadNetworkVirtualMachines": "src/api/workloadNetworkVirtualMachines/index.ts", + "./api/workloadNetworkSegments": "src/api/workloadNetworkSegments/index.ts", + "./api/workloadNetworkPublicIps": "src/api/workloadNetworkPublicIps/index.ts", + "./api/workloadNetworkPortMirroringProfiles": "src/api/workloadNetworkPortMirroringProfiles/index.ts", + "./api/workloadNetworkGateways": "src/api/workloadNetworkGateways/index.ts", + "./api/workloadNetworkDnsZones": "src/api/workloadNetworkDnsZones/index.ts", + "./api/workloadNetworkDnsServices": "src/api/workloadNetworkDnsServices/index.ts", + "./api/workloadNetworkDhcpConfigurations": "src/api/workloadNetworkDhcpConfigurations/index.ts", + "./api/virtualMachines": "src/api/virtualMachines/index.ts", + "./api/skus": "src/api/skus/index.ts", + "./api/scriptPackages": "src/api/scriptPackages/index.ts", + "./api/scriptExecutions": "src/api/scriptExecutions/index.ts", + "./api/scriptCmdlets": "src/api/scriptCmdlets/index.ts", + "./api/pureStoragePolicies": "src/api/pureStoragePolicies/index.ts", + "./api/provisionedNetworks": "src/api/provisionedNetworks/index.ts", + "./api/privateClouds": "src/api/privateClouds/index.ts", + "./api/placementPolicies": "src/api/placementPolicies/index.ts", + "./api/locations": "src/api/locations/index.ts", + "./api/iscsiPaths": "src/api/iscsiPaths/index.ts", + "./api/hosts": "src/api/hosts/index.ts", + "./api/hcxEnterpriseSites": "src/api/hcxEnterpriseSites/index.ts", + "./api/globalReachConnections": "src/api/globalReachConnections/index.ts", + "./api/datastores": "src/api/datastores/index.ts", + "./api/clusters": "src/api/clusters/index.ts", + "./api/cloudLinks": "src/api/cloudLinks/index.ts", + "./api/authorizations": "src/api/authorizations/index.ts", + "./api/addons": "src/api/addons/index.ts", + "./api/operations": "src/api/operations/index.ts", + "./models": "./src/models/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false, + "project": "./tsconfig.src.json" }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "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/azureVMwareSolutionAPIContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.5.0", - "@azure/logger": "^1.1.4", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.9.1", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", - "playwright": "^1.49.1", + "eslint": "^9.9.0", + "playwright": "^1.52.0", "typescript": "~5.8.2", "vitest": "^3.0.9" }, - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "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}\" \"samples-dev/*.ts\"", "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", + "execute:samples": "dev-tool samples run samples-dev", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "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}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "dev-tool run test:vitest --esm", - "lint": "echo skipped", - "minify": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "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", + "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", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run test:vitest", "update-snippets": "dev-tool run update-snippets" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/azureVMwareSolutionAPI.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/avs/arm-avs", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-avs", "productSlugs": [ "azure" ], "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-avs" - }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false + "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-avs?view=azure-node-preview" }, "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "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" - } - } - } + "react-native": "./dist/react-native/index.js" } diff --git a/sdk/avs/arm-avs/review/arm-avs.api.md b/sdk/avs/arm-avs/review/arm-avs.api.md deleted file mode 100644 index 33cd6412a704..000000000000 --- a/sdk/avs/arm-avs/review/arm-avs.api.md +++ /dev/null @@ -1,2903 +0,0 @@ -## 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 - -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; - -// @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 AddonList { - nextLink?: string; - value: Addon[]; -} - -// @public -export interface AddonProperties { - addonType: "Arc" | "HCX" | "SRM" | "VR"; - 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; -} - -// @public -export interface AddonsCreateOrUpdateHeaders { - retryAfter?: number; -} - -// @public -export interface AddonsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type AddonsCreateOrUpdateResponse = Addon; - -// @public -export interface AddonsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface AddonsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface AddonsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AddonsGetResponse = Addon; - -// @public -export interface AddonsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AddonsListNextResponse = AddonList; - -// @public -export interface AddonsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AddonsListResponse = AddonList; - -// @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 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; - updateIntervalInMs?: number; -} - -// @public -export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization; - -// @public -export interface AuthorizationsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface AuthorizationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface AuthorizationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationsGetResponse = ExpressRouteAuthorization; - -// @public -export interface AuthorizationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList; - -// @public -export interface AuthorizationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationsListResponse = ExpressRouteAuthorizationList; - -// @public -export interface AvailabilityProperties { - secondaryZone?: number; - strategy?: AvailabilityStrategy; - zone?: number; -} - -// @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; -} - -// @public -export interface AzureVMwareSolutionAPIOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} - -// @public -export interface Circuit { - readonly expressRouteID?: string; - readonly expressRoutePrivatePeeringID?: string; - readonly primarySubnet?: string; - readonly secondarySubnet?: string; -} - -// @public -export interface CloudLink extends ProxyResource { - linkedCloud?: string; - readonly provisioningState?: CloudLinkProvisioningState; - readonly status?: CloudLinkStatus; -} - -// @public -export interface CloudLinkList { - nextLink?: string; - value: CloudLink[]; -} - -// @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; - updateIntervalInMs?: number; -} - -// @public -export type CloudLinksCreateOrUpdateResponse = CloudLink; - -// @public -export interface CloudLinksDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface CloudLinksDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface CloudLinksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudLinksGetResponse = CloudLink; - -// @public -export interface CloudLinksListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudLinksListNextResponse = CloudLinkList; - -// @public -export interface CloudLinksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudLinksListResponse = CloudLinkList; - -// @public -export type CloudLinkStatus = string; - -// @public -export interface Cluster extends ProxyResource { - 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; - updateIntervalInMs?: number; -} - -// @public -export type ClustersCreateOrUpdateResponse = Cluster; - -// @public -export interface ClustersDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersGetResponse = Cluster; - -// @public -export interface ClustersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListNextResponse = ClusterList; - -// @public -export interface ClustersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListResponse = ClusterList; - -// @public -export interface ClustersListZonesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListZonesResponse = ClusterZoneList; - -// @public -export interface ClustersUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClustersUpdateResponse = Cluster; - -// @public -export interface ClusterUpdate { - clusterSize?: number; - hosts?: string[]; - sku?: Sku; -} - -// @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 { - diskPoolVolume?: DiskPoolVolume; - elasticSanVolume?: ElasticSanVolume; - netAppVolume?: NetAppVolume; - readonly provisioningState?: DatastoreProvisioningState; - 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; - updateIntervalInMs?: number; -} - -// @public -export type DatastoresCreateOrUpdateResponse = Datastore; - -// @public -export interface DatastoresDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface DatastoresDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface DatastoresGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DatastoresGetResponse = Datastore; - -// @public -export interface DatastoresListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DatastoresListNextResponse = DatastoreList; - -// @public -export interface DatastoresListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DatastoresListResponse = DatastoreList; - -// @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 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; -} - -// @public -export interface ExpressRouteAuthorization extends ProxyResource { - 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; - -// @public -export interface GlobalReachConnection extends ProxyResource { - readonly addressPrefix?: string; - authorizationKey?: string; - readonly circuitConnectionStatus?: GlobalReachConnectionStatus; - expressRouteId?: string; - peerExpressRouteCircuit?: string; - 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; - updateIntervalInMs?: number; -} - -// @public -export type GlobalReachConnectionsCreateOrUpdateResponse = GlobalReachConnection; - -// @public -export interface GlobalReachConnectionsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface GlobalReachConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface GlobalReachConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GlobalReachConnectionsGetResponse = GlobalReachConnection; - -// @public -export interface GlobalReachConnectionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GlobalReachConnectionsListNextResponse = GlobalReachConnectionList; - -// @public -export interface GlobalReachConnectionsListOptionalParams extends coreClient.OperationOptions { -} - -// @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; -} - -// @public -export interface HcxEnterpriseSiteList { - nextLink?: string; - value: HcxEnterpriseSite[]; -} - -// @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 { -} - -// @public -export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite; - -// @public -export interface HcxEnterpriseSitesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface HcxEnterpriseSitesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite; - -// @public -export interface HcxEnterpriseSitesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList; - -// @public -export interface HcxEnterpriseSitesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList; - -// @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 { - networkBlock?: string; - readonly provisioningState?: IscsiPathProvisioningState; -} - -// @public -export interface IscsiPathListResult { - nextLink?: string; - value: IscsiPath[]; -} - -// @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; - updateIntervalInMs?: number; -} - -// @public -export type IscsiPathsCreateOrUpdateResponse = IscsiPath; - -// @public -export interface IscsiPathsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface IscsiPathsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface IscsiPathsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IscsiPathsGetResponse = IscsiPath; - -// @public -export interface IscsiPathsListByPrivateCloudNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IscsiPathsListByPrivateCloudNextResponse = IscsiPathListResult; - -// @public -export interface IscsiPathsListByPrivateCloudOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IscsiPathsListByPrivateCloudResponse = IscsiPathListResult; - -// @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 { - Arc = "Arc", - HCX = "HCX", - SRM = "SRM", - 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 { - Relay = "RELAY", - 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 { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @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 { - VmHost = "VmHost", - 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 KnownResourceIdentityType { - None = "None", - SystemAssigned = "SystemAssigned" -} - -// @public -export enum KnownScriptCmdletAudience { - Any = "Any", - Automation = "Automation" -} - -// @public -export enum KnownScriptCmdletProvisioningState { - Canceled = "Canceled", - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export enum KnownScriptExecutionParameterType { - Credential = "Credential", - SecureValue = "SecureValue", - 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 KnownTrialStatus { - TrialAvailable = "TrialAvailable", - TrialDisabled = "TrialDisabled", - TrialUsed = "TrialUsed" -} - -// @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 Locations { - checkQuotaAvailability(location: string, options?: LocationsCheckQuotaAvailabilityOptionalParams): Promise; - checkTrialAvailability(location: string, options?: LocationsCheckTrialAvailabilityOptionalParams): Promise; -} - -// @public -export interface LocationsCheckQuotaAvailabilityOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LocationsCheckQuotaAvailabilityResponse = Quota; - -// @public -export interface LocationsCheckTrialAvailabilityOptionalParams extends coreClient.OperationOptions { - sku?: Sku; -} - -// @public -export type LocationsCheckTrialAvailabilityResponse = Trial; - -// @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 interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - -// @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; - updateIntervalInMs?: number; -} - -// @public -export type PlacementPoliciesCreateOrUpdateResponse = PlacementPolicy; - -// @public -export interface PlacementPoliciesDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PlacementPoliciesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - 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 { -} - -// @public -export type PlacementPoliciesListNextResponse = PlacementPoliciesList; - -// @public -export interface PlacementPoliciesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PlacementPoliciesListResponse = PlacementPoliciesList; - -// @public -export interface PlacementPoliciesUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PlacementPoliciesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PlacementPoliciesUpdateResponse = PlacementPolicy; - -// @public -export interface PlacementPolicy extends ProxyResource { - properties?: PlacementPolicyPropertiesUnion; -} - -// @public -export interface PlacementPolicyProperties { - displayName?: string; - readonly provisioningState?: PlacementPolicyProvisioningState; - state?: PlacementPolicyState; - type: "VmHost" | "VmVm"; -} - -// @public (undocumented) -export type PlacementPolicyPropertiesUnion = PlacementPolicyProperties | VmHostPlacementPolicyProperties | VmPlacementPolicyProperties; - -// @public -export type PlacementPolicyProvisioningState = string; - -// @public -export type PlacementPolicyState = string; - -// @public -export type PlacementPolicyType = string; - -// @public -export interface PlacementPolicyUpdate { - 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 { - availability?: AvailabilityProperties; - circuit?: Circuit; - dnsZoneType?: DnsZoneType; - encryption?: Encryption; - readonly endpoints?: Endpoints; - extendedNetworkBlocks?: string[]; - readonly externalCloudLinks?: string[]; - identity?: PrivateCloudIdentity; - 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; - 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; - updateIntervalInMs?: number; -} - -// @public -export type PrivateCloudsCreateOrUpdateResponse = PrivateCloud; - -// @public -export interface PrivateCloudsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - 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 { -} - -// @public -export type PrivateCloudsListInSubscriptionNextResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListInSubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateCloudsListInSubscriptionResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateCloudsListNextResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateCloudsListResponse = PrivateCloudList; - -// @public -export interface PrivateCloudsRotateNsxtPasswordHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsRotateNsxtPasswordOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateCloudsRotateNsxtPasswordResponse = PrivateCloudsRotateNsxtPasswordHeaders; - -// @public -export interface PrivateCloudsRotateVcenterPasswordHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsRotateVcenterPasswordOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateCloudsRotateVcenterPasswordResponse = PrivateCloudsRotateVcenterPasswordHeaders; - -// @public -export interface PrivateCloudsUpdateHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface PrivateCloudsUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateCloudsUpdateResponse = PrivateCloud; - -// @public -export interface PrivateCloudUpdate { - availability?: AvailabilityProperties; - dnsZoneType?: DnsZoneType; - encryption?: Encryption; - extendedNetworkBlocks?: string[]; - identity?: PrivateCloudIdentity; - identitySources?: IdentitySource[]; - internet?: InternetEnum; - managementCluster?: ManagementCluster; - sku?: Sku; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface ProxyResource extends Resource { -} - -// @public -export interface PSCredentialExecutionParameter extends ScriptExecutionParameter { - password?: string; - type: "Credential"; - username?: string; -} - -// @public -export interface Quota { - readonly hostsRemaining?: { - [propertyName: string]: number; - }; - 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 type ResourceIdentityType = string; - -// @public -export interface ScriptCmdlet extends ProxyResource { - readonly audience?: ScriptCmdletAudience; - readonly description?: string; - readonly parameters?: ScriptParameter[]; - readonly provisioningState?: ScriptCmdletProvisioningState; - 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; -} - -// @public -export interface ScriptCmdletsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptCmdletsGetResponse = ScriptCmdlet; - -// @public -export interface ScriptCmdletsList { - nextLink?: string; - value: ScriptCmdlet[]; -} - -// @public -export interface ScriptCmdletsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptCmdletsListNextResponse = ScriptCmdletsList; - -// @public -export interface ScriptCmdletsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptCmdletsListResponse = ScriptCmdletsList; - -// @public -export interface ScriptExecution extends ProxyResource { - readonly errors?: string[]; - failureReason?: string; - readonly finishedAt?: Date; - hiddenParameters?: ScriptExecutionParameterUnion[]; - readonly information?: string[]; - namedOutputs?: { - [propertyName: string]: 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 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; - updateIntervalInMs?: number; -} - -// @public -export type ScriptExecutionsCreateOrUpdateResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsDeleteHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface ScriptExecutionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ScriptExecutionsGetExecutionLogsOptionalParams extends coreClient.OperationOptions { - scriptOutputStreamType?: ScriptOutputStreamType[]; -} - -// @public -export type ScriptExecutionsGetExecutionLogsResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptExecutionsGetResponse = ScriptExecution; - -// @public -export interface ScriptExecutionsList { - nextLink?: string; - value: ScriptExecution[]; -} - -// @public -export interface ScriptExecutionsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptExecutionsListNextResponse = ScriptExecutionsList; - -// @public -export interface ScriptExecutionsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptExecutionsListResponse = ScriptExecutionsList; - -// @public -export type ScriptOutputStreamType = string; - -// @public -export interface ScriptPackage extends ProxyResource { - readonly company?: string; - readonly description?: string; - readonly provisioningState?: ScriptPackageProvisioningState; - readonly uri?: string; - readonly version?: string; -} - -// @public -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 { -} - -// @public -export type ScriptPackagesGetResponse = ScriptPackage; - -// @public -export interface ScriptPackagesList { - nextLink?: string; - value: ScriptPackage[]; -} - -// @public -export interface ScriptPackagesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptPackagesListNextResponse = ScriptPackagesList; - -// @public -export interface ScriptPackagesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScriptPackagesListResponse = ScriptPackagesList; - -// @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 interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface Trial { - readonly availableHosts?: number; - readonly status?: TrialStatus; -} - -// @public -export type TrialStatus = string; - -// @public -export interface VirtualMachine extends ProxyResource { - 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 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; -} - -// @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachinesGetResponse = VirtualMachine; - -// @public -export interface VirtualMachinesList { - nextLink?: string; - value: VirtualMachine[]; -} - -// @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; - updateIntervalInMs?: number; -} - -// @public -export type VirtualMachinesRestrictMovementResponse = VirtualMachinesRestrictMovementHeaders; - -// @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 { - readonly provisioningState?: WorkloadNetworkProvisioningState; -} - -// @public -export interface WorkloadNetworkDhcp extends ProxyResource { - properties?: WorkloadNetworkDhcpEntityUnion; -} - -// @public -export interface WorkloadNetworkDhcpEntity { - dhcpType: "RELAY" | "SERVER"; - 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[]; -} - -// @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 { - 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 WorkloadNetworkDnsServicesList { - nextLink?: string; - value: WorkloadNetworkDnsService[]; -} - -// @public -export interface WorkloadNetworkDnsZone extends ProxyResource { - displayName?: string; - dnsServerIps?: string[]; - dnsServices?: number; - domain?: string[]; - readonly provisioningState?: WorkloadNetworkDnsZoneProvisioningState; - revision?: number; - sourceIp?: string; -} - -// @public -export type WorkloadNetworkDnsZoneProvisioningState = string; - -// @public -export interface WorkloadNetworkDnsZonesList { - nextLink?: string; - value: WorkloadNetworkDnsZone[]; -} - -// @public -export interface WorkloadNetworkGateway extends ProxyResource { - displayName?: string; - readonly path?: string; - readonly provisioningState?: WorkloadNetworkProvisioningState; -} - -// @public -export interface WorkloadNetworkGatewayList { - nextLink?: string; - value: WorkloadNetworkGateway[]; -} - -// @public -export interface WorkloadNetworkList { - nextLink?: string; - value: WorkloadNetwork[]; -} - -// @public -export interface WorkloadNetworkPortMirroring extends ProxyResource { - destination?: string; - direction?: PortMirroringDirectionEnum; - displayName?: string; - readonly provisioningState?: WorkloadNetworkPortMirroringProvisioningState; - revision?: number; - source?: string; - readonly status?: PortMirroringStatusEnum; -} - -// @public -export interface WorkloadNetworkPortMirroringList { - nextLink?: string; - value: WorkloadNetworkPortMirroring[]; -} - -// @public -export type WorkloadNetworkPortMirroringProvisioningState = string; - -// @public -export type WorkloadNetworkProvisioningState = string; - -// @public -export interface WorkloadNetworkPublicIP extends ProxyResource { - displayName?: string; - numberOfPublicIPs?: number; - readonly provisioningState?: WorkloadNetworkPublicIPProvisioningState; - readonly publicIPBlock?: string; -} - -// @public -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; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreateDhcpResponse = WorkloadNetworkDhcp; - -// @public -export interface WorkloadNetworksCreateDnsServiceHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreateDnsServiceResponse = WorkloadNetworkDnsService; - -// @public -export interface WorkloadNetworksCreateDnsZoneHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreateDnsZoneResponse = WorkloadNetworkDnsZone; - -// @public -export interface WorkloadNetworksCreatePortMirroringHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreatePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreatePortMirroringResponse = WorkloadNetworkPortMirroring; - -// @public -export interface WorkloadNetworksCreatePublicIPHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreatePublicIPOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreatePublicIPResponse = WorkloadNetworkPublicIP; - -// @public -export interface WorkloadNetworksCreateSegmentsHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateSegmentsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreateSegmentsResponse = WorkloadNetworkSegment; - -// @public -export interface WorkloadNetworksCreateVMGroupHeaders { - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksCreateVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksCreateVMGroupResponse = WorkloadNetworkVMGroup; - -// @public -export interface WorkloadNetworksDeleteDhcpHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDhcpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsServiceHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsZoneHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeletePortMirroringHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeletePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeletePublicIPHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeletePublicIPOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeleteSegmentHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteSegmentOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworksDeleteVMGroupHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksDeleteVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface WorkloadNetworkSegment extends ProxyResource { - connectedGateway?: string; - displayName?: string; - readonly portVif?: WorkloadNetworkSegmentPortVif[]; - readonly provisioningState?: WorkloadNetworkSegmentProvisioningState; - revision?: number; - readonly status?: SegmentStatusEnum; - 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[]; - gatewayAddress?: string; -} - -// @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 { -} - -// @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 { -} - -// @public -export type WorkloadNetworksListDhcpResponse = WorkloadNetworkDhcpList; - -// @public -export interface WorkloadNetworksListDnsServicesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListDnsServicesNextResponse = WorkloadNetworkDnsServicesList; - -// @public -export interface WorkloadNetworksListDnsServicesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListDnsServicesResponse = WorkloadNetworkDnsServicesList; - -// @public -export interface WorkloadNetworksListDnsZonesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListDnsZonesNextResponse = WorkloadNetworkDnsZonesList; - -// @public -export interface WorkloadNetworksListDnsZonesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListDnsZonesResponse = WorkloadNetworkDnsZonesList; - -// @public -export interface WorkloadNetworksListGatewaysNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListGatewaysNextResponse = WorkloadNetworkGatewayList; - -// @public -export interface WorkloadNetworksListGatewaysOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListGatewaysResponse = WorkloadNetworkGatewayList; - -// @public -export interface WorkloadNetworksListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListNextResponse = WorkloadNetworkList; - -// @public -export interface WorkloadNetworksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface WorkloadNetworksListPortMirroringNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListPortMirroringNextResponse = WorkloadNetworkPortMirroringList; - -// @public -export interface WorkloadNetworksListPortMirroringOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListPortMirroringResponse = WorkloadNetworkPortMirroringList; - -// @public -export interface WorkloadNetworksListPublicIPsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListPublicIPsNextResponse = WorkloadNetworkPublicIPsList; - -// @public -export interface WorkloadNetworksListPublicIPsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListPublicIPsResponse = WorkloadNetworkPublicIPsList; - -// @public -export type WorkloadNetworksListResponse = WorkloadNetworkList; - -// @public -export interface WorkloadNetworksListSegmentsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListSegmentsNextResponse = WorkloadNetworkSegmentsList; - -// @public -export interface WorkloadNetworksListSegmentsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListSegmentsResponse = WorkloadNetworkSegmentsList; - -// @public -export interface WorkloadNetworksListVirtualMachinesNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListVirtualMachinesNextResponse = WorkloadNetworkVirtualMachinesList; - -// @public -export interface WorkloadNetworksListVirtualMachinesOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListVirtualMachinesResponse = WorkloadNetworkVirtualMachinesList; - -// @public -export interface WorkloadNetworksListVMGroupsNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListVMGroupsNextResponse = WorkloadNetworkVMGroupsList; - -// @public -export interface WorkloadNetworksListVMGroupsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkloadNetworksListVMGroupsResponse = WorkloadNetworkVMGroupsList; - -// @public -export interface WorkloadNetworksUpdateDhcpHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateDhcpOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdateDhcpResponse = WorkloadNetworkDhcp; - -// @public -export interface WorkloadNetworksUpdateDnsServiceHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateDnsServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdateDnsServiceResponse = WorkloadNetworkDnsService; - -// @public -export interface WorkloadNetworksUpdateDnsZoneHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateDnsZoneOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdateDnsZoneResponse = WorkloadNetworkDnsZone; - -// @public -export interface WorkloadNetworksUpdatePortMirroringHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdatePortMirroringOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdatePortMirroringResponse = WorkloadNetworkPortMirroring; - -// @public -export interface WorkloadNetworksUpdateSegmentsHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateSegmentsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdateSegmentsResponse = WorkloadNetworkSegment; - -// @public -export interface WorkloadNetworksUpdateVMGroupHeaders { - location?: string; - retryAfter?: number; -} - -// @public -export interface WorkloadNetworksUpdateVMGroupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type WorkloadNetworksUpdateVMGroupResponse = WorkloadNetworkVMGroup; - -// @public -export interface WorkloadNetworkVirtualMachine extends ProxyResource { - displayName?: string; - readonly provisioningState?: WorkloadNetworkProvisioningState; - readonly vmType?: VMTypeEnum; -} - -// @public -export interface WorkloadNetworkVirtualMachinesList { - nextLink?: string; - value: WorkloadNetworkVirtualMachine[]; -} - -// @public -export interface WorkloadNetworkVMGroup extends ProxyResource { - displayName?: string; - members?: string[]; - readonly provisioningState?: WorkloadNetworkVMGroupProvisioningState; - revision?: number; - readonly status?: VMGroupStatusEnum; -} - -// @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 index b56bc25014ee..b08bdb245e4b 100644 --- a/sdk/avs/arm-avs/samples-dev/addonsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/addonsCreateOrUpdateSample.ts @@ -1,132 +1,85 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { Addon } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a Addon + * 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 + * @summary create a Addon + * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json */ async function addonsCreateOrUpdateArcReg(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.createOrUpdate("group1", "cloud1", "arc"); + console.log(result); +} + +/** + * This sample demonstrates how to create a Addon + * + * @summary create a Addon + * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX.json + */ +async function addonsCreateOrUpdateHCX(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.createOrUpdate("group1", "cloud1", "hcx"); console.log(result); } /** - * This sample demonstrates how to Create a Addon + * 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 + * @summary create a Addon + * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json */ -async function addonsCreateOrUpdateHcx(): Promise { - 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)", - }, - }; +async function addonsCreateOrUpdateHCXWithNetworks(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.createOrUpdate("group1", "cloud1", "hcx"); console.log(result); } /** - * This sample demonstrates how to Create a Addon + * 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 + * @summary create a Addon + * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_SRM.json */ -async function addonsCreateOrUpdateSrm(): Promise { - 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", - }, - }; +async function addonsCreateOrUpdateSRM(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.createOrUpdate("group1", "cloud1", "srm"); console.log(result); } /** - * This sample demonstrates how to Create a Addon + * 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 + * @summary create a Addon + * x-ms-original-file: 2024-09-01/Addons_CreateOrUpdate_VR.json */ -async function addonsCreateOrUpdateVr(): Promise { - 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 } }; +async function addonsCreateOrUpdateVR(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.beginCreateOrUpdateAndWait( - resourceGroupName, - privateCloudName, - addonName, - addon, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.createOrUpdate("group1", "cloud1", "vr"); console.log(result); } async function main(): Promise { await addonsCreateOrUpdateArcReg(); - await addonsCreateOrUpdateHcx(); - await addonsCreateOrUpdateSrm(); - await addonsCreateOrUpdateVr(); + await addonsCreateOrUpdateHCX(); + await addonsCreateOrUpdateHCXWithNetworks(); + await addonsCreateOrUpdateSRM(); + await 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 index 6c1f8f768522..0d5a02ca09b9 100644 --- a/sdk/avs/arm-avs/samples-dev/addonsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/addonsDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a Addon + * 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 + * @summary delete a Addon + * x-ms-original-file: 2024-09-01/Addons_Delete.json */ async function addonsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.addons.delete("group1", "cloud1", "srm"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts b/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts index 74168a32906b..81d6553dda69 100644 --- a/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/addonsGetSample.ts @@ -1,91 +1,85 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a Addon + * 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 + * @summary get a Addon + * x-ms-original-file: 2024-09-01/Addons_Get_ArcReg.json */ async function addonsGetArcReg(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.get("group1", "cloud1", "arc"); + console.log(result); +} + +/** + * This sample demonstrates how to get a Addon + * + * @summary get a Addon + * x-ms-original-file: 2024-09-01/Addons_Get_HCX.json + */ +async function addonsGetHCX(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.get("group1", "cloud1", "hcx"); console.log(result); } /** - * This sample demonstrates how to Get a Addon + * 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 + * @summary get a Addon + * x-ms-original-file: 2024-09-01/Addons_Get_HCX_With_Networks.json */ -async function addonsGetHcx(): Promise { - 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"; +async function addonsGetHCXWithNetworks(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.get("group1", "cloud1", "hcx"); console.log(result); } /** - * This sample demonstrates how to Get a Addon + * 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 + * @summary get a Addon + * x-ms-original-file: 2024-09-01/Addons_Get_SRM.json */ -async function addonsGetSrm(): Promise { - 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"; +async function addonsGetSRM(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.get("group1", "cloud1", "srm"); console.log(result); } /** - * This sample demonstrates how to Get a Addon + * 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 + * @summary get a Addon + * x-ms-original-file: 2024-09-01/Addons_Get_VR.json */ -async function addonsGetVr(): Promise { - 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"; +async function addonsGetVR(): Promise { const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); - const result = await client.addons.get(resourceGroupName, privateCloudName, addonName); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.addons.get("group1", "cloud1", "vr"); console.log(result); } async function main(): Promise { await addonsGetArcReg(); - await addonsGetHcx(); - await addonsGetSrm(); - await addonsGetVr(); + await addonsGetHCX(); + await addonsGetHCXWithNetworks(); + await addonsGetSRM(); + await 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 index bc05a2cb4cb2..cdbd14aa888c 100644 --- a/sdk/avs/arm-avs/samples-dev/addonsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/addonsListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List Addon resources by PrivateCloud + * 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 + * @summary list Addon resources by PrivateCloud + * x-ms-original-file: 2024-09-01/Addons_List.json */ async function addonsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.addons.list(resourceGroupName, privateCloudName)) { + for await (const item of client.addons.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts index 1875a9da507c..64f1466c0fa3 100644 --- a/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/authorizationsCreateOrUpdateSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { ExpressRouteAuthorization } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a ExpressRouteAuthorization + * 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 + * @summary create a ExpressRouteAuthorization + * x-ms-original-file: 2024-09-01/Authorizations_CreateOrUpdate.json */ async function authorizationsCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.authorizations.createOrUpdate("group1", "cloud1", "authorization1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts index 20953a369d1d..29510e53d101 100644 --- a/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/authorizationsDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a ExpressRouteAuthorization + * 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 + * @summary delete a ExpressRouteAuthorization + * x-ms-original-file: 2024-09-01/Authorizations_Delete.json */ async function authorizationsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.authorizations.delete("group1", "cloud1", "authorization1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts index 33e0ba0161df..7be7d366508f 100644 --- a/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/authorizationsGetSample.ts @@ -1,33 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a ExpressRouteAuthorization + * 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 + * @summary get a ExpressRouteAuthorization + * x-ms-original-file: 2024-09-01/Authorizations_Get.json */ async function authorizationsGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.authorizations.get("group1", "cloud1", "authorization1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts b/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts index 313723d08257..c3c0f1ce13a6 100644 --- a/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/authorizationsListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List ExpressRouteAuthorization resources by PrivateCloud + * 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 + * @summary list ExpressRouteAuthorization resources by PrivateCloud + * x-ms-original-file: 2024-09-01/Authorizations_List.json */ async function authorizationsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.authorizations.list(resourceGroupName, privateCloudName)) { + for await (const item of client.authorizations.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts index 264e339d928a..58babd27fc57 100644 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/cloudLinksCreateOrUpdateSample.ts @@ -1,39 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { CloudLink } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a CloudLink + * 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 + * @summary create a CloudLink + * x-ms-original-file: 2024-09-01/CloudLinks_CreateOrUpdate.json */ async function cloudLinksCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.cloudLinks.createOrUpdate("group1", "cloud1", "cloudLink1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts index 1fbc8192d5db..25a9b6fe25ff 100644 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/cloudLinksDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a CloudLink + * 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 + * @summary delete a CloudLink + * x-ms-original-file: 2024-09-01/CloudLinks_Delete.json */ async function cloudLinksDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.cloudLinks.delete("group1", "cloud1", "cloudLink1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts index 9ac73091f226..db38f99b5311 100644 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/cloudLinksGetSample.ts @@ -1,29 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a CloudLink + * 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 + * @summary get a CloudLink + * x-ms-original-file: 2024-09-01/CloudLinks_Get.json */ async function cloudLinksGet(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.cloudLinks.get("group1", "cloud1", "cloudLink1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts b/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts index ab3b2cbc4919..ce2be4bb79c6 100644 --- a/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/cloudLinksListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List CloudLink resources by PrivateCloud + * 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 + * @summary list CloudLink resources by PrivateCloud + * x-ms-original-file: 2024-09-01/CloudLinks_List.json */ async function cloudLinksList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.cloudLinks.list(resourceGroupName, privateCloudName)) { + for await (const item of client.cloudLinks.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts index effee6f5c482..0423f61442b6 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersCreateOrUpdateSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { Cluster } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a Cluster + * 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 + * @summary create a Cluster + * x-ms-original-file: 2024-09-01/Clusters_CreateOrUpdate.json */ async function clustersCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.clusters.createOrUpdate("group1", "cloud1", "cluster1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts index 1ccf9baeb12b..4e0d1b492c4a 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a Cluster + * 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 + * @summary delete a Cluster + * x-ms-original-file: 2024-09-01/Clusters_Delete.json */ async function clustersDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.clusters.delete("group1", "cloud1", "cluster1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts b/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts index 0f993f303f25..0eaea2245581 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersGetSample.ts @@ -1,29 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a Cluster + * 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 + * @summary get a Cluster + * x-ms-original-file: 2024-09-01/Clusters_Get.json */ async function clustersGet(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.clusters.get("group1", "cloud1", "cluster1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/clustersListSample.ts b/sdk/avs/arm-avs/samples-dev/clustersListSample.ts index f223e616fc44..ab62d81b3aa1 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List Cluster resources by PrivateCloud + * 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 + * @summary list Cluster resources by PrivateCloud + * x-ms-original-file: 2024-09-01/Clusters_List.json */ async function clustersList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.clusters.list(resourceGroupName, privateCloudName)) { + for await (const item of client.clusters.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts b/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts index 5c018d4dd565..7cd994644992 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersListZonesSample.ts @@ -1,47 +1,34 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List hosts by zone in a cluster + * 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 + * @summary list hosts by zone in a cluster + * x-ms-original-file: 2024-09-01/Clusters_ListZones.json */ async function clustersListZones(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.clusters.listZones("group1", "cloud1", "cluster1"); console.log(result); } /** - * This sample demonstrates how to List hosts by zone in a cluster + * 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 + * @summary list hosts by zone in a cluster + * x-ms-original-file: 2024-09-01/Clusters_ListZones_Stretched.json */ async function clustersListZonesStretched(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.clusters.listZones("group1", "cloud1", "cluster1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts index 101e6f4036bc..2b0d23be40f7 100644 --- a/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/clustersUpdateSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { ClusterUpdate } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update a Cluster + * 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 + * @summary update a Cluster + * x-ms-original-file: 2024-09-01/Clusters_Update.json */ async function clustersUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.clusters.update("group1", "cloud1", "cluster1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts index 224b69a3d349..8121c2fd1bea 100644 --- a/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/datastoresCreateOrUpdateSample.ts @@ -1,41 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { Datastore } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a Datastore + * 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 + * @summary create a Datastore + * x-ms-original-file: 2024-09-01/Datastores_CreateOrUpdate.json */ async function datastoresCreateOrUpdate(): Promise { - 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, + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.datastores.createOrUpdate( + "group1", + "cloud1", + "cluster1", + "datastore1", ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts index abd86558aff4..55304a3927e4 100644 --- a/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/datastoresDeleteSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a Datastore + * 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 + * @summary delete a Datastore + * x-ms-original-file: 2024-09-01/Datastores_Delete.json */ async function datastoresDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.datastores.delete("group1", "cloud1", "cluster1", "datastore1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts index 0287140f2bc6..28e5afb5ecbf 100644 --- a/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/datastoresGetSample.ts @@ -1,35 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a Datastore + * 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 + * @summary get a Datastore + * x-ms-original-file: 2024-09-01/Datastores_Get.json */ async function datastoresGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.datastores.get("group1", "cloud1", "cluster1", "datastore1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts b/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts index 97e0febc0ac1..42d067ca2daf 100644 --- a/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/datastoresListSample.ts @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List Datastore resources by Cluster + * 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 + * @summary list Datastore resources by Cluster + * x-ms-original-file: 2024-09-01/Datastores_List.json */ async function datastoresList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.datastores.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { + for await (const item of client.datastores.list("group1", "cloud1", "cluster1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts index 13fff5583907..dcbe73f80d0f 100644 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsCreateOrUpdateSample.ts @@ -1,39 +1,23 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { GlobalReachConnection } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a GlobalReachConnection + * 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 + * @summary create a GlobalReachConnection + * x-ms-original-file: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json */ async function globalReachConnectionsCreateOrUpdate(): Promise { - 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, + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.globalReachConnections.createOrUpdate( + "group1", + "cloud1", + "connection1", ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts index 95f208e72f09..996873f43724 100644 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a GlobalReachConnection + * 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 + * @summary delete a GlobalReachConnection + * x-ms-original-file: 2024-09-01/GlobalReachConnections_Delete.json */ async function globalReachConnectionsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.globalReachConnections.delete("group1", "cloud1", "connection1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts index 3bc96ef7ec50..a77d76cd2779 100644 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsGetSample.ts @@ -1,33 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a GlobalReachConnection + * 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 + * @summary get a GlobalReachConnection + * x-ms-original-file: 2024-09-01/GlobalReachConnections_Get.json */ async function globalReachConnectionsGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.globalReachConnections.get("group1", "cloud1", "connection1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts index 87b1e7df8c7d..76256b9cd80b 100644 --- a/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/globalReachConnectionsListSample.ts @@ -1,34 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List GlobalReachConnection resources by PrivateCloud + * 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 + * @summary list GlobalReachConnection resources by PrivateCloud + * x-ms-original-file: 2024-09-01/GlobalReachConnections_List.json */ async function globalReachConnectionsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.globalReachConnections.list( - resourceGroupName, - privateCloudName, - )) { + for await (const item of client.globalReachConnections.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts index cec28a21d4a2..e4d66783a8b3 100644 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesCreateOrUpdateSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { HcxEnterpriseSite } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a HcxEnterpriseSite + * 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 + * @summary create a HcxEnterpriseSite + * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ async function hcxEnterpriseSitesCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.hcxEnterpriseSites.createOrUpdate("group1", "cloud1", "site1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts index fab5dd186c4b..2944d0cdef5d 100644 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a HcxEnterpriseSite + * 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 + * @summary delete a HcxEnterpriseSite + * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Delete.json */ async function hcxEnterpriseSitesDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.hcxEnterpriseSites.delete("group1", "cloud1", "site1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts index 49aea6f10370..34556efa623e 100644 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesGetSample.ts @@ -1,33 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a HcxEnterpriseSite + * 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 + * @summary get a HcxEnterpriseSite + * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_Get.json */ async function hcxEnterpriseSitesGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.hcxEnterpriseSites.get("group1", "cloud1", "site1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts index 1eb272e7eeaa..dcc53dca11b0 100644 --- a/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/hcxEnterpriseSitesListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List HcxEnterpriseSite resources by PrivateCloud + * 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 + * @summary list HcxEnterpriseSite resources by PrivateCloud + * x-ms-original-file: 2024-09-01/HcxEnterpriseSites_List.json */ async function hcxEnterpriseSitesList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.hcxEnterpriseSites.list(resourceGroupName, privateCloudName)) { + for await (const item of client.hcxEnterpriseSites.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/hostsGetSample.ts b/sdk/avs/arm-avs/samples-dev/hostsGetSample.ts new file mode 100644 index 000000000000..d0d8e53feb69 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/hostsGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a Host + * + * @summary get a Host + * x-ms-original-file: 2024-09-01/Hosts_Get.json + */ +async function hostsGet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.hosts.get( + "group1", + "cloud1", + "cluster1", + "esx03-r52.1111111111111111111.westcentralus.prod.azure.com", + ); + console.log(result); +} + +async function main(): Promise { + await hostsGet(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/hostsListSample.ts b/sdk/avs/arm-avs/samples-dev/hostsListSample.ts new file mode 100644 index 000000000000..8d417d6ecdab --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/hostsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list Host resources by Cluster + * + * @summary list Host resources by Cluster + * x-ms-original-file: 2024-09-01/Hosts_List.json + */ +async function hostsList(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.hosts.list("group1", "cloud1", "cluster1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await hostsList(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts index bee4195fb46a..165af7340c5d 100644 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/iscsiPathsCreateOrUpdateSample.ts @@ -1,34 +1,22 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { IscsiPath } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a IscsiPath + * 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 + * @summary create a IscsiPath + * x-ms-original-file: 2024-09-01/IscsiPaths_CreateOrUpdate.json */ async function iscsiPathsCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.iscsiPaths.createOrUpdate("group1", "cloud1", { + properties: { networkBlock: "192.168.0.0/24" }, + }); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts index dae4032ac98d..108b596dc982 100644 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/iscsiPathsDeleteSample.ts @@ -1,29 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a IscsiPath + * 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 + * @summary delete a IscsiPath + * x-ms-original-file: 2024-09-01/IscsiPaths_Delete.json */ async function iscsiPathsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.iscsiPaths.delete("group1", "cloud1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts index bc90a2d09a69..5cb5dff387a6 100644 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/iscsiPathsGetSample.ts @@ -1,28 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a IscsiPath + * 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 + * @summary get a IscsiPath + * x-ms-original-file: 2024-09-01/IscsiPaths_Get.json */ async function iscsiPathsGet(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.iscsiPaths.get("group1", "cloud1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts b/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts index b7087d328c6e..ab43fff8b2d7 100644 --- a/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts +++ b/sdk/avs/arm-avs/samples-dev/iscsiPathsListByPrivateCloudSample.ts @@ -1,34 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List IscsiPath resources by PrivateCloud + * 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 + * @summary list IscsiPath resources by PrivateCloud + * x-ms-original-file: 2024-09-01/IscsiPaths_List.json */ async function iscsiPathsListByPrivateCloud(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.iscsiPaths.listByPrivateCloud( - resourceGroupName, - privateCloudName, - )) { + for await (const item of client.iscsiPaths.listByPrivateCloud("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts b/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts index 7ef88ab957b5..73236c98175a 100644 --- a/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts +++ b/sdk/avs/arm-avs/samples-dev/locationsCheckQuotaAvailabilitySample.ts @@ -1,27 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Return quota for subscription by region + * 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 + * @summary return quota for subscription by region + * x-ms-original-file: 2024-09-01/Locations_CheckQuotaAvailability.json */ async function locationsCheckQuotaAvailability(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.locations.checkQuotaAvailability("eastus"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts b/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts index f0888079520a..2ac9072c96df 100644 --- a/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts +++ b/sdk/avs/arm-avs/samples-dev/locationsCheckTrialAvailabilitySample.ts @@ -1,46 +1,36 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { Sku, LocationsCheckTrialAvailabilityOptionalParams } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Return trial status for subscription by region + * 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 + * @summary return trial status for subscription by region + * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailability.json */ async function locationsCheckTrialAvailability(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.locations.checkTrialAvailability("eastus"); console.log(result); } /** - * This sample demonstrates how to Return trial status for subscription by region + * 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 + * @summary return trial status for subscription by region + * x-ms-original-file: 2024-09-01/Locations_CheckTrialAvailabilityWithSku.json */ async function locationsCheckTrialAvailabilityWithSku(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.locations.checkTrialAvailability("eastus", { + sku: { name: "avs52t" }, + }); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/operationsListSample.ts b/sdk/avs/arm-avs/samples-dev/operationsListSample.ts index 0bfc90af3ba1..d48719a885bd 100644 --- a/sdk/avs/arm-avs/samples-dev/operationsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/operationsListSample.ts @@ -1,29 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List the operations for the provider + * 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 + * @summary list the operations for the provider + * x-ms-original-file: 2024-09-01/Operations_List.json */ async function operationsList(): Promise { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts index de1eb84dc90e..5832abf3498e 100644 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/placementPoliciesCreateOrUpdateSample.ts @@ -1,53 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { PlacementPolicy } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a PlacementPolicy + * 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 + * @summary create a PlacementPolicy + * x-ms-original-file: 2024-09-01/PlacementPolicies_CreateOrUpdate.json */ async function placementPoliciesCreateOrUpdate(): Promise { - 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, + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.placementPolicies.createOrUpdate( + "group1", + "cloud1", + "cluster1", + "policy1", ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts index ff661d28ab06..19e657d00ceb 100644 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/placementPoliciesDeleteSample.ts @@ -1,36 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a PlacementPolicy + * 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 + * @summary delete a PlacementPolicy + * x-ms-original-file: 2024-09-01/PlacementPolicies_Delete.json */ async function placementPoliciesDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.placementPolicies.delete("group1", "cloud1", "cluster1", "policy1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts index d7fc9d015a2b..5589ce239418 100644 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/placementPoliciesGetSample.ts @@ -1,35 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a PlacementPolicy + * 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 + * @summary get a PlacementPolicy + * x-ms-original-file: 2024-09-01/PlacementPolicies_Get.json */ async function placementPoliciesGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.placementPolicies.get("group1", "cloud1", "cluster1", "policy1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts index 5fbcfe049b1d..e454202d81ab 100644 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/placementPoliciesListSample.ts @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List PlacementPolicy resources by Cluster + * 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 + * @summary list PlacementPolicy resources by Cluster + * x-ms-original-file: 2024-09-01/PlacementPolicies_List.json */ async function placementPoliciesList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.placementPolicies.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { + for await (const item of client.placementPolicies.list("group1", "cloud1", "cluster1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts index 14ab7afd8d6b..7cde205bcb0d 100644 --- a/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/placementPoliciesUpdateSample.ts @@ -1,52 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { PlacementPolicyUpdate } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update a PlacementPolicy + * 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 + * @summary update a PlacementPolicy + * x-ms-original-file: 2024-09-01/PlacementPolicies_Update.json */ async function placementPoliciesUpdate(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.placementPolicies.update("group1", "cloud1", "cluster1", "policy1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts index 5f99af0425f5..3e3793963ab7 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsCreateOrUpdateSample.ts @@ -1,76 +1,70 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { PrivateCloud } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a PrivateCloud + * 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 + * @summary create a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate.json */ async function privateCloudsCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.createOrUpdate("group1", "cloud1"); console.log(result); } /** - * This sample demonstrates how to Create a PrivateCloud + * 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 + * @summary create a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json + */ +async function privateCloudsCreateOrUpdateFleetNative(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.createOrUpdate("group1", "cloud1"); + console.log(result); +} + +/** + * This sample demonstrates how to create a PrivateCloud + * + * @summary create a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_Stretched.json */ async function privateCloudsCreateOrUpdateStretched(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.createOrUpdate("group1", "cloud1"); + console.log(result); +} + +/** + * This sample demonstrates how to create a PrivateCloud + * + * @summary create a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json + */ +async function privateCloudsCreateOrUpdateStretchedZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.createOrUpdate("group1", "cloud1"); console.log(result); } async function main(): Promise { await privateCloudsCreateOrUpdate(); + await privateCloudsCreateOrUpdateFleetNative(); await privateCloudsCreateOrUpdateStretched(); + await privateCloudsCreateOrUpdateStretchedZones(); } main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts index f7a45300ad4c..2643a0e17e69 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsDeleteSample.ts @@ -1,29 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a PrivateCloud + * 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 + * @summary delete a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_Delete.json */ async function privateCloudsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.privateClouds.delete("group1", "cloud1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts index ce81e5ecb29e..c5d7a8cbb11e 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsGetSample.ts @@ -1,45 +1,34 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a PrivateCloud + * 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 + * @summary get a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_Get.json */ async function privateCloudsGet(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.get("group1", "cloud1"); console.log(result); } /** - * This sample demonstrates how to Get a PrivateCloud + * 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 + * @summary get a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_Get_Stretched.json */ async function privateCloudsGetStretched(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.get("group1", "cloud1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts index e15e346ad6b2..d3b67aafacaa 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsListAdminCredentialsSample.ts @@ -1,31 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List the admin credentials for the private cloud + * 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 + * @summary list the admin credentials for the private cloud + * x-ms-original-file: 2024-09-01/PrivateClouds_ListAdminCredentials.json */ async function privateCloudsListAdminCredentials(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.listAdminCredentials("group1", "cloud1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts index 376b552f667e..ba79251a4cff 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsListInSubscriptionSample.ts @@ -1,47 +1,42 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List PrivateCloud resources by subscription ID + * 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 + * @summary list PrivateCloud resources by subscription ID + * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription.json */ async function privateCloudsListInSubscription(): Promise { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateClouds.listInSubscription()) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to List PrivateCloud resources by subscription ID + * 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 + * @summary list PrivateCloud resources by subscription ID + * x-ms-original-file: 2024-09-01/PrivateClouds_ListInSubscription_Stretched.json */ async function privateCloudsListInSubscriptionStretched(): Promise { - const subscriptionId = - process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.privateClouds.listInSubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts index af9a0c4fe77b..6531b1378a93 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsListSample.ts @@ -1,49 +1,42 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List PrivateCloud resources by resource group + * 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 + * @summary list PrivateCloud resources by resource group + * x-ms-original-file: 2024-09-01/PrivateClouds_List.json */ async function privateCloudsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateClouds.list(resourceGroupName)) { + for await (const item of client.privateClouds.list("group1")) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to List PrivateCloud resources by resource group + * 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 + * @summary list PrivateCloud resources by resource group + * x-ms-original-file: 2024-09-01/PrivateClouds_List_Stretched.json */ async function privateCloudsListStretched(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateClouds.list(resourceGroupName)) { + for await (const item of client.privateClouds.list("group1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts index 446639b424d7..1d901bc58735 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateNsxtPasswordSample.ts @@ -1,32 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Rotate the NSX-T Manager password + * 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 + * @summary rotate the NSX-T Manager password + * x-ms-original-file: 2024-09-01/PrivateClouds_RotateNsxtPassword.json */ async function privateCloudsRotateNsxtPassword(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.privateClouds.rotateNsxtPassword("group1", "cloud1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts index 5820c8ff0f3c..df0a9e24a0ec 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsRotateVcenterPasswordSample.ts @@ -1,32 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Rotate the vCenter password + * 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 + * @summary rotate the vCenter password + * x-ms-original-file: 2024-09-01/PrivateClouds_RotateVcenterPassword.json */ async function privateCloudsRotateVcenterPassword(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.privateClouds.rotateVcenterPassword("group1", "cloud1"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts index c7c8e3a9225a..ebe405f86bf6 100644 --- a/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/privateCloudsUpdateSample.ts @@ -1,69 +1,34 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { PrivateCloudUpdate } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update a PrivateCloud + * 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 + * @summary update a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_Update.json */ async function privateCloudsUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.update("group1", "cloud1"); console.log(result); } /** - * This sample demonstrates how to Update a PrivateCloud + * 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 + * @summary update a PrivateCloud + * x-ms-original-file: 2024-09-01/PrivateClouds_Update_Stretched.json */ async function privateCloudsUpdateStretched(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.privateClouds.update("group1", "cloud1"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/provisionedNetworksGetSample.ts b/sdk/avs/arm-avs/samples-dev/provisionedNetworksGetSample.ts new file mode 100644 index 000000000000..57c76fd70716 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/provisionedNetworksGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a ProvisionedNetwork + * + * @summary get a ProvisionedNetwork + * x-ms-original-file: 2024-09-01/ProvisionedNetworks_Get.json + */ +async function provisionedNetworksGet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.provisionedNetworks.get("group1", "cloud1", "vsan"); + console.log(result); +} + +async function main(): Promise { + await provisionedNetworksGet(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/provisionedNetworksListSample.ts b/sdk/avs/arm-avs/samples-dev/provisionedNetworksListSample.ts new file mode 100644 index 000000000000..3b6b860e1145 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/provisionedNetworksListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list ProvisionedNetwork resources by PrivateCloud + * + * @summary list ProvisionedNetwork resources by PrivateCloud + * x-ms-original-file: 2024-09-01/ProvisionedNetworks_List.json + */ +async function provisionedNetworksList(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.provisionedNetworks.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await provisionedNetworksList(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6952d9765b49 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a PureStoragePolicy + * + * @summary create a PureStoragePolicy + * x-ms-original-file: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json + */ +async function pureStoragePoliciesCreateOrUpdate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.pureStoragePolicies.createOrUpdate( + "group1", + "cloud1", + "storagePolicy1", + { + properties: { + storagePolicyDefinition: "storagePolicyDefinition1", + storagePoolId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await pureStoragePoliciesCreateOrUpdate(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesDeleteSample.ts new file mode 100644 index 000000000000..cdc14d13959d --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a PureStoragePolicy + * + * @summary delete a PureStoragePolicy + * x-ms-original-file: 2024-09-01/PureStoragePolicies_Delete.json + */ +async function pureStoragePoliciesDelete(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.pureStoragePolicies.delete("group1", "cloud1", "storagePolicy1"); +} + +async function main(): Promise { + await pureStoragePoliciesDelete(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesGetSample.ts b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesGetSample.ts new file mode 100644 index 000000000000..81059eb7c195 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a PureStoragePolicy + * + * @summary get a PureStoragePolicy + * x-ms-original-file: 2024-09-01/PureStoragePolicies_Get.json + */ +async function pureStoragePoliciesGet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.pureStoragePolicies.get("group1", "cloud1", "storagePolicy1"); + console.log(result); +} + +async function main(): Promise { + await pureStoragePoliciesGet(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesListSample.ts b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesListSample.ts new file mode 100644 index 000000000000..cf93478def1c --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/pureStoragePoliciesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list PureStoragePolicy resources by PrivateCloud + * + * @summary list PureStoragePolicy resources by PrivateCloud + * x-ms-original-file: 2024-09-01/PureStoragePolicies_List.json + */ +async function pureStoragePoliciesList(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.pureStoragePolicies.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await pureStoragePoliciesList(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts index 82a60a9d34c6..bc0a79e11092 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptCmdletsGetSample.ts @@ -1,34 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a ScriptCmdlet + * 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 + * @summary get a ScriptCmdlet + * x-ms-original-file: 2024-09-01/ScriptCmdlets_Get.json */ async function scriptCmdletsGet(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const result = await client.scriptCmdlets.get( - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, + "group1", + "cloud1", + "package@1.0.2", + "New-ExternalSsoDomain", ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts index 0d4156002ef2..6054ec2f313c 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptCmdletsListSample.ts @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List ScriptCmdlet resources by ScriptPackage + * 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 + * @summary list ScriptCmdlet resources by ScriptPackage + * x-ms-original-file: 2024-09-01/ScriptCmdlets_List.json */ async function scriptCmdletsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.scriptCmdlets.list( - resourceGroupName, - privateCloudName, - scriptPackageName, - )) { + for await (const item of client.scriptCmdlets.list("group1", "cloud1", "package@1.0.2")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts index a3ad4bb3c125..4eb82b0dd377 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptExecutionsCreateOrUpdateSample.ts @@ -1,56 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { ScriptExecution } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a ScriptExecution + * 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 + * @summary create a ScriptExecution + * x-ms-original-file: 2024-09-01/ScriptExecutions_CreateOrUpdate.json */ async function scriptExecutionsCreateOrUpdate(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.scriptExecutions.createOrUpdate("group1", "cloud1", "addSsoServer"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts index b0d4763ddf66..b5e7cbf25845 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptExecutionsDeleteSample.ts @@ -1,34 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete a ScriptExecution + * 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 + * @summary delete a ScriptExecution + * x-ms-original-file: 2024-09-01/ScriptExecutions_Delete.json */ async function scriptExecutionsDelete(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.scriptExecutions.delete("group1", "cloud1", "addSsoServer"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts index 19fe2630fbb0..2747bc31453d 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetExecutionLogsSample.ts @@ -1,46 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - ScriptOutputStreamType, - ScriptExecutionsGetExecutionLogsOptionalParams, -} from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Return the logs for a script execution resource + * 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 + * @summary return the logs for a script execution resource + * x-ms-original-file: 2024-09-01/ScriptExecutions_GetExecutionLogs.json */ async function scriptExecutionsGetExecutionLogs(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const result = await client.scriptExecutions.getExecutionLogs( - resourceGroupName, - privateCloudName, - scriptExecutionName, - options, + "group1", + "cloud1", + "addSsoServer", + { scriptOutputStreamType: ["Information", "Warnings", "Errors", "Output"] }, ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts index 27ee9e5e5a5f..90437480a276 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptExecutionsGetSample.ts @@ -1,33 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a ScriptExecution + * 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 + * @summary get a ScriptExecution + * x-ms-original-file: 2024-09-01/ScriptExecutions_Get.json */ async function scriptExecutionsGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.scriptExecutions.get("group1", "cloud1", "addSsoServer"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts index bb7bdc1c76a4..8afbe9e9f953 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptExecutionsListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List ScriptExecution resources by PrivateCloud + * 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 + * @summary list ScriptExecution resources by PrivateCloud + * x-ms-original-file: 2024-09-01/ScriptExecutions_List.json */ async function scriptExecutionsList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.scriptExecutions.list(resourceGroupName, privateCloudName)) { + for await (const item of client.scriptExecutions.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts b/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts index e22ab18449a7..e41dc4216f4e 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptPackagesGetSample.ts @@ -1,32 +1,23 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a ScriptPackage + * 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 + * @summary get a ScriptPackage + * x-ms-original-file: 2024-09-01/ScriptPackages_Get.json */ async function scriptPackagesGet(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const result = await client.scriptPackages.get( - resourceGroupName, - privateCloudName, - scriptPackageName, + "group1", + "cloud1", + "Microsoft.AVS.Management@3.0.48", ); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts b/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts index ddd30ac3931a..7bc8a14e94d0 100644 --- a/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/scriptPackagesListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List ScriptPackage resources by PrivateCloud + * 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 + * @summary list ScriptPackage resources by PrivateCloud + * x-ms-original-file: 2024-09-01/ScriptPackages_List.json */ async function scriptPackagesList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.scriptPackages.list(resourceGroupName, privateCloudName)) { + for await (const item of client.scriptPackages.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/skusListSample.ts b/sdk/avs/arm-avs/samples-dev/skusListSample.ts new file mode 100644 index 000000000000..2824e3a203dc --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/skusListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to a list of SKUs. + * + * @summary a list of SKUs. + * x-ms-original-file: 2024-09-01/Skus_List.json + */ +async function skusList(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.skus.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await skusList(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts index b998e8a88f48..5d27e3a216d7 100644 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/virtualMachinesGetSample.ts @@ -1,35 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a VirtualMachine + * 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 + * @summary get a VirtualMachine + * x-ms-original-file: 2024-09-01/VirtualMachines_Get.json */ async function virtualMachinesGet(): Promise { - 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, - ); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.virtualMachines.get("group1", "cloud1", "cluster1", "vm-209"); console.log(result); } diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts index 95073f4c4d08..c3f9e6346d08 100644 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/virtualMachinesListSample.ts @@ -1,36 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List VirtualMachine resources by Cluster + * 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 + * @summary list VirtualMachine resources by Cluster + * x-ms-original-file: 2024-09-01/VirtualMachines_List.json */ async function virtualMachinesList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualMachines.list( - resourceGroupName, - privateCloudName, - clusterName, - )) { + for await (const item of client.virtualMachines.list("group1", "cloud1", "cluster1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts b/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts index a27680da8bd2..44d39d074c97 100644 --- a/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts +++ b/sdk/avs/arm-avs/samples-dev/virtualMachinesRestrictMovementSample.ts @@ -1,41 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { VirtualMachineRestrictMovement } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Enable or disable DRS-driven VM movement restriction + * 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 + * @summary enable or disable DRS-driven VM movement restriction + * x-ms-original-file: 2024-09-01/VirtualMachines_RestrictMovement.json */ async function virtualMachinesRestrictMovement(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.virtualMachines.restrictMovement("group1", "cloud1", "cluster1", "vm-209"); } async function main(): Promise { diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsCreateSample.ts new file mode 100644 index 000000000000..d06df8c824f3 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkDhcp + * + * @summary create a WorkloadNetworkDhcp + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDhcp.json + */ +async function workloadNetworksCreateDhcp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDhcpConfigurations.create("group1", "cloud1", "dhcp1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreateDhcp(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsDeleteSample.ts new file mode 100644 index 000000000000..83b7209ab46d --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkDhcp + * + * @summary delete a WorkloadNetworkDhcp + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDhcp.json + */ +async function workloadNetworksDeleteDhcp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkDhcpConfigurations.delete("group1", "cloud1", "dhcp1"); +} + +async function main(): Promise { + await workloadNetworksDeleteDhcp(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsGetSample.ts new file mode 100644 index 000000000000..ebf26c4de7b3 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkDhcp + * + * @summary get a WorkloadNetworkDhcp + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDhcp.json + */ +async function workloadNetworksGetDhcp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDhcpConfigurations.get("group1", "dhcp1", "cloud1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetDhcp(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsListSample.ts new file mode 100644 index 000000000000..a1db4c761887 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkDhcp resources by WorkloadNetwork + * + * @summary list WorkloadNetworkDhcp resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDhcp.json + */ +async function workloadNetworksListDhcp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkDhcpConfigurations.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListDhcp(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsUpdateSample.ts new file mode 100644 index 000000000000..2b33b4642447 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDhcpConfigurationsUpdateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkDhcp + * + * @summary update a WorkloadNetworkDhcp + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDhcp.json + */ +async function workloadNetworksUpdateDhcp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDhcpConfigurations.update("group1", "cloud1", "dhcp1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdateDhcp(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesCreateSample.ts new file mode 100644 index 000000000000..cb92fe300788 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkDnsService + * + * @summary create a WorkloadNetworkDnsService + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsService.json + */ +async function workloadNetworksCreateDnsService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsServices.create("group1", "cloud1", "dnsService1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreateDnsService(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesDeleteSample.ts new file mode 100644 index 000000000000..392623bd3cb3 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkDnsService + * + * @summary delete a WorkloadNetworkDnsService + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsService.json + */ +async function workloadNetworksDeleteDnsService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkDnsServices.delete("group1", "dnsService1", "cloud1"); +} + +async function main(): Promise { + await workloadNetworksDeleteDnsService(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesGetSample.ts new file mode 100644 index 000000000000..65b84c2133e7 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkDnsService + * + * @summary get a WorkloadNetworkDnsService + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsService.json + */ +async function workloadNetworksGetDnsService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsServices.get("group1", "cloud1", "dnsService1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetDnsService(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesListSample.ts new file mode 100644 index 000000000000..eb8a2d6b206c --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkDnsService resources by WorkloadNetwork + * + * @summary list WorkloadNetworkDnsService resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsServices.json + */ +async function workloadNetworksListDnsServices(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkDnsServices.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListDnsServices(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesUpdateSample.ts new file mode 100644 index 000000000000..f66239fcdad2 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsServicesUpdateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkDnsService + * + * @summary update a WorkloadNetworkDnsService + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsService.json + */ +async function workloadNetworksUpdateDnsService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsServices.update("group1", "cloud1", "dnsService1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdateDnsService(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesCreateSample.ts new file mode 100644 index 000000000000..b329618497ac --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkDnsZone + * + * @summary create a WorkloadNetworkDnsZone + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateDnsZone.json + */ +async function workloadNetworksCreateDnsZone(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsZones.create("group1", "cloud1", "dnsZone1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreateDnsZone(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesDeleteSample.ts new file mode 100644 index 000000000000..3ff1016eab72 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkDnsZone + * + * @summary delete a WorkloadNetworkDnsZone + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json + */ +async function workloadNetworksDeleteDnsZone(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkDnsZones.delete("group1", "dnsZone1", "cloud1"); +} + +async function main(): Promise { + await workloadNetworksDeleteDnsZone(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesGetSample.ts new file mode 100644 index 000000000000..1d63e6738e5b --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkDnsZone + * + * @summary get a WorkloadNetworkDnsZone + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetDnsZone.json + */ +async function workloadNetworksGetDnsZone(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsZones.get("group1", "cloud1", "dnsZone1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetDnsZone(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesListSample.ts new file mode 100644 index 000000000000..e902fccbab38 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkDnsZone resources by WorkloadNetwork + * + * @summary list WorkloadNetworkDnsZone resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListDnsZones.json + */ +async function workloadNetworksListDnsZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkDnsZones.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListDnsZones(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesUpdateSample.ts new file mode 100644 index 000000000000..0b70817a9a70 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkDnsZonesUpdateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkDnsZone + * + * @summary update a WorkloadNetworkDnsZone + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json + */ +async function workloadNetworksUpdateDnsZone(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkDnsZones.update("group1", "cloud1", "dnsZone1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdateDnsZone(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysGetSample.ts new file mode 100644 index 000000000000..7b16e4df1879 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkGateway + * + * @summary get a WorkloadNetworkGateway + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetGateway.json + */ +async function workloadNetworksGetGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkGateways.get("group1", "cloud1", "gateway1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetGateway(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysListSample.ts new file mode 100644 index 000000000000..ac61ea458a80 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkGatewaysListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkGateway resources by WorkloadNetwork + * + * @summary list WorkloadNetworkGateway resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListGateways.json + */ +async function workloadNetworksListGateways(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkGateways.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListGateways(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesCreateSample.ts new file mode 100644 index 000000000000..50b8ff3ef895 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesCreateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkPortMirroring + * + * @summary create a WorkloadNetworkPortMirroring + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json + */ +async function workloadNetworksCreatePortMirroring(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkPortMirroringProfiles.create( + "group1", + "cloud1", + "portMirroring1", + ); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreatePortMirroring(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesDeleteSample.ts new file mode 100644 index 000000000000..77bee697c79f --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkPortMirroring + * + * @summary delete a WorkloadNetworkPortMirroring + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json + */ +async function workloadNetworksDeletePortMirroring(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkPortMirroringProfiles.delete("group1", "portMirroring1", "cloud1"); +} + +async function main(): Promise { + await workloadNetworksDeletePortMirroring(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesGetSample.ts new file mode 100644 index 000000000000..03b236038591 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkPortMirroring + * + * @summary get a WorkloadNetworkPortMirroring + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPortMirroring.json + */ +async function workloadNetworksGetPortMirroring(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkPortMirroringProfiles.get( + "group1", + "cloud1", + "portMirroring1", + ); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetPortMirroring(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesListSample.ts new file mode 100644 index 000000000000..e962e49d2e71 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkPortMirroring resources by WorkloadNetwork + * + * @summary list WorkloadNetworkPortMirroring resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPortMirroring.json + */ +async function workloadNetworksListPortMirroring(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkPortMirroringProfiles.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListPortMirroring(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesUpdateSample.ts new file mode 100644 index 000000000000..eb6e98bd9fc4 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPortMirroringProfilesUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkPortMirroring + * + * @summary update a WorkloadNetworkPortMirroring + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json + */ +async function workloadNetworksUpdatePortMirroring(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkPortMirroringProfiles.update( + "group1", + "cloud1", + "portMirroring1", + ); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdatePortMirroring(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsCreateSample.ts new file mode 100644 index 000000000000..f8a9cc4250a9 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkPublicIP + * + * @summary create a WorkloadNetworkPublicIP + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreatePublicIP.json + */ +async function workloadNetworksCreatePublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkPublicIps.create("group1", "cloud1", "publicIP1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreatePublicIP(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsDeleteSample.ts new file mode 100644 index 000000000000..75997da5dec3 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkPublicIP + * + * @summary delete a WorkloadNetworkPublicIP + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeletePublicIP.json + */ +async function workloadNetworksDeletePublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkPublicIps.delete("group1", "publicIP1", "cloud1"); +} + +async function main(): Promise { + await workloadNetworksDeletePublicIP(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsGetSample.ts new file mode 100644 index 000000000000..d679d14baf64 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkPublicIP + * + * @summary get a WorkloadNetworkPublicIP + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetPublicIP.json + */ +async function workloadNetworksGetPublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkPublicIps.get("group1", "cloud1", "publicIP1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetPublicIP(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsListSample.ts new file mode 100644 index 000000000000..045d57db3e6c --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkPublicIpsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkPublicIP resources by WorkloadNetwork + * + * @summary list WorkloadNetworkPublicIP resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListPublicIPs.json + */ +async function workloadNetworksListPublicIPs(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkPublicIps.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListPublicIPs(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsCreateSample.ts new file mode 100644 index 000000000000..54fdfba96ebd --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkSegment + * + * @summary create a WorkloadNetworkSegment + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateSegments.json + */ +async function workloadNetworksCreateSegments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkSegments.create("group1", "cloud1", "segment1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreateSegments(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsDeleteSegmentSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsDeleteSegmentSample.ts new file mode 100644 index 000000000000..8e0a77aa155c --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsDeleteSegmentSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkSegment + * + * @summary delete a WorkloadNetworkSegment + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteSegment.json + */ +async function workloadNetworksDeleteSegment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkSegments.deleteSegment("group1", "cloud1", "segment1"); +} + +async function main(): Promise { + await workloadNetworksDeleteSegment(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsGetSample.ts new file mode 100644 index 000000000000..e4c0a8b114d2 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkSegment + * + * @summary get a WorkloadNetworkSegment + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetSegment.json + */ +async function workloadNetworksGetSegment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkSegments.get("group1", "cloud1", "segment1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetSegment(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsListSample.ts new file mode 100644 index 000000000000..49291b595b2d --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkSegment resources by WorkloadNetwork + * + * @summary list WorkloadNetworkSegment resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListSegments.json + */ +async function workloadNetworksListSegments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkSegments.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListSegments(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsUpdateSample.ts new file mode 100644 index 000000000000..4ce13efeb52d --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkSegmentsUpdateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkSegment + * + * @summary update a WorkloadNetworkSegment + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateSegments.json + */ +async function workloadNetworksUpdateSegments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkSegments.update("group1", "cloud1", "segment1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdateSegments(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesGetSample.ts new file mode 100644 index 000000000000..594e9ab83c3d --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkVirtualMachine + * + * @summary get a WorkloadNetworkVirtualMachine + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json + */ +async function workloadNetworksGetVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkVirtualMachines.get("group1", "cloud1", "vm1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesListSample.ts new file mode 100644 index 000000000000..0145007b69aa --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVirtualMachinesListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkVirtualMachine resources by WorkloadNetwork + * + * @summary list WorkloadNetworkVirtualMachine resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json + */ +async function workloadNetworksListVirtualMachines(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkVirtualMachines.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListVirtualMachines(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsCreateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsCreateSample.ts new file mode 100644 index 000000000000..8c6bcb6153cd --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsCreateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a WorkloadNetworkVMGroup + * + * @summary create a WorkloadNetworkVMGroup + * x-ms-original-file: 2024-09-01/WorkloadNetworks_CreateVMGroup.json + */ +async function workloadNetworksCreateVMGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkVmGroups.create("group1", "cloud1", "vmGroup1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksCreateVMGroup(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsDeleteSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsDeleteSample.ts new file mode 100644 index 000000000000..23263a099cea --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete a WorkloadNetworkVMGroup + * + * @summary delete a WorkloadNetworkVMGroup + * x-ms-original-file: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json + */ +async function workloadNetworksDeleteVMGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + await client.workloadNetworkVmGroups.delete("group1", "vmGroup1", "cloud1"); +} + +async function main(): Promise { + await workloadNetworksDeleteVMGroup(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsGetSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsGetSample.ts new file mode 100644 index 000000000000..3d9f855992fa --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a WorkloadNetworkVMGroup + * + * @summary get a WorkloadNetworkVMGroup + * x-ms-original-file: 2024-09-01/WorkloadNetworks_GetVMGroup.json + */ +async function workloadNetworksGetVMGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkVmGroups.get("group1", "cloud1", "vmGroup1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksGetVMGroup(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsListSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsListSample.ts new file mode 100644 index 000000000000..532a7457e25f --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list WorkloadNetworkVMGroup resources by WorkloadNetwork + * + * @summary list WorkloadNetworkVMGroup resources by WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_ListVMGroups.json + */ +async function workloadNetworksListVMGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workloadNetworkVmGroups.list("group1", "cloud1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await workloadNetworksListVMGroups(); +} + +main().catch(console.error); diff --git a/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsUpdateSample.ts b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsUpdateSample.ts new file mode 100644 index 000000000000..5d3d82d44d65 --- /dev/null +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworkVmGroupsUpdateSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update a WorkloadNetworkVMGroup + * + * @summary update a WorkloadNetworkVMGroup + * x-ms-original-file: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json + */ +async function workloadNetworksUpdateVMGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworkVmGroups.update("group1", "cloud1", "vmGroup1"); + console.log(result); +} + +async function main(): Promise { + await workloadNetworksUpdateVMGroup(); +} + +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 e25913c845e2..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDhcpSample.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. - */ -import type { WorkloadNetworkDhcp } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 33ce5c567f7a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsServiceSample.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 type { WorkloadNetworkDnsService } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 f4aade60b602..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateDnsZoneSample.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. - */ -import type { WorkloadNetworkDnsZone } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 15ac20f48021..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePortMirroringSample.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. - */ -import type { WorkloadNetworkPortMirroring } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 73dbfe2f6571..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreatePublicIPSample.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 type { WorkloadNetworkPublicIP } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 8ee2ad16266d..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateSegmentsSample.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. - */ -import type { WorkloadNetworkSegment } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 062736ed2a10..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksCreateVMGroupSample.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. - */ -import type { WorkloadNetworkVMGroup } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 65488eed0bb4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDhcpSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 a58fbc079ae4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsServiceSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 b9afc5fed2be..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteDnsZoneSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 9f48b26f2c49..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 f369c87b5e5f..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeletePublicIPSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 e741a9ba2b75..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteSegmentSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 d69d41128463..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksDeleteVMGroupSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 b46f6eef7432..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDhcpSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 24faf20465f3..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsServiceSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 2fbfb05156e7..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetDnsZoneSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 2968c4bc00f6..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetGatewaySample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 0648be49f7da..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 fa2024099cfc..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetPublicIPSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 index dbca46afe113..d77ae23e9d83 100644 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSample.ts +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSample.ts @@ -1,28 +1,20 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a WorkloadNetwork + * 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 + * @summary get a WorkloadNetwork + * x-ms-original-file: 2024-09-01/WorkloadNetworks_Get.json */ async function workloadNetworksGet(): Promise { - 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); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); + const result = await client.workloadNetworks.get("group1", "cloud1"); console.log(result); } 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 14cc41d7ea8a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetSegmentSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 c4686327ad76..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVMGroupSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 15995e52f276..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksGetVirtualMachineSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 95de51db7beb..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDhcpSample.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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listDhcp(resourceGroupName, privateCloudName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 67bbe29c505e..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsServicesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listDnsServices( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 2df9fa2d2276..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListDnsZonesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listDnsZones( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 36bbf0236b4e..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListGatewaysSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listGateways( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 3bd30de823c9..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listPortMirroring( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 6995877cb43a..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListPublicIPsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listPublicIPs( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 index 4c42c536eb62..f8f7516ec0f6 100644 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSample.ts +++ b/sdk/avs/arm-avs/samples-dev/workloadNetworksListSample.ts @@ -1,31 +1,24 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "@azure/arm-avs"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to List WorkloadNetwork resources by PrivateCloud + * 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 + * @summary list WorkloadNetwork resources by PrivateCloud + * x-ms-original-file: 2024-09-01/WorkloadNetworks_List.json */ async function workloadNetworksList(): Promise { - 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 subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workloadNetworks.list(resourceGroupName, privateCloudName)) { + for await (const item of client.workloadNetworks.list("group1", "cloud1")) { resArray.push(item); } + console.log(resArray); } 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 e85302c44d28..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListSegmentsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listSegments( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 64d2877b4772..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVMGroupsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listVMGroups( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 21ce91d25f01..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksListVirtualMachinesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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 (const item of client.workloadNetworks.listVirtualMachines( - resourceGroupName, - privateCloudName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await 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 b2d4a5690472..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDhcpSample.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 type { WorkloadNetworkDhcp } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 fb68c432c7d0..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsServiceSample.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 type { WorkloadNetworkDnsService } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 a0361e3e98fa..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateDnsZoneSample.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. - */ -import type { WorkloadNetworkDnsZone } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 85b0a354c864..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdatePortMirroringSample.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. - */ -import type { WorkloadNetworkPortMirroring } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 ad2a2a694fa4..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateSegmentsSample.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 type { WorkloadNetworkSegment } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 548ac03fc7d5..000000000000 --- a/sdk/avs/arm-avs/samples-dev/workloadNetworksUpdateVMGroupSample.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 type { WorkloadNetworkVMGroup } from "@azure/arm-avs"; -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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(): Promise { - 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(): Promise { - await 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 efaf71451614..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.8.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 deceb830fb0b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsCreateOrUpdateSample.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { Addon, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 c911d24b8d71..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 d645c0bf4d62..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsGetSample.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 823a495f4d85..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/addonsListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6ae792f2720a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsCreateOrUpdateSample.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 { - ExpressRouteAuthorization, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6e4ab2a2bae4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 3717a9e593d0..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 7744cf0b9b26..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/authorizationsListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9aaa9ee298a4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksCreateOrUpdateSample.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 { CloudLink, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ecc932144c8b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6e2736841c46..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 8c587396e9ef..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/cloudLinksListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 84402c30a01d..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersCreateOrUpdateSample.ts +++ /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. - */ -import { Cluster, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 cf886fcf9309..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9c9f68dcee1e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 8a73b06af74f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 617c962a7a69..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersListZonesSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 2e421890addd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/clustersUpdateSample.ts +++ /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. - */ -import { ClusterUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 80aefef90cf2..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresCreateOrUpdateSample.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. - */ -import { Datastore, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6e14528dc0b4..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresDeleteSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6b6e5cab6c97..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 48bfb2f1bdc7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/datastoresListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 b4f7464aa948..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsCreateOrUpdateSample.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. - */ -import { GlobalReachConnection, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 3f18d54aa0a0..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 65fb4821d0a9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6ae4950a1793..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/globalReachConnectionsListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 1a327d847df9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesCreateOrUpdateSample.ts +++ /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. - */ -import { HcxEnterpriseSite, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 efebbdf498dc..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 cb951cdb3c3a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 b239e3784699..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/hcxEnterpriseSitesListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 16ae237a5e49..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsCreateOrUpdateSample.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. - */ -import { IscsiPath, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 97d9c404ae22..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsDeleteSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6bcd5823eb24..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 05b5943fcd03..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/iscsiPathsListByPrivateCloudSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 deae8ab22044..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckQuotaAvailabilitySample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 a843a4442725..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/locationsCheckTrialAvailabilitySample.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. - */ -import { - Sku, - LocationsCheckTrialAvailabilityOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 d5638875c602..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/operationsListSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 16436c6fb345..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { PlacementPolicy, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 7f69016f7764..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesDeleteSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9fb4d40a9837..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 29bcf3913c35..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ddbf4b13d24c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/placementPoliciesUpdateSample.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. - */ -import { PlacementPolicyUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9160cc2a8f95..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsCreateOrUpdateSample.ts +++ /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. - */ -import { PrivateCloud, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 25dfbdfcf8b1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsDeleteSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 e1593dc73771..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsGetSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 b46db76acb98..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListAdminCredentialsSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5c7aa802cca6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListInSubscriptionSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 508198a78c6a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsListSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ef1de319c175..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateNsxtPasswordSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 46d6a2f4aeac..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsRotateVcenterPasswordSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 841e4a2f8e98..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/privateCloudsUpdateSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { PrivateCloudUpdate, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 47c6790ba622..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5d888c2f4665..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptCmdletsListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 42305fb9001c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsCreateOrUpdateSample.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. - */ -import { ScriptExecution, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5e14f9400529..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsDeleteSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 d2d0b836a9ee..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetExecutionLogsSample.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. - */ -import { - ScriptOutputStreamType, - ScriptExecutionsGetExecutionLogsOptionalParams, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 2329ae13ee81..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 4748aaadb29c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptExecutionsListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 924bff4d6a9e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesGetSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 e97c5e600cdb..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/scriptPackagesListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 af708e221f7c..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 bb54e7ae3d85..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 8e4ca28c6b41..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/virtualMachinesRestrictMovementSample.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 { - VirtualMachineRestrictMovement, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ebccd14a8442..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDhcpSample.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. - */ -import { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 acd145df2623..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsServiceSample.ts +++ /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. - */ -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 d993dfe0df20..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateDnsZoneSample.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. - */ -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 f9fd79bce173..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePortMirroringSample.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. - */ -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 386b209c6ae7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreatePublicIPSample.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. - */ -import { - WorkloadNetworkPublicIP, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ad688b27c945..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateSegmentsSample.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. - */ -import { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 fa33f45e7947..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksCreateVMGroupSample.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. - */ -import { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9ac1bd9010cd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDhcpSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 69c18a77a59e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsServiceSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 7887102ab928..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteDnsZoneSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 c1a810a108d1..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5526442a39b7..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeletePublicIPSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 c51d61ca7765..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteSegmentSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 e9ae9cd1f065..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksDeleteVMGroupSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 f6a2a6b7288b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDhcpSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 bd1eefd1671b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsServiceSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 53f61bee7306..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetDnsZoneSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 f9adabfbcc9f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetGatewaySample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 655905a5a2bd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 76c712df722a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetPublicIPSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 520908b78224..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSample.ts +++ /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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 cd7da0306578..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetSegmentSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 fee98a55082a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVMGroupSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 e17d956364c6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksGetVirtualMachineSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 ec80d4b404bd..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDhcpSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 07543c1a5fd9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsServicesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 42f8952bae70..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListDnsZonesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 9b14c85b7ad3..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListGatewaysSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 6b94d52f6182..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPortMirroringSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 1d37869405e9..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListPublicIPsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 2ddbc83c790e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 63fa4c8b2196..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListSegmentsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 379e6c46937b..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVMGroupsSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 40a03cc8af53..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksListVirtualMachinesSample.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. - */ -import { AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 b489f3f9f44a..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDhcpSample.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 { WorkloadNetworkDhcp, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 c4a7b4711afe..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsServiceSample.ts +++ /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. - */ -import { - WorkloadNetworkDnsService, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 04800e3afa58..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateDnsZoneSample.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. - */ -import { WorkloadNetworkDnsZone, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 2b57fa0cb52e..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdatePortMirroringSample.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. - */ -import { - WorkloadNetworkPortMirroring, - AzureVMwareSolutionAPI, -} from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5d11c547a02f..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateSegmentsSample.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 { WorkloadNetworkSegment, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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 5380103c36f6..000000000000 --- a/sdk/avs/arm-avs/samples/v6/typescript/src/workloadNetworksUpdateVMGroupSample.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 { WorkloadNetworkVMGroup, AzureVMwareSolutionAPI } from "@azure/arm-avs"; -import { DefaultAzureCredential } from "@azure/identity"; -import "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..88fea3884ce9 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/addons/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + AddonsDeleteOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsGetOptionalParams, + AddonsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/addons/operations.ts b/sdk/avs/arm-avs/src/api/addons/operations.ts new file mode 100644 index 000000000000..a3c5fe2b3c0f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/addons/operations.ts @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _AddonList, + _addonListDeserializer, + Addon, + addonSerializer, + addonDeserializer, +} from "../../models/models.js"; +import { + AddonsDeleteOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsGetOptionalParams, + AddonsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + addonName: addonName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Addon */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, addonName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options: AddonsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + addonName: addonName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: addonSerializer(addon), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return addonDeserializer(result.body); +} + +/** Create a Addon */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options: AddonsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Addon> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, privateCloudName, addonName, addon, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Addon>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + addonName: addonName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return addonDeserializer(result.body); +} + +/** Get a Addon */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options: AddonsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, addonName, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: AddonsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_AddonList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _addonListDeserializer(result.body); +} + +/** List Addon resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: AddonsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/addons/options.ts b/sdk/avs/arm-avs/src/api/addons/options.ts new file mode 100644 index 000000000000..b7b2e4bf0f04 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/addons/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AddonsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AddonsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AddonsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AddonsListOptionalParams extends OperationOptions {} 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..daa983a4e6d8 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/authorizations/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + AuthorizationsDeleteOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/authorizations/operations.ts b/sdk/avs/arm-avs/src/api/authorizations/operations.ts new file mode 100644 index 000000000000..ef2e36e9cfeb --- /dev/null +++ b/sdk/avs/arm-avs/src/api/authorizations/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ExpressRouteAuthorizationList, + _expressRouteAuthorizationListDeserializer, + ExpressRouteAuthorization, + expressRouteAuthorizationSerializer, + expressRouteAuthorizationDeserializer, +} from "../../models/models.js"; +import { + AuthorizationsDeleteOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + authorizationName: authorizationName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a ExpressRouteAuthorization */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, authorizationName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options: AuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + authorizationName: authorizationName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: expressRouteAuthorizationSerializer(authorization), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return expressRouteAuthorizationDeserializer(result.body); +} + +/** Create a ExpressRouteAuthorization */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options: AuthorizationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ExpressRouteAuthorization> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + authorizationName, + authorization, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, ExpressRouteAuthorization>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + authorizationName: authorizationName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return expressRouteAuthorizationDeserializer(result.body); +} + +/** Get a ExpressRouteAuthorization */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options: AuthorizationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + authorizationName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: AuthorizationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ExpressRouteAuthorizationList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _expressRouteAuthorizationListDeserializer(result.body); +} + +/** List ExpressRouteAuthorization resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: AuthorizationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/authorizations/options.ts b/sdk/avs/arm-avs/src/api/authorizations/options.ts new file mode 100644 index 000000000000..1da8cbe1ccdc --- /dev/null +++ b/sdk/avs/arm-avs/src/api/authorizations/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AuthorizationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AuthorizationsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/azureVMwareSolutionAPIContext.ts b/sdk/avs/arm-avs/src/api/azureVMwareSolutionAPIContext.ts new file mode 100644 index 000000000000..ad34680358ab --- /dev/null +++ b/sdk/avs/arm-avs/src/api/azureVMwareSolutionAPIContext.ts @@ -0,0 +1,68 @@ +// 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"; + +/** Azure VMware Solution API */ +export interface AzureVMwareSolutionAPIContext extends Client { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion: string; + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; +} + +/** Optional parameters for the client. */ +export interface AzureVMwareSolutionAPIClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Azure VMware Solution API */ +export function createAzureVMwareSolutionAPI( + credential: TokenCredential, + subscriptionId: string, + options: AzureVMwareSolutionAPIClientOptionalParams = {}, +): AzureVMwareSolutionAPIContext { + 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 ?? "2024-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, + apiVersion, + subscriptionId, + } as AzureVMwareSolutionAPIContext; +} 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..760dfc895f1d --- /dev/null +++ b/sdk/avs/arm-avs/src/api/cloudLinks/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + CloudLinksDeleteOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/cloudLinks/operations.ts b/sdk/avs/arm-avs/src/api/cloudLinks/operations.ts new file mode 100644 index 000000000000..8b26cb08ec79 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/cloudLinks/operations.ts @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _CloudLinkList, + _cloudLinkListDeserializer, + CloudLink, + cloudLinkSerializer, + cloudLinkDeserializer, +} from "../../models/models.js"; +import { + CloudLinksDeleteOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + cloudLinkName: cloudLinkName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a CloudLink */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, cloudLinkName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options: CloudLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + cloudLinkName: cloudLinkName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: cloudLinkSerializer(cloudLink), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return cloudLinkDeserializer(result.body); +} + +/** Create a CloudLink */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options: CloudLinksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, CloudLink> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + cloudLinkName, + cloudLink, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, CloudLink>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + cloudLinkName: cloudLinkName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return cloudLinkDeserializer(result.body); +} + +/** Get a CloudLink */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options: CloudLinksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + cloudLinkName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: CloudLinksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_CloudLinkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _cloudLinkListDeserializer(result.body); +} + +/** List CloudLink resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: CloudLinksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/cloudLinks/options.ts b/sdk/avs/arm-avs/src/api/cloudLinks/options.ts new file mode 100644 index 000000000000..fdf40a2f25a9 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/cloudLinks/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CloudLinksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudLinksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface CloudLinksGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CloudLinksListOptionalParams extends OperationOptions {} 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..46b80addde2a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/clusters/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listZones, $delete, update, createOrUpdate, get, list } from "./operations.js"; +export { + ClustersListZonesOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, + ClustersListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/clusters/operations.ts b/sdk/avs/arm-avs/src/api/clusters/operations.ts new file mode 100644 index 000000000000..6fcbb824a55b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/clusters/operations.ts @@ -0,0 +1,403 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ClusterList, + _clusterListDeserializer, + Cluster, + clusterSerializer, + clusterDeserializer, + ClusterUpdate, + clusterUpdateSerializer, + ArmResponseCluster, + armResponseClusterDeserializer, + ClusterZoneList, + clusterZoneListDeserializer, +} from "../../models/models.js"; +import { + ClustersListZonesOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, + ClustersListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listZonesSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersListZonesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listZonesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return clusterZoneListDeserializer(result.body); +} + +/** List hosts by zone in a cluster */ +export async function listZones( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersListZonesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listZonesSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + options, + ); + return _listZonesDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Cluster */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, clusterName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: clusterUpdateSerializer(clusterUpdate), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return armResponseClusterDeserializer(result.body); +} + +/** Update a Cluster */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ArmResponseCluster> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + clusterUpdate, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, ArmResponseCluster>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: clusterSerializer(cluster), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return clusterDeserializer(result.body); +} + +/** Create a Cluster */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cluster> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + cluster, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Cluster>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return clusterDeserializer(result.body); +} + +/** Get a Cluster */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, clusterName, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ClustersListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_ClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _clusterListDeserializer(result.body); +} + +/** List Cluster resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ClustersListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/clusters/options.ts b/sdk/avs/arm-avs/src/api/clusters/options.ts new file mode 100644 index 000000000000..39951d2f18a8 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/clusters/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ClustersListZonesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClustersDeleteOptionalParams 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 ClustersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClustersListOptionalParams extends OperationOptions {} 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..e414508211bb --- /dev/null +++ b/sdk/avs/arm-avs/src/api/datastores/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + DatastoresDeleteOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresGetOptionalParams, + DatastoresListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/datastores/operations.ts b/sdk/avs/arm-avs/src/api/datastores/operations.ts new file mode 100644 index 000000000000..5664c6ad6d25 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/datastores/operations.ts @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _DatastoreList, + _datastoreListDeserializer, + Datastore, + datastoreSerializer, + datastoreDeserializer, +} from "../../models/models.js"; +import { + DatastoresDeleteOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresGetOptionalParams, + DatastoresListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + datastoreName: datastoreName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Datastore */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options: DatastoresCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + datastoreName: datastoreName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: datastoreSerializer(datastore), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return datastoreDeserializer(result.body); +} + +/** Create a Datastore */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options: DatastoresCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Datastore> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + datastore, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, Datastore>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + datastoreName: datastoreName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return datastoreDeserializer(result.body); +} + +/** Get a Datastore */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options: DatastoresGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: DatastoresListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_DatastoreList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _datastoreListDeserializer(result.body); +} + +/** List Datastore resources by Cluster */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: DatastoresListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/datastores/options.ts b/sdk/avs/arm-avs/src/api/datastores/options.ts new file mode 100644 index 000000000000..32705a2f7f8c --- /dev/null +++ b/sdk/avs/arm-avs/src/api/datastores/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DatastoresDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DatastoresCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DatastoresGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DatastoresListOptionalParams extends OperationOptions {} 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..9605ce2f7903 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/globalReachConnections/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + GlobalReachConnectionsDeleteOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/globalReachConnections/operations.ts b/sdk/avs/arm-avs/src/api/globalReachConnections/operations.ts new file mode 100644 index 000000000000..3af11ee537a5 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/globalReachConnections/operations.ts @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _GlobalReachConnectionList, + _globalReachConnectionListDeserializer, + GlobalReachConnection, + globalReachConnectionSerializer, + globalReachConnectionDeserializer, +} from "../../models/models.js"; +import { + GlobalReachConnectionsDeleteOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + globalReachConnectionName: globalReachConnectionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a GlobalReachConnection */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options: GlobalReachConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + globalReachConnectionName: globalReachConnectionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: globalReachConnectionSerializer(globalReachConnection), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return globalReachConnectionDeserializer(result.body); +} + +/** Create a GlobalReachConnection */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options: GlobalReachConnectionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, GlobalReachConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + globalReachConnection, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, GlobalReachConnection>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + globalReachConnectionName: globalReachConnectionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return globalReachConnectionDeserializer(result.body); +} + +/** Get a GlobalReachConnection */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options: GlobalReachConnectionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: GlobalReachConnectionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_GlobalReachConnectionList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _globalReachConnectionListDeserializer(result.body); +} + +/** List GlobalReachConnection resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: GlobalReachConnectionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/globalReachConnections/options.ts b/sdk/avs/arm-avs/src/api/globalReachConnections/options.ts new file mode 100644 index 000000000000..f8dba82d629b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/globalReachConnections/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GlobalReachConnectionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GlobalReachConnectionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface GlobalReachConnectionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GlobalReachConnectionsListOptionalParams extends OperationOptions {} 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..944005eca5a8 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + HcxEnterpriseSitesDeleteOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/operations.ts b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/operations.ts new file mode 100644 index 000000000000..6cd4f920b632 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/operations.ts @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _HcxEnterpriseSiteList, + _hcxEnterpriseSiteListDeserializer, + HcxEnterpriseSite, + hcxEnterpriseSiteSerializer, + hcxEnterpriseSiteDeserializer, +} from "../../models/models.js"; +import { + HcxEnterpriseSitesDeleteOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + hcxEnterpriseSiteName: hcxEnterpriseSiteName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a HcxEnterpriseSite */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export async function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options: HcxEnterpriseSitesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + hcxEnterpriseSiteName: hcxEnterpriseSiteName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: hcxEnterpriseSiteSerializer(hcxEnterpriseSite), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return hcxEnterpriseSiteDeserializer(result.body); +} + +/** Create a HcxEnterpriseSite */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options: HcxEnterpriseSitesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + hcxEnterpriseSite, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + hcxEnterpriseSiteName: hcxEnterpriseSiteName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return hcxEnterpriseSiteDeserializer(result.body); +} + +/** Get a HcxEnterpriseSite */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options: HcxEnterpriseSitesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: HcxEnterpriseSitesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_HcxEnterpriseSiteList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _hcxEnterpriseSiteListDeserializer(result.body); +} + +/** List HcxEnterpriseSite resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: HcxEnterpriseSitesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/options.ts b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/options.ts new file mode 100644 index 000000000000..9150a71ba238 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hcxEnterpriseSites/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface HcxEnterpriseSitesDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HcxEnterpriseSitesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/hosts/index.ts b/sdk/avs/arm-avs/src/api/hosts/index.ts new file mode 100644 index 000000000000..566cf68a340c --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hosts/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { HostsGetOptionalParams, HostsListOptionalParams } from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/hosts/operations.ts b/sdk/avs/arm-avs/src/api/hosts/operations.ts new file mode 100644 index 000000000000..9e84992b3e04 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hosts/operations.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _HostListResult, + _hostListResultDeserializer, + Host, + hostDeserializer, +} from "../../models/models.js"; +import { HostsGetOptionalParams, HostsListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + hostId: string, + options: HostsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + hostId: hostId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return hostDeserializer(result.body); +} + +/** Get a Host */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + hostId: string, + options: HostsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + hostId, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: HostsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_HostListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _hostListResultDeserializer(result.body); +} + +/** List Host resources by Cluster */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: HostsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/hosts/options.ts b/sdk/avs/arm-avs/src/api/hosts/options.ts new file mode 100644 index 000000000000..24416bcc2b01 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/hosts/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface HostsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface HostsListOptionalParams extends OperationOptions {} 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..e1ddc4f85302 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + createAzureVMwareSolutionAPI, + AzureVMwareSolutionAPIContext, + AzureVMwareSolutionAPIClientOptionalParams, +} from "./azureVMwareSolutionAPIContext.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..2774299187d4 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/iscsiPaths/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, listByPrivateCloud } from "./operations.js"; +export { + IscsiPathsDeleteOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/iscsiPaths/operations.ts b/sdk/avs/arm-avs/src/api/iscsiPaths/operations.ts new file mode 100644 index 000000000000..c79509707979 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/iscsiPaths/operations.ts @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _IscsiPathListResult, + _iscsiPathListResultDeserializer, + IscsiPath, + iscsiPathSerializer, + iscsiPathDeserializer, +} from "../../models/models.js"; +import { + IscsiPathsDeleteOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a IscsiPath */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + resource: IscsiPath, + options: IscsiPathsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: iscsiPathSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return iscsiPathDeserializer(result.body); +} + +/** Create a IscsiPath */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + resource: IscsiPath, + options: IscsiPathsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IscsiPath> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, privateCloudName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, IscsiPath>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return iscsiPathDeserializer(result.body); +} + +/** Get a IscsiPath */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, options); + return _getDeserialize(result); +} + +export function _listByPrivateCloudSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsListByPrivateCloudOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listByPrivateCloudDeserialize( + result: PathUncheckedResponse, +): Promise<_IscsiPathListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _iscsiPathListResultDeserializer(result.body); +} + +/** List IscsiPath resources by PrivateCloud */ +export function listByPrivateCloud( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: IscsiPathsListByPrivateCloudOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByPrivateCloudSend(context, resourceGroupName, privateCloudName, options), + _listByPrivateCloudDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/iscsiPaths/options.ts b/sdk/avs/arm-avs/src/api/iscsiPaths/options.ts new file mode 100644 index 000000000000..63e831309f0c --- /dev/null +++ b/sdk/avs/arm-avs/src/api/iscsiPaths/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IscsiPathsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IscsiPathsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IscsiPathsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IscsiPathsListByPrivateCloudOptionalParams extends OperationOptions {} 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..dbbfbc878e6d --- /dev/null +++ b/sdk/avs/arm-avs/src/api/locations/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { checkQuotaAvailability, checkTrialAvailability } from "./operations.js"; +export { + LocationsCheckQuotaAvailabilityOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/locations/operations.ts b/sdk/avs/arm-avs/src/api/locations/operations.ts new file mode 100644 index 000000000000..845ef62392ed --- /dev/null +++ b/sdk/avs/arm-avs/src/api/locations/operations.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + skuSerializer, + Trial, + trialDeserializer, + Quota, + quotaDeserializer, +} from "../../models/models.js"; +import { + LocationsCheckQuotaAvailabilityOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, +} from "./options.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _checkQuotaAvailabilitySend( + context: Client, + location: string, + options: LocationsCheckQuotaAvailabilityOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _checkQuotaAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return quotaDeserializer(result.body); +} + +/** Return quota for subscription by region */ +export async function checkQuotaAvailability( + context: Client, + location: string, + options: LocationsCheckQuotaAvailabilityOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _checkQuotaAvailabilitySend(context, location, options); + return _checkQuotaAvailabilityDeserialize(result); +} + +export function _checkTrialAvailabilitySend( + context: Client, + location: string, + options: LocationsCheckTrialAvailabilityOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["sku"] ? options["sku"] : skuSerializer(options["sku"]), + }); +} + +export async function _checkTrialAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return trialDeserializer(result.body); +} + +/** Return trial status for subscription by region */ +export async function checkTrialAvailability( + context: Client, + location: string, + options: LocationsCheckTrialAvailabilityOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _checkTrialAvailabilitySend(context, location, options); + return _checkTrialAvailabilityDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/locations/options.ts b/sdk/avs/arm-avs/src/api/locations/options.ts new file mode 100644 index 000000000000..411c218035a1 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/locations/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Sku } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LocationsCheckQuotaAvailabilityOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LocationsCheckTrialAvailabilityOptionalParams extends OperationOptions { + /** Optionally, check for a specific SKU */ + sku?: Sku; +} 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..24a804d14fcf --- /dev/null +++ b/sdk/avs/arm-avs/src/api/operations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export { OperationsListOptionalParams } from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/operations/operations.ts b/sdk/avs/arm-avs/src/api/operations/operations.ts new file mode 100644 index 000000000000..69b5b9f562d2 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/operations/operations.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, + errorResponseDeserializer, +} from "../../models/models.js"; +import { OperationsListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.AVS/operations{?api%2Dversion}", + { + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function list( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/operations/options.ts b/sdk/avs/arm-avs/src/api/operations/options.ts new file mode 100644 index 000000000000..c461016ad1c5 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/operations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/placementPolicies/index.ts b/sdk/avs/arm-avs/src/api/placementPolicies/index.ts new file mode 100644 index 000000000000..5d685eb45cc7 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/placementPolicies/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, createOrUpdate, get, list } from "./operations.js"; +export { + PlacementPoliciesDeleteOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/placementPolicies/operations.ts b/sdk/avs/arm-avs/src/api/placementPolicies/operations.ts new file mode 100644 index 000000000000..57b2669e7b29 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/placementPolicies/operations.ts @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _PlacementPoliciesList, + _placementPoliciesListDeserializer, + PlacementPolicy, + placementPolicySerializer, + placementPolicyDeserializer, + PlacementPolicyUpdate, + placementPolicyUpdateSerializer, +} from "../../models/models.js"; +import { + PlacementPoliciesDeleteOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + placementPolicyName: placementPolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a PlacementPolicy */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options: PlacementPoliciesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + placementPolicyName: placementPolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: placementPolicyUpdateSerializer(placementPolicyUpdate), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Update a PlacementPolicy */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options: PlacementPoliciesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicyUpdate, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options: PlacementPoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + placementPolicyName: placementPolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: placementPolicySerializer(placementPolicy), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return placementPolicyDeserializer(result.body); +} + +/** Create a PlacementPolicy */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options: PlacementPoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PlacementPolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicy, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, PlacementPolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + placementPolicyName: placementPolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return placementPolicyDeserializer(result.body); +} + +/** Get a PlacementPolicy */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options: PlacementPoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: PlacementPoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PlacementPoliciesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _placementPoliciesListDeserializer(result.body); +} + +/** List PlacementPolicy resources by Cluster */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: PlacementPoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/placementPolicies/options.ts b/sdk/avs/arm-avs/src/api/placementPolicies/options.ts new file mode 100644 index 000000000000..7a95efbe2c50 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/placementPolicies/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PlacementPoliciesDeleteOptionalParams 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 PlacementPoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PlacementPoliciesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PlacementPoliciesListOptionalParams extends OperationOptions {} 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..64acf5d741b9 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/privateClouds/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listAdminCredentials, + rotateNsxtPassword, + rotateVcenterPassword, + $delete, + update, + createOrUpdate, + get, + listInSubscription, + list, +} from "./operations.js"; +export { + PrivateCloudsListAdminCredentialsOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/privateClouds/operations.ts b/sdk/avs/arm-avs/src/api/privateClouds/operations.ts new file mode 100644 index 000000000000..4e283ea3ca43 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/privateClouds/operations.ts @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _PrivateCloudList, + _privateCloudListDeserializer, + PrivateCloud, + privateCloudSerializer, + privateCloudDeserializer, + PrivateCloudUpdate, + privateCloudUpdateSerializer, + ArmResponsePrivateCloud, + armResponsePrivateCloudDeserializer, + AdminCredentials, + adminCredentialsDeserializer, +} from "../../models/models.js"; +import { + PrivateCloudsListAdminCredentialsOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listAdminCredentialsSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsListAdminCredentialsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listAdminCredentialsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return adminCredentialsDeserializer(result.body); +} + +/** List the admin credentials for the private cloud */ +export async function listAdminCredentials( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsListAdminCredentialsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _listAdminCredentialsSend( + context, + resourceGroupName, + privateCloudName, + options, + ); + return _listAdminCredentialsDeserialize(result); +} + +export function _rotateNsxtPasswordSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateNsxtPasswordOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _rotateNsxtPasswordDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Rotate the NSX-T Manager password */ +export function rotateNsxtPassword( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateNsxtPasswordOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _rotateNsxtPasswordDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _rotateNsxtPasswordSend(context, resourceGroupName, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _rotateVcenterPasswordSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateVcenterPasswordOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _rotateVcenterPasswordDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Rotate the vCenter password */ +export function rotateVcenterPassword( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsRotateVcenterPasswordOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _rotateVcenterPasswordDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _rotateVcenterPasswordSend(context, resourceGroupName, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a PrivateCloud */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options: PrivateCloudsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: privateCloudUpdateSerializer(privateCloudUpdate), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return armResponsePrivateCloudDeserializer(result.body); +} + +/** Update a PrivateCloud */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options: PrivateCloudsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ArmResponsePrivateCloud> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, privateCloudName, privateCloudUpdate, options), + resourceLocationConfig: "location", + }) as PollerLike, ArmResponsePrivateCloud>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options: PrivateCloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: privateCloudSerializer(privateCloud), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return privateCloudDeserializer(result.body); +} + +/** Create a PrivateCloud */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options: PrivateCloudsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateCloud> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, privateCloudName, privateCloud, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, PrivateCloud>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return privateCloudDeserializer(result.body); +} + +/** Get a PrivateCloud */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PrivateCloudsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, options); + return _getDeserialize(result); +} + +export function _listInSubscriptionSend( + context: Client, + options: PrivateCloudsListInSubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listInSubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateCloudList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _privateCloudListDeserializer(result.body); +} + +/** List PrivateCloud resources by subscription ID */ +export function listInSubscription( + context: Client, + options: PrivateCloudsListInSubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listInSubscriptionSend(context, options), + _listInSubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + options: PrivateCloudsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_PrivateCloudList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _privateCloudListDeserializer(result.body); +} + +/** List PrivateCloud resources by resource group */ +export function list( + context: Client, + resourceGroupName: string, + options: PrivateCloudsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/privateClouds/options.ts b/sdk/avs/arm-avs/src/api/privateClouds/options.ts new file mode 100644 index 000000000000..ecfaa725a821 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/privateClouds/options.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PrivateCloudsListAdminCredentialsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsRotateNsxtPasswordOptionalParams 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 PrivateCloudsDeleteOptionalParams 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 PrivateCloudsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateCloudsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsListInSubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateCloudsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/provisionedNetworks/index.ts b/sdk/avs/arm-avs/src/api/provisionedNetworks/index.ts new file mode 100644 index 000000000000..697a117bb2c8 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/provisionedNetworks/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { + ProvisionedNetworksGetOptionalParams, + ProvisionedNetworksListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/provisionedNetworks/operations.ts b/sdk/avs/arm-avs/src/api/provisionedNetworks/operations.ts new file mode 100644 index 000000000000..d5b2b1205699 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/provisionedNetworks/operations.ts @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ProvisionedNetworkListResult, + _provisionedNetworkListResultDeserializer, + ProvisionedNetwork, + provisionedNetworkDeserializer, +} from "../../models/models.js"; +import { + ProvisionedNetworksGetOptionalParams, + ProvisionedNetworksListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + provisionedNetworkName: string, + options: ProvisionedNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + provisionedNetworkName: provisionedNetworkName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return provisionedNetworkDeserializer(result.body); +} + +/** Get a ProvisionedNetwork */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + provisionedNetworkName: string, + options: ProvisionedNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + provisionedNetworkName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ProvisionedNetworksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ProvisionedNetworkListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _provisionedNetworkListResultDeserializer(result.body); +} + +/** List ProvisionedNetwork resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ProvisionedNetworksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/provisionedNetworks/options.ts b/sdk/avs/arm-avs/src/api/provisionedNetworks/options.ts new file mode 100644 index 000000000000..43ad6da24c9e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/provisionedNetworks/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProvisionedNetworksGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProvisionedNetworksListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/pureStoragePolicies/index.ts b/sdk/avs/arm-avs/src/api/pureStoragePolicies/index.ts new file mode 100644 index 000000000000..dfd4d272170f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/pureStoragePolicies/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, get, list } from "./operations.js"; +export { + PureStoragePoliciesDeleteOptionalParams, + PureStoragePoliciesCreateOrUpdateOptionalParams, + PureStoragePoliciesGetOptionalParams, + PureStoragePoliciesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/pureStoragePolicies/operations.ts b/sdk/avs/arm-avs/src/api/pureStoragePolicies/operations.ts new file mode 100644 index 000000000000..78212e181fb7 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/pureStoragePolicies/operations.ts @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _PureStoragePolicyListResult, + _pureStoragePolicyListResultDeserializer, + PureStoragePolicy, + pureStoragePolicySerializer, + pureStoragePolicyDeserializer, +} from "../../models/models.js"; +import { + PureStoragePoliciesDeleteOptionalParams, + PureStoragePoliciesCreateOrUpdateOptionalParams, + PureStoragePoliciesGetOptionalParams, + PureStoragePoliciesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options: PureStoragePoliciesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + storagePolicyName: storagePolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a PureStoragePolicy */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options: PureStoragePoliciesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, storagePolicyName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + resource: PureStoragePolicy, + options: PureStoragePoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + storagePolicyName: storagePolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: pureStoragePolicySerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return pureStoragePolicyDeserializer(result.body); +} + +/** Create a PureStoragePolicy */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + resource: PureStoragePolicy, + options: PureStoragePoliciesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, PureStoragePolicy> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + storagePolicyName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, PureStoragePolicy>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options: PureStoragePoliciesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + storagePolicyName: storagePolicyName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return pureStoragePolicyDeserializer(result.body); +} + +/** Get a PureStoragePolicy */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options: PureStoragePoliciesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + storagePolicyName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PureStoragePoliciesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_PureStoragePolicyListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _pureStoragePolicyListResultDeserializer(result.body); +} + +/** List PureStoragePolicy resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: PureStoragePoliciesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/pureStoragePolicies/options.ts b/sdk/avs/arm-avs/src/api/pureStoragePolicies/options.ts new file mode 100644 index 000000000000..a8392ba0c55e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/pureStoragePolicies/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PureStoragePoliciesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PureStoragePoliciesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PureStoragePoliciesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PureStoragePoliciesListOptionalParams extends OperationOptions {} 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..e31ee073c163 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptCmdlets/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { ScriptCmdletsGetOptionalParams, ScriptCmdletsListOptionalParams } from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/scriptCmdlets/operations.ts b/sdk/avs/arm-avs/src/api/scriptCmdlets/operations.ts new file mode 100644 index 000000000000..84b06245a869 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptCmdlets/operations.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ScriptCmdletsList, + _scriptCmdletsListDeserializer, + ScriptCmdlet, + scriptCmdletDeserializer, +} from "../../models/models.js"; +import { ScriptCmdletsGetOptionalParams, ScriptCmdletsListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options: ScriptCmdletsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptPackageName: scriptPackageName, + scriptCmdletName: scriptCmdletName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return scriptCmdletDeserializer(result.body); +} + +/** Get a ScriptCmdlet */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options: ScriptCmdletsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptCmdletsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptPackageName: scriptPackageName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_ScriptCmdletsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _scriptCmdletsListDeserializer(result.body); +} + +/** List ScriptCmdlet resources by ScriptPackage */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptCmdletsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, scriptPackageName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/scriptCmdlets/options.ts b/sdk/avs/arm-avs/src/api/scriptCmdlets/options.ts new file mode 100644 index 000000000000..4974648c187f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptCmdlets/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ScriptCmdletsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptCmdletsListOptionalParams extends OperationOptions {} 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..7b7407a95a9d --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptExecutions/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { getExecutionLogs, $delete, createOrUpdate, get, list } from "./operations.js"; +export { + ScriptExecutionsGetExecutionLogsOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/scriptExecutions/operations.ts b/sdk/avs/arm-avs/src/api/scriptExecutions/operations.ts new file mode 100644 index 000000000000..ea68eb81dbd0 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptExecutions/operations.ts @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ScriptExecutionsList, + _scriptExecutionsListDeserializer, + ScriptExecution, + scriptExecutionSerializer, + scriptExecutionDeserializer, +} from "../../models/models.js"; +import { + ScriptExecutionsGetExecutionLogsOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getExecutionLogsSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetExecutionLogsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptExecutionName: scriptExecutionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options["scriptOutputStreamType"] + ? options["scriptOutputStreamType"] + : options["scriptOutputStreamType"].map((p: any) => { + return p; + }), + }); +} + +export async function _getExecutionLogsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return scriptExecutionDeserializer(result.body); +} + +/** Return the logs for a script execution resource */ +export async function getExecutionLogs( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetExecutionLogsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getExecutionLogsSend( + context, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ); + return _getExecutionLogsDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptExecutionName: scriptExecutionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a ScriptExecution */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, scriptExecutionName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options: ScriptExecutionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptExecutionName: scriptExecutionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: scriptExecutionSerializer(scriptExecution), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return scriptExecutionDeserializer(result.body); +} + +/** Create a ScriptExecution */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options: ScriptExecutionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, ScriptExecution> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + privateCloudName, + scriptExecutionName, + scriptExecution, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, ScriptExecution>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptExecutionName: scriptExecutionName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return scriptExecutionDeserializer(result.body); +} + +/** Get a ScriptExecution */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options: ScriptExecutionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + scriptExecutionName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ScriptExecutionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ScriptExecutionsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _scriptExecutionsListDeserializer(result.body); +} + +/** List ScriptExecution resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ScriptExecutionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/scriptExecutions/options.ts b/sdk/avs/arm-avs/src/api/scriptExecutions/options.ts new file mode 100644 index 000000000000..0762ab370a41 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptExecutions/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ScriptOutputStreamType } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** 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 ScriptExecutionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ScriptExecutionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ScriptExecutionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptExecutionsListOptionalParams extends OperationOptions {} 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..48479ef124d6 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptPackages/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { ScriptPackagesGetOptionalParams, ScriptPackagesListOptionalParams } from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/scriptPackages/operations.ts b/sdk/avs/arm-avs/src/api/scriptPackages/operations.ts new file mode 100644 index 000000000000..29b0f1a34659 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptPackages/operations.ts @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ScriptPackagesList, + _scriptPackagesListDeserializer, + ScriptPackage, + scriptPackageDeserializer, +} from "../../models/models.js"; +import { ScriptPackagesGetOptionalParams, ScriptPackagesListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptPackagesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + scriptPackageName: scriptPackageName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return scriptPackageDeserializer(result.body); +} + +/** Get a ScriptPackage */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options: ScriptPackagesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + scriptPackageName, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ScriptPackagesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ScriptPackagesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _scriptPackagesListDeserializer(result.body); +} + +/** List ScriptPackage resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: ScriptPackagesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/scriptPackages/options.ts b/sdk/avs/arm-avs/src/api/scriptPackages/options.ts new file mode 100644 index 000000000000..733b1764a86f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/scriptPackages/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ScriptPackagesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ScriptPackagesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/skus/index.ts b/sdk/avs/arm-avs/src/api/skus/index.ts new file mode 100644 index 000000000000..b8728b770497 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/skus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export { SkusListOptionalParams } from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/skus/operations.ts b/sdk/avs/arm-avs/src/api/skus/operations.ts new file mode 100644 index 000000000000..4bd0b5999097 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/skus/operations.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _PagedResourceSku, + _pagedResourceSkuDeserializer, + ResourceSku, +} from "../../models/models.js"; +import { SkusListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: SkusListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/skus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_PagedResourceSku> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _pagedResourceSkuDeserializer(result.body); +} + +/** A list of SKUs. */ +export function list( + context: Client, + options: SkusListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/skus/options.ts b/sdk/avs/arm-avs/src/api/skus/options.ts new file mode 100644 index 000000000000..91ecc55a0e75 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/skus/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SkusListOptionalParams extends OperationOptions {} 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..92398440815e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/virtualMachines/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { restrictMovement, get, list } from "./operations.js"; +export { + VirtualMachinesRestrictMovementOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/virtualMachines/operations.ts b/sdk/avs/arm-avs/src/api/virtualMachines/operations.ts new file mode 100644 index 000000000000..7517a44e1876 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/virtualMachines/operations.ts @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _VirtualMachinesList, + _virtualMachinesListDeserializer, + VirtualMachine, + virtualMachineDeserializer, + VirtualMachineRestrictMovement, + virtualMachineRestrictMovementSerializer, +} from "../../models/models.js"; +import { + VirtualMachinesRestrictMovementOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _restrictMovementSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options: VirtualMachinesRestrictMovementOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + virtualMachineId: virtualMachineId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: virtualMachineRestrictMovementSerializer(restrictMovementParameter), + }); +} + +export async function _restrictMovementDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Enable or disable DRS-driven VM movement restriction */ +export function restrictMovement( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options: VirtualMachinesRestrictMovementOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _restrictMovementDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restrictMovementSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + restrictMovementParameter, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + virtualMachineId: virtualMachineId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return virtualMachineDeserializer(result.body); +} + +/** Get a VirtualMachine */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: VirtualMachinesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachinesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _virtualMachinesListDeserializer(result.body); +} + +/** List VirtualMachine resources by Cluster */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options: VirtualMachinesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/virtualMachines/options.ts b/sdk/avs/arm-avs/src/api/virtualMachines/options.ts new file mode 100644 index 000000000000..0a30c073a07f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/virtualMachines/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualMachinesRestrictMovementOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachinesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface VirtualMachinesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/index.ts new file mode 100644 index 000000000000..80e19f4c5907 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + WorkloadNetworkDhcpConfigurationsGetOptionalParams, + WorkloadNetworkDhcpConfigurationsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/operations.ts new file mode 100644 index 000000000000..cb4afa47a654 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/operations.ts @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkDhcpList, + _workloadNetworkDhcpListDeserializer, + WorkloadNetworkDhcp, + workloadNetworkDhcpSerializer, + workloadNetworkDhcpDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + WorkloadNetworkDhcpConfigurationsGetOptionalParams, + WorkloadNetworkDhcpConfigurationsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + options: WorkloadNetworkDhcpConfigurationsDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dhcpId: dhcpId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkDhcp */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + options: WorkloadNetworkDhcpConfigurationsDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, privateCloudName, dhcpId, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworkDhcpConfigurationsUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dhcpId: dhcpId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDhcpSerializer(workloadNetworkDhcp), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Update a WorkloadNetworkDhcp */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworkDhcpConfigurationsUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkDhcp> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + dhcpId, + workloadNetworkDhcp, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkDhcp>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworkDhcpConfigurationsCreateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dhcpId: dhcpId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDhcpSerializer(workloadNetworkDhcp), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Create a WorkloadNetworkDhcp */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options: WorkloadNetworkDhcpConfigurationsCreateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkDhcp> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + dhcpId, + workloadNetworkDhcp, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkDhcp>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options: WorkloadNetworkDhcpConfigurationsGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dhcpId: dhcpId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDhcpDeserializer(result.body); +} + +/** Get a WorkloadNetworkDhcp */ +export async function get( + context: Client, + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options: WorkloadNetworkDhcpConfigurationsGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend(context, resourceGroupName, dhcpId, privateCloudName, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDhcpConfigurationsListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDhcpList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkDhcpListDeserializer(result.body); +} + +/** List WorkloadNetworkDhcp resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDhcpConfigurationsListOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/options.ts new file mode 100644 index 000000000000..261bc7feda7a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDhcpConfigurations/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkDhcpConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDhcpConfigurationsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDhcpConfigurationsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDhcpConfigurationsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkDhcpConfigurationsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/index.ts new file mode 100644 index 000000000000..58844a584813 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkDnsServicesDeleteOptionalParams, + WorkloadNetworkDnsServicesUpdateOptionalParams, + WorkloadNetworkDnsServicesCreateOptionalParams, + WorkloadNetworkDnsServicesGetOptionalParams, + WorkloadNetworkDnsServicesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/operations.ts new file mode 100644 index 000000000000..78d6df43b77f --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/operations.ts @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkDnsServicesList, + _workloadNetworkDnsServicesListDeserializer, + WorkloadNetworkDnsService, + workloadNetworkDnsServiceSerializer, + workloadNetworkDnsServiceDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkDnsServicesDeleteOptionalParams, + WorkloadNetworkDnsServicesUpdateOptionalParams, + WorkloadNetworkDnsServicesCreateOptionalParams, + WorkloadNetworkDnsServicesGetOptionalParams, + WorkloadNetworkDnsServicesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options: WorkloadNetworkDnsServicesDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dnsServiceId: dnsServiceId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkDnsService */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options: WorkloadNetworkDnsServicesDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, dnsServiceId, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworkDnsServicesUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsServiceId: dnsServiceId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDnsServiceSerializer(workloadNetworkDnsService), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Update a WorkloadNetworkDnsService */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworkDnsServicesUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkDnsService> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkDnsService>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworkDnsServicesCreateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsServiceId: dnsServiceId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDnsServiceSerializer(workloadNetworkDnsService), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Create a WorkloadNetworkDnsService */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options: WorkloadNetworkDnsServicesCreateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkDnsService> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkDnsService>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + options: WorkloadNetworkDnsServicesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsServiceId: dnsServiceId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsServiceDeserializer(result.body); +} + +/** Get a WorkloadNetworkDnsService */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + options: WorkloadNetworkDnsServicesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + dnsServiceId, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDnsServicesListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDnsServicesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkDnsServicesListDeserializer(result.body); +} + +/** List WorkloadNetworkDnsService resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDnsServicesListOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/options.ts new file mode 100644 index 000000000000..d97bbd83c2db --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsServices/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkDnsServicesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsServicesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsServicesCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsServicesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsServicesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/index.ts new file mode 100644 index 000000000000..6460bc3d5c10 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkDnsZonesDeleteOptionalParams, + WorkloadNetworkDnsZonesUpdateOptionalParams, + WorkloadNetworkDnsZonesCreateOptionalParams, + WorkloadNetworkDnsZonesGetOptionalParams, + WorkloadNetworkDnsZonesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/operations.ts new file mode 100644 index 000000000000..4716371f5279 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkDnsZonesList, + _workloadNetworkDnsZonesListDeserializer, + WorkloadNetworkDnsZone, + workloadNetworkDnsZoneSerializer, + workloadNetworkDnsZoneDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkDnsZonesDeleteOptionalParams, + WorkloadNetworkDnsZonesUpdateOptionalParams, + WorkloadNetworkDnsZonesCreateOptionalParams, + WorkloadNetworkDnsZonesGetOptionalParams, + WorkloadNetworkDnsZonesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options: WorkloadNetworkDnsZonesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + dnsZoneId: dnsZoneId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkDnsZone */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options: WorkloadNetworkDnsZonesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, dnsZoneId, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworkDnsZonesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsZoneId: dnsZoneId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDnsZoneSerializer(workloadNetworkDnsZone), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Update a WorkloadNetworkDnsZone */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworkDnsZonesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDnsZone> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkDnsZone>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworkDnsZonesCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsZoneId: dnsZoneId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkDnsZoneSerializer(workloadNetworkDnsZone), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Create a WorkloadNetworkDnsZone */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options: WorkloadNetworkDnsZonesCreateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkDnsZone> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkDnsZone>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + options: WorkloadNetworkDnsZonesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + dnsZoneId: dnsZoneId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDnsZoneDeserializer(result.body); +} + +/** Get a WorkloadNetworkDnsZone */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + options: WorkloadNetworkDnsZonesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, dnsZoneId, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDnsZonesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkDnsZonesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkDnsZonesListDeserializer(result.body); +} + +/** List WorkloadNetworkDnsZone resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkDnsZonesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/options.ts new file mode 100644 index 000000000000..560e5b0781c0 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkDnsZones/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkDnsZonesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsZonesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsZonesCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsZonesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkDnsZonesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkGateways/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/index.ts new file mode 100644 index 000000000000..86d0d425516a --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { + WorkloadNetworkGatewaysGetOptionalParams, + WorkloadNetworkGatewaysListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkGateways/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/operations.ts new file mode 100644 index 000000000000..baee9a826622 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/operations.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkGatewayList, + _workloadNetworkGatewayListDeserializer, + WorkloadNetworkGateway, + workloadNetworkGatewayDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkGatewaysGetOptionalParams, + WorkloadNetworkGatewaysListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + gatewayId: string, + options: WorkloadNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkGatewayDeserializer(result.body); +} + +/** Get a WorkloadNetworkGateway */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + gatewayId: string, + options: WorkloadNetworkGatewaysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, gatewayId, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkGatewayList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkGatewayListDeserializer(result.body); +} + +/** List WorkloadNetworkGateway resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkGatewaysListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkGateways/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/options.ts new file mode 100644 index 000000000000..e011d15e089b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkGateways/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkGatewaysGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkGatewaysListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/index.ts new file mode 100644 index 000000000000..c2c4b596e0af --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + WorkloadNetworkPortMirroringProfilesGetOptionalParams, + WorkloadNetworkPortMirroringProfilesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/operations.ts new file mode 100644 index 000000000000..82df08a0b79b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/operations.ts @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkPortMirroringList, + _workloadNetworkPortMirroringListDeserializer, + WorkloadNetworkPortMirroring, + workloadNetworkPortMirroringSerializer, + workloadNetworkPortMirroringDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + WorkloadNetworkPortMirroringProfilesGetOptionalParams, + WorkloadNetworkPortMirroringProfilesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options: WorkloadNetworkPortMirroringProfilesDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + portMirroringId: portMirroringId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkPortMirroring */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options: WorkloadNetworkPortMirroringProfilesDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, portMirroringId, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworkPortMirroringProfilesUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + portMirroringId: portMirroringId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkPortMirroringSerializer(workloadNetworkPortMirroring), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Update a WorkloadNetworkPortMirroring */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworkPortMirroringProfilesUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkPortMirroring> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkPortMirroring>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworkPortMirroringProfilesCreateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + portMirroringId: portMirroringId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkPortMirroringSerializer(workloadNetworkPortMirroring), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Create a WorkloadNetworkPortMirroring */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options: WorkloadNetworkPortMirroringProfilesCreateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkPortMirroring> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkPortMirroring>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + options: WorkloadNetworkPortMirroringProfilesGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + portMirroringId: portMirroringId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkPortMirroringDeserializer(result.body); +} + +/** Get a WorkloadNetworkPortMirroring */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + options: WorkloadNetworkPortMirroringProfilesGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + portMirroringId, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkPortMirroringProfilesListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkPortMirroringList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkPortMirroringListDeserializer(result.body); +} + +/** List WorkloadNetworkPortMirroring resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkPortMirroringProfilesListOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/options.ts new file mode 100644 index 000000000000..89a40b050243 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPortMirroringProfiles/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkPortMirroringProfilesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkPortMirroringProfilesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkPortMirroringProfilesCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkPortMirroringProfilesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkPortMirroringProfilesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/index.ts new file mode 100644 index 000000000000..84428c5cfbe4 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, create, get, list } from "./operations.js"; +export { + WorkloadNetworkPublicIpsDeleteOptionalParams, + WorkloadNetworkPublicIpsCreateOptionalParams, + WorkloadNetworkPublicIpsGetOptionalParams, + WorkloadNetworkPublicIpsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/operations.ts new file mode 100644 index 000000000000..7ec9754f6d1b --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/operations.ts @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkPublicIPsList, + _workloadNetworkPublicIPsListDeserializer, + WorkloadNetworkPublicIP, + workloadNetworkPublicIPSerializer, + workloadNetworkPublicIPDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkPublicIpsDeleteOptionalParams, + WorkloadNetworkPublicIpsCreateOptionalParams, + WorkloadNetworkPublicIpsGetOptionalParams, + WorkloadNetworkPublicIpsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options: WorkloadNetworkPublicIpsDeleteOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + publicIPId: publicIPId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkPublicIP */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options: WorkloadNetworkPublicIpsDeleteOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, publicIPId, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options: WorkloadNetworkPublicIpsCreateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + publicIPId: publicIPId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkPublicIPSerializer(workloadNetworkPublicIP), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkPublicIPDeserializer(result.body); +} + +/** Create a WorkloadNetworkPublicIP */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options: WorkloadNetworkPublicIpsCreateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, WorkloadNetworkPublicIP> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + publicIPId, + workloadNetworkPublicIP, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkPublicIP>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + options: WorkloadNetworkPublicIpsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + publicIPId: publicIPId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkPublicIPDeserializer(result.body); +} + +/** Get a WorkloadNetworkPublicIP */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + options: WorkloadNetworkPublicIpsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, publicIPId, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkPublicIpsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkPublicIPsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkPublicIPsListDeserializer(result.body); +} + +/** List WorkloadNetworkPublicIP resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkPublicIpsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/options.ts new file mode 100644 index 000000000000..83decaf75ec6 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkPublicIps/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkPublicIpsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkPublicIpsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkPublicIpsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkPublicIpsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkSegments/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/index.ts new file mode 100644 index 000000000000..fd4adfc87441 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { deleteSegment, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + WorkloadNetworkSegmentsUpdateOptionalParams, + WorkloadNetworkSegmentsCreateOptionalParams, + WorkloadNetworkSegmentsGetOptionalParams, + WorkloadNetworkSegmentsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkSegments/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/operations.ts new file mode 100644 index 000000000000..4f07efd8531c --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/operations.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkSegmentsList, + _workloadNetworkSegmentsListDeserializer, + WorkloadNetworkSegment, + workloadNetworkSegmentSerializer, + workloadNetworkSegmentDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + WorkloadNetworkSegmentsUpdateOptionalParams, + WorkloadNetworkSegmentsCreateOptionalParams, + WorkloadNetworkSegmentsGetOptionalParams, + WorkloadNetworkSegmentsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _deleteSegmentSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options: WorkloadNetworkSegmentsDeleteSegmentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + segmentId: segmentId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _deleteSegmentDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkSegment */ +export function deleteSegment( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options: WorkloadNetworkSegmentsDeleteSegmentOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _deleteSegmentDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deleteSegmentSend(context, resourceGroupName, privateCloudName, segmentId, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworkSegmentsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + segmentId: segmentId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkSegmentSerializer(workloadNetworkSegment), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Update a WorkloadNetworkSegment */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworkSegmentsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkSegment> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkSegment>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworkSegmentsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + segmentId: segmentId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkSegmentSerializer(workloadNetworkSegment), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Create a WorkloadNetworkSegment */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options: WorkloadNetworkSegmentsCreateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkSegment> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkSegment>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options: WorkloadNetworkSegmentsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + segmentId: segmentId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkSegmentDeserializer(result.body); +} + +/** Get a WorkloadNetworkSegment */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options: WorkloadNetworkSegmentsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, segmentId, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkSegmentsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkSegmentsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkSegmentsListDeserializer(result.body); +} + +/** List WorkloadNetworkSegment resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkSegmentsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkSegments/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/options.ts new file mode 100644 index 000000000000..ac816fab683e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkSegments/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkSegmentsDeleteSegmentOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkSegmentsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkSegmentsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkSegmentsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkSegmentsListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/index.ts new file mode 100644 index 000000000000..9be564376bfa --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get, list } from "./operations.js"; +export { + WorkloadNetworkVirtualMachinesGetOptionalParams, + WorkloadNetworkVirtualMachinesListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/operations.ts new file mode 100644 index 000000000000..27b662069a07 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/operations.ts @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkVirtualMachinesList, + _workloadNetworkVirtualMachinesListDeserializer, + WorkloadNetworkVirtualMachine, + workloadNetworkVirtualMachineDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkVirtualMachinesGetOptionalParams, + WorkloadNetworkVirtualMachinesListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + virtualMachineId: string, + options: WorkloadNetworkVirtualMachinesGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + virtualMachineId: virtualMachineId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkVirtualMachineDeserializer(result.body); +} + +/** Get a WorkloadNetworkVirtualMachine */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + virtualMachineId: string, + options: WorkloadNetworkVirtualMachinesGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + privateCloudName, + virtualMachineId, + options, + ); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkVirtualMachinesListOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkVirtualMachinesList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkVirtualMachinesListDeserializer(result.body); +} + +/** List WorkloadNetworkVirtualMachine resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkVirtualMachinesListOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/options.ts new file mode 100644 index 000000000000..99bc8b75c7f3 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVirtualMachines/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkVirtualMachinesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkVirtualMachinesListOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/index.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/index.ts new file mode 100644 index 000000000000..32f85504e6a9 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, create, get, list } from "./operations.js"; +export { + WorkloadNetworkVmGroupsDeleteOptionalParams, + WorkloadNetworkVmGroupsUpdateOptionalParams, + WorkloadNetworkVmGroupsCreateOptionalParams, + WorkloadNetworkVmGroupsGetOptionalParams, + WorkloadNetworkVmGroupsListOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/operations.ts new file mode 100644 index 000000000000..29831db1f47e --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _WorkloadNetworkVMGroupsList, + _workloadNetworkVMGroupsListDeserializer, + WorkloadNetworkVMGroup, + workloadNetworkVMGroupSerializer, + workloadNetworkVMGroupDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworkVmGroupsDeleteOptionalParams, + WorkloadNetworkVmGroupsUpdateOptionalParams, + WorkloadNetworkVmGroupsCreateOptionalParams, + WorkloadNetworkVmGroupsGetOptionalParams, + WorkloadNetworkVmGroupsListOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options: WorkloadNetworkVmGroupsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + vmGroupId: vmGroupId, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a WorkloadNetworkVMGroup */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options: WorkloadNetworkVmGroupsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, vmGroupId, privateCloudName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworkVmGroupsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + vmGroupId: vmGroupId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkVMGroupSerializer(workloadNetworkVMGroup), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Update a WorkloadNetworkVMGroup */ +export function update( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworkVmGroupsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkVMGroup> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, WorkloadNetworkVMGroup>; +} + +export function _createSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworkVmGroupsCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + vmGroupId: vmGroupId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workloadNetworkVMGroupSerializer(workloadNetworkVMGroup), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Create a WorkloadNetworkVMGroup */ +export function create( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options: WorkloadNetworkVmGroupsCreateOptionalParams = { requestOptions: {} }, +): PollerLike, WorkloadNetworkVMGroup> { + return getLongRunningPoller(context, _createDeserialize, ["200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createSend( + context, + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, WorkloadNetworkVMGroup>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + options: WorkloadNetworkVmGroupsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + vmGroupId: vmGroupId, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkVMGroupDeserializer(result.body); +} + +/** Get a WorkloadNetworkVMGroup */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + options: WorkloadNetworkVmGroupsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, vmGroupId, options); + return _getDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkVmGroupsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkVMGroupsList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkVMGroupsListDeserializer(result.body); +} + +/** List WorkloadNetworkVMGroup resources by WorkloadNetwork */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworkVmGroupsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/options.ts new file mode 100644 index 000000000000..ea2e1802f89d --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworkVmGroups/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworkVmGroupsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkVmGroupsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkVmGroupsCreateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkloadNetworkVmGroupsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworkVmGroupsListOptionalParams extends OperationOptions {} 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..b0eab7b6709d --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworks/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export { + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/avs/arm-avs/src/api/workloadNetworks/operations.ts b/sdk/avs/arm-avs/src/api/workloadNetworks/operations.ts new file mode 100644 index 000000000000..d17cb31d54cf --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworks/operations.ts @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WorkloadNetwork, + workloadNetworkDeserializer, + _WorkloadNetworkList, + _workloadNetworkListDeserializer, +} from "../../models/models.js"; +import { + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkloadNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _workloadNetworkListDeserializer(result.body); +} + +/** List WorkloadNetwork resources by PrivateCloud */ +export function list( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, privateCloudName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + privateCloudName: privateCloudName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return workloadNetworkDeserializer(result.body); +} + +/** Get a WorkloadNetwork */ +export async function get( + context: Client, + resourceGroupName: string, + privateCloudName: string, + options: WorkloadNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, privateCloudName, options); + return _getDeserialize(result); +} diff --git a/sdk/avs/arm-avs/src/api/workloadNetworks/options.ts b/sdk/avs/arm-avs/src/api/workloadNetworks/options.ts new file mode 100644 index 000000000000..de546201a8f8 --- /dev/null +++ b/sdk/avs/arm-avs/src/api/workloadNetworks/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkloadNetworksListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkloadNetworksGetOptionalParams extends OperationOptions {} diff --git a/sdk/avs/arm-avs/src/azureVMwareSolutionAPI.ts b/sdk/avs/arm-avs/src/azureVMwareSolutionAPI.ts deleted file mode 100644 index abc6379bd498..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/index.js"; -import { - Operations, - Locations, - PrivateClouds, - Addons, - Authorizations, - CloudLinks, - Clusters, - Datastores, - PlacementPolicies, - VirtualMachines, - GlobalReachConnections, - HcxEnterpriseSites, - IscsiPaths, - ScriptExecutions, - ScriptPackages, - ScriptCmdlets, - WorkloadNetworks, -} from "./operationsInterfaces/index.js"; -import { AzureVMwareSolutionAPIOptionalParams } from "./models/index.js"; - -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/azureVMwareSolutionAPIClient.ts b/sdk/avs/arm-avs/src/azureVMwareSolutionAPIClient.ts new file mode 100644 index 000000000000..678d947196b2 --- /dev/null +++ b/sdk/avs/arm-avs/src/azureVMwareSolutionAPIClient.ts @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + createAzureVMwareSolutionAPI, + AzureVMwareSolutionAPIContext, + AzureVMwareSolutionAPIClientOptionalParams, +} from "./api/index.js"; +import { + WorkloadNetworksOperations, + _getWorkloadNetworksOperations, +} from "./classic/workloadNetworks/index.js"; +import { + WorkloadNetworkVmGroupsOperations, + _getWorkloadNetworkVmGroupsOperations, +} from "./classic/workloadNetworkVmGroups/index.js"; +import { + WorkloadNetworkVirtualMachinesOperations, + _getWorkloadNetworkVirtualMachinesOperations, +} from "./classic/workloadNetworkVirtualMachines/index.js"; +import { + WorkloadNetworkSegmentsOperations, + _getWorkloadNetworkSegmentsOperations, +} from "./classic/workloadNetworkSegments/index.js"; +import { + WorkloadNetworkPublicIpsOperations, + _getWorkloadNetworkPublicIpsOperations, +} from "./classic/workloadNetworkPublicIps/index.js"; +import { + WorkloadNetworkPortMirroringProfilesOperations, + _getWorkloadNetworkPortMirroringProfilesOperations, +} from "./classic/workloadNetworkPortMirroringProfiles/index.js"; +import { + WorkloadNetworkGatewaysOperations, + _getWorkloadNetworkGatewaysOperations, +} from "./classic/workloadNetworkGateways/index.js"; +import { + WorkloadNetworkDnsZonesOperations, + _getWorkloadNetworkDnsZonesOperations, +} from "./classic/workloadNetworkDnsZones/index.js"; +import { + WorkloadNetworkDnsServicesOperations, + _getWorkloadNetworkDnsServicesOperations, +} from "./classic/workloadNetworkDnsServices/index.js"; +import { + WorkloadNetworkDhcpConfigurationsOperations, + _getWorkloadNetworkDhcpConfigurationsOperations, +} from "./classic/workloadNetworkDhcpConfigurations/index.js"; +import { + VirtualMachinesOperations, + _getVirtualMachinesOperations, +} from "./classic/virtualMachines/index.js"; +import { SkusOperations, _getSkusOperations } from "./classic/skus/index.js"; +import { + ScriptPackagesOperations, + _getScriptPackagesOperations, +} from "./classic/scriptPackages/index.js"; +import { + ScriptExecutionsOperations, + _getScriptExecutionsOperations, +} from "./classic/scriptExecutions/index.js"; +import { + ScriptCmdletsOperations, + _getScriptCmdletsOperations, +} from "./classic/scriptCmdlets/index.js"; +import { + PureStoragePoliciesOperations, + _getPureStoragePoliciesOperations, +} from "./classic/pureStoragePolicies/index.js"; +import { + ProvisionedNetworksOperations, + _getProvisionedNetworksOperations, +} from "./classic/provisionedNetworks/index.js"; +import { + PrivateCloudsOperations, + _getPrivateCloudsOperations, +} from "./classic/privateClouds/index.js"; +import { + PlacementPoliciesOperations, + _getPlacementPoliciesOperations, +} from "./classic/placementPolicies/index.js"; +import { LocationsOperations, _getLocationsOperations } from "./classic/locations/index.js"; +import { IscsiPathsOperations, _getIscsiPathsOperations } from "./classic/iscsiPaths/index.js"; +import { HostsOperations, _getHostsOperations } from "./classic/hosts/index.js"; +import { + HcxEnterpriseSitesOperations, + _getHcxEnterpriseSitesOperations, +} from "./classic/hcxEnterpriseSites/index.js"; +import { + GlobalReachConnectionsOperations, + _getGlobalReachConnectionsOperations, +} from "./classic/globalReachConnections/index.js"; +import { DatastoresOperations, _getDatastoresOperations } from "./classic/datastores/index.js"; +import { ClustersOperations, _getClustersOperations } from "./classic/clusters/index.js"; +import { CloudLinksOperations, _getCloudLinksOperations } from "./classic/cloudLinks/index.js"; +import { + AuthorizationsOperations, + _getAuthorizationsOperations, +} from "./classic/authorizations/index.js"; +import { AddonsOperations, _getAddonsOperations } from "./classic/addons/index.js"; +import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { AzureVMwareSolutionAPIClientOptionalParams } from "./api/azureVMwareSolutionAPIContext.js"; + +export class AzureVMwareSolutionAPIClient { + private _client: AzureVMwareSolutionAPIContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + /** Azure VMware Solution API */ + constructor( + credential: TokenCredential, + subscriptionId: string, + options: AzureVMwareSolutionAPIClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createAzureVMwareSolutionAPI(credential, subscriptionId, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.workloadNetworks = _getWorkloadNetworksOperations(this._client); + this.workloadNetworkVmGroups = _getWorkloadNetworkVmGroupsOperations(this._client); + this.workloadNetworkVirtualMachines = _getWorkloadNetworkVirtualMachinesOperations( + this._client, + ); + this.workloadNetworkSegments = _getWorkloadNetworkSegmentsOperations(this._client); + this.workloadNetworkPublicIps = _getWorkloadNetworkPublicIpsOperations(this._client); + this.workloadNetworkPortMirroringProfiles = _getWorkloadNetworkPortMirroringProfilesOperations( + this._client, + ); + this.workloadNetworkGateways = _getWorkloadNetworkGatewaysOperations(this._client); + this.workloadNetworkDnsZones = _getWorkloadNetworkDnsZonesOperations(this._client); + this.workloadNetworkDnsServices = _getWorkloadNetworkDnsServicesOperations(this._client); + this.workloadNetworkDhcpConfigurations = _getWorkloadNetworkDhcpConfigurationsOperations( + this._client, + ); + this.virtualMachines = _getVirtualMachinesOperations(this._client); + this.skus = _getSkusOperations(this._client); + this.scriptPackages = _getScriptPackagesOperations(this._client); + this.scriptExecutions = _getScriptExecutionsOperations(this._client); + this.scriptCmdlets = _getScriptCmdletsOperations(this._client); + this.pureStoragePolicies = _getPureStoragePoliciesOperations(this._client); + this.provisionedNetworks = _getProvisionedNetworksOperations(this._client); + this.privateClouds = _getPrivateCloudsOperations(this._client); + this.placementPolicies = _getPlacementPoliciesOperations(this._client); + this.locations = _getLocationsOperations(this._client); + this.iscsiPaths = _getIscsiPathsOperations(this._client); + this.hosts = _getHostsOperations(this._client); + this.hcxEnterpriseSites = _getHcxEnterpriseSitesOperations(this._client); + this.globalReachConnections = _getGlobalReachConnectionsOperations(this._client); + this.datastores = _getDatastoresOperations(this._client); + this.clusters = _getClustersOperations(this._client); + this.cloudLinks = _getCloudLinksOperations(this._client); + this.authorizations = _getAuthorizationsOperations(this._client); + this.addons = _getAddonsOperations(this._client); + this.operations = _getOperationsOperations(this._client); + } + + /** The operation groups for workloadNetworks */ + public readonly workloadNetworks: WorkloadNetworksOperations; + /** The operation groups for workloadNetworkVmGroups */ + public readonly workloadNetworkVmGroups: WorkloadNetworkVmGroupsOperations; + /** The operation groups for workloadNetworkVirtualMachines */ + public readonly workloadNetworkVirtualMachines: WorkloadNetworkVirtualMachinesOperations; + /** The operation groups for workloadNetworkSegments */ + public readonly workloadNetworkSegments: WorkloadNetworkSegmentsOperations; + /** The operation groups for workloadNetworkPublicIps */ + public readonly workloadNetworkPublicIps: WorkloadNetworkPublicIpsOperations; + /** The operation groups for workloadNetworkPortMirroringProfiles */ + public readonly workloadNetworkPortMirroringProfiles: WorkloadNetworkPortMirroringProfilesOperations; + /** The operation groups for workloadNetworkGateways */ + public readonly workloadNetworkGateways: WorkloadNetworkGatewaysOperations; + /** The operation groups for workloadNetworkDnsZones */ + public readonly workloadNetworkDnsZones: WorkloadNetworkDnsZonesOperations; + /** The operation groups for workloadNetworkDnsServices */ + public readonly workloadNetworkDnsServices: WorkloadNetworkDnsServicesOperations; + /** The operation groups for workloadNetworkDhcpConfigurations */ + public readonly workloadNetworkDhcpConfigurations: WorkloadNetworkDhcpConfigurationsOperations; + /** The operation groups for virtualMachines */ + public readonly virtualMachines: VirtualMachinesOperations; + /** The operation groups for skus */ + public readonly skus: SkusOperations; + /** The operation groups for scriptPackages */ + public readonly scriptPackages: ScriptPackagesOperations; + /** The operation groups for scriptExecutions */ + public readonly scriptExecutions: ScriptExecutionsOperations; + /** The operation groups for scriptCmdlets */ + public readonly scriptCmdlets: ScriptCmdletsOperations; + /** The operation groups for pureStoragePolicies */ + public readonly pureStoragePolicies: PureStoragePoliciesOperations; + /** The operation groups for provisionedNetworks */ + public readonly provisionedNetworks: ProvisionedNetworksOperations; + /** The operation groups for privateClouds */ + public readonly privateClouds: PrivateCloudsOperations; + /** The operation groups for placementPolicies */ + public readonly placementPolicies: PlacementPoliciesOperations; + /** The operation groups for locations */ + public readonly locations: LocationsOperations; + /** The operation groups for iscsiPaths */ + public readonly iscsiPaths: IscsiPathsOperations; + /** The operation groups for hosts */ + public readonly hosts: HostsOperations; + /** The operation groups for hcxEnterpriseSites */ + public readonly hcxEnterpriseSites: HcxEnterpriseSitesOperations; + /** The operation groups for globalReachConnections */ + public readonly globalReachConnections: GlobalReachConnectionsOperations; + /** The operation groups for datastores */ + public readonly datastores: DatastoresOperations; + /** The operation groups for clusters */ + public readonly clusters: ClustersOperations; + /** The operation groups for cloudLinks */ + public readonly cloudLinks: CloudLinksOperations; + /** The operation groups for authorizations */ + public readonly authorizations: AuthorizationsOperations; + /** The operation groups for addons */ + public readonly addons: AddonsOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; +} 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..2b1b3ae2321b --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/addons/index.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { Addon } from "../../models/models.js"; +import { + AddonsDeleteOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsGetOptionalParams, + AddonsListOptionalParams, +} from "../../api/addons/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/addons/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Addons operations. */ +export interface AddonsOperations { + /** Delete a Addon */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a Addon */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options?: AddonsCreateOrUpdateOptionalParams, + ) => PollerLike, Addon>; + /** Get a Addon */ + get: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsGetOptionalParams, + ) => Promise; + /** List Addon resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AddonsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAddons(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, addonName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + addon: Addon, + options?: AddonsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, privateCloudName, addonName, addon, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + addonName: string, + options?: AddonsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, addonName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AddonsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getAddonsOperations(context: AzureVMwareSolutionAPIContext): AddonsOperations { + return { + ..._getAddons(context), + }; +} 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..ca095c0aa1b0 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/authorizations/index.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ExpressRouteAuthorization } from "../../models/models.js"; +import { + AuthorizationsDeleteOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsListOptionalParams, +} from "../../api/authorizations/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/authorizations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Authorizations operations. */ +export interface AuthorizationsOperations { + /** Delete a ExpressRouteAuthorization */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a ExpressRouteAuthorization */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options?: AuthorizationsCreateOrUpdateOptionalParams, + ) => PollerLike, ExpressRouteAuthorization>; + /** Get a ExpressRouteAuthorization */ + get: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsGetOptionalParams, + ) => Promise; + /** List ExpressRouteAuthorization resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AuthorizationsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAuthorizations(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, authorizationName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + authorization: ExpressRouteAuthorization, + options?: AuthorizationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + authorizationName, + authorization, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + authorizationName: string, + options?: AuthorizationsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, authorizationName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: AuthorizationsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getAuthorizationsOperations( + context: AzureVMwareSolutionAPIContext, +): AuthorizationsOperations { + return { + ..._getAuthorizations(context), + }; +} 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..3634c55ff725 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/cloudLinks/index.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { CloudLink } from "../../models/models.js"; +import { + CloudLinksDeleteOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksListOptionalParams, +} from "../../api/cloudLinks/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/cloudLinks/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a CloudLinks operations. */ +export interface CloudLinksOperations { + /** Delete a CloudLink */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a CloudLink */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options?: CloudLinksCreateOrUpdateOptionalParams, + ) => PollerLike, CloudLink>; + /** Get a CloudLink */ + get: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksGetOptionalParams, + ) => Promise; + /** List CloudLink resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: CloudLinksListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getCloudLinks(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, cloudLinkName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + cloudLink: CloudLink, + options?: CloudLinksCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + cloudLinkName, + cloudLink, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + cloudLinkName: string, + options?: CloudLinksGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, cloudLinkName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: CloudLinksListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getCloudLinksOperations( + context: AzureVMwareSolutionAPIContext, +): CloudLinksOperations { + return { + ..._getCloudLinks(context), + }; +} 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..61cd2235c51c --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/clusters/index.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { + Cluster, + ClusterUpdate, + ArmResponseCluster, + ClusterZoneList, +} from "../../models/models.js"; +import { + ClustersListZonesOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, + ClustersListOptionalParams, +} from "../../api/clusters/options.js"; +import { + listZones, + $delete, + update, + createOrUpdate, + get, + list, +} from "../../api/clusters/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Clusters operations. */ +export interface ClustersOperations { + /** List hosts by zone in a cluster */ + listZones: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersListZonesOptionalParams, + ) => Promise; + /** Delete a Cluster */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a Cluster */ + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options?: ClustersUpdateOptionalParams, + ) => PollerLike, ArmResponseCluster>; + /** Create a Cluster */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => PollerLike, Cluster>; + /** Get a Cluster */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersGetOptionalParams, + ) => Promise; + /** List Cluster resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ClustersListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getClusters(context: AzureVMwareSolutionAPIContext) { + return { + listZones: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersListZonesOptionalParams, + ) => listZones(context, resourceGroupName, privateCloudName, clusterName, options), + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, clusterName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + clusterUpdate: ClusterUpdate, + options?: ClustersUpdateOptionalParams, + ) => update(context, resourceGroupName, privateCloudName, clusterName, clusterUpdate, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + cluster: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, privateCloudName, clusterName, cluster, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: ClustersGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, clusterName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ClustersListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getClustersOperations(context: AzureVMwareSolutionAPIContext): ClustersOperations { + return { + ..._getClusters(context), + }; +} 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..bf0cb6c4078b --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/datastores/index.ts @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { Datastore } from "../../models/models.js"; +import { + DatastoresDeleteOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresGetOptionalParams, + DatastoresListOptionalParams, +} from "../../api/datastores/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/datastores/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Datastores operations. */ +export interface DatastoresOperations { + /** Delete a Datastore */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a Datastore */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options?: DatastoresCreateOrUpdateOptionalParams, + ) => PollerLike, Datastore>; + /** Get a Datastore */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresGetOptionalParams, + ) => Promise; + /** List Datastore resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: DatastoresListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getDatastores(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, clusterName, datastoreName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + datastore: Datastore, + options?: DatastoresCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + clusterName, + datastoreName, + datastore, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + datastoreName: string, + options?: DatastoresGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, clusterName, datastoreName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: DatastoresListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, clusterName, options), + }; +} + +export function _getDatastoresOperations( + context: AzureVMwareSolutionAPIContext, +): DatastoresOperations { + return { + ..._getDatastores(context), + }; +} 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..421e3e33ad3a --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/globalReachConnections/index.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { GlobalReachConnection } from "../../models/models.js"; +import { + GlobalReachConnectionsDeleteOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsListOptionalParams, +} from "../../api/globalReachConnections/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/globalReachConnections/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a GlobalReachConnections operations. */ +export interface GlobalReachConnectionsOperations { + /** Delete a GlobalReachConnection */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a GlobalReachConnection */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, + ) => PollerLike, GlobalReachConnection>; + /** Get a GlobalReachConnection */ + get: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsGetOptionalParams, + ) => Promise; + /** List GlobalReachConnection resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: GlobalReachConnectionsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getGlobalReachConnections(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, globalReachConnectionName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + globalReachConnection: GlobalReachConnection, + options?: GlobalReachConnectionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + globalReachConnectionName, + globalReachConnection, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + globalReachConnectionName: string, + options?: GlobalReachConnectionsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, globalReachConnectionName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: GlobalReachConnectionsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getGlobalReachConnectionsOperations( + context: AzureVMwareSolutionAPIContext, +): GlobalReachConnectionsOperations { + return { + ..._getGlobalReachConnections(context), + }; +} 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..4a93ef4e1699 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/hcxEnterpriseSites/index.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { HcxEnterpriseSite } from "../../models/models.js"; +import { + HcxEnterpriseSitesDeleteOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesListOptionalParams, +} from "../../api/hcxEnterpriseSites/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/hcxEnterpriseSites/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a HcxEnterpriseSites operations. */ +export interface HcxEnterpriseSitesOperations { + /** Delete a HcxEnterpriseSite */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesDeleteOptionalParams, + ) => Promise; + /** Create a HcxEnterpriseSite */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a HcxEnterpriseSite */ + get: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesGetOptionalParams, + ) => Promise; + /** List HcxEnterpriseSite resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: HcxEnterpriseSitesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getHcxEnterpriseSites(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, hcxEnterpriseSiteName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + hcxEnterpriseSite: HcxEnterpriseSite, + options?: HcxEnterpriseSitesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + hcxEnterpriseSite, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + hcxEnterpriseSiteName: string, + options?: HcxEnterpriseSitesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, hcxEnterpriseSiteName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: HcxEnterpriseSitesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getHcxEnterpriseSitesOperations( + context: AzureVMwareSolutionAPIContext, +): HcxEnterpriseSitesOperations { + return { + ..._getHcxEnterpriseSites(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/hosts/index.ts b/sdk/avs/arm-avs/src/classic/hosts/index.ts new file mode 100644 index 000000000000..9b36b6567e59 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/hosts/index.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { Host } from "../../models/models.js"; +import { HostsGetOptionalParams, HostsListOptionalParams } from "../../api/hosts/options.js"; +import { get, list } from "../../api/hosts/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Hosts operations. */ +export interface HostsOperations { + /** Get a Host */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + hostId: string, + options?: HostsGetOptionalParams, + ) => Promise; + /** List Host resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: HostsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getHosts(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + hostId: string, + options?: HostsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, clusterName, hostId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: HostsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, clusterName, options), + }; +} + +export function _getHostsOperations(context: AzureVMwareSolutionAPIContext): HostsOperations { + return { + ..._getHosts(context), + }; +} 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..551563d90472 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/index.ts @@ -0,0 +1,33 @@ +// 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 { HostsOperations } from "./hosts/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 { ProvisionedNetworksOperations } from "./provisionedNetworks/index.js"; +export { PureStoragePoliciesOperations } from "./pureStoragePolicies/index.js"; +export { ScriptCmdletsOperations } from "./scriptCmdlets/index.js"; +export { ScriptExecutionsOperations } from "./scriptExecutions/index.js"; +export { ScriptPackagesOperations } from "./scriptPackages/index.js"; +export { SkusOperations } from "./skus/index.js"; +export { VirtualMachinesOperations } from "./virtualMachines/index.js"; +export { WorkloadNetworkDhcpConfigurationsOperations } from "./workloadNetworkDhcpConfigurations/index.js"; +export { WorkloadNetworkDnsServicesOperations } from "./workloadNetworkDnsServices/index.js"; +export { WorkloadNetworkDnsZonesOperations } from "./workloadNetworkDnsZones/index.js"; +export { WorkloadNetworkGatewaysOperations } from "./workloadNetworkGateways/index.js"; +export { WorkloadNetworkPortMirroringProfilesOperations } from "./workloadNetworkPortMirroringProfiles/index.js"; +export { WorkloadNetworkPublicIpsOperations } from "./workloadNetworkPublicIps/index.js"; +export { WorkloadNetworksOperations } from "./workloadNetworks/index.js"; +export { WorkloadNetworkSegmentsOperations } from "./workloadNetworkSegments/index.js"; +export { WorkloadNetworkVirtualMachinesOperations } from "./workloadNetworkVirtualMachines/index.js"; +export { WorkloadNetworkVmGroupsOperations } from "./workloadNetworkVmGroups/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..65a86c609d09 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/iscsiPaths/index.ts @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { IscsiPath } from "../../models/models.js"; +import { + IscsiPathsDeleteOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, +} from "../../api/iscsiPaths/options.js"; +import { + $delete, + createOrUpdate, + get, + listByPrivateCloud, +} from "../../api/iscsiPaths/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a IscsiPaths operations. */ +export interface IscsiPathsOperations { + /** Delete a IscsiPath */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a IscsiPath */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + resource: IscsiPath, + options?: IscsiPathsCreateOrUpdateOptionalParams, + ) => PollerLike, IscsiPath>; + /** Get a IscsiPath */ + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsGetOptionalParams, + ) => Promise; + /** List IscsiPath resources by PrivateCloud */ + listByPrivateCloud: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsListByPrivateCloudOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getIscsiPaths(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + resource: IscsiPath, + options?: IscsiPathsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, privateCloudName, resource, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, options), + listByPrivateCloud: ( + resourceGroupName: string, + privateCloudName: string, + options?: IscsiPathsListByPrivateCloudOptionalParams, + ) => listByPrivateCloud(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getIscsiPathsOperations( + context: AzureVMwareSolutionAPIContext, +): IscsiPathsOperations { + return { + ..._getIscsiPaths(context), + }; +} 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..41e7556808c1 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/locations/index.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { Trial, Quota } from "../../models/models.js"; +import { + LocationsCheckQuotaAvailabilityOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, +} from "../../api/locations/options.js"; +import { checkQuotaAvailability, checkTrialAvailability } from "../../api/locations/operations.js"; + +/** Interface representing a Locations operations. */ +export interface LocationsOperations { + /** Return quota for subscription by region */ + checkQuotaAvailability: ( + location: string, + options?: LocationsCheckQuotaAvailabilityOptionalParams, + ) => Promise; + /** Return trial status for subscription by region */ + checkTrialAvailability: ( + location: string, + options?: LocationsCheckTrialAvailabilityOptionalParams, + ) => Promise; +} + +function _getLocations(context: AzureVMwareSolutionAPIContext) { + return { + checkQuotaAvailability: ( + location: string, + options?: LocationsCheckQuotaAvailabilityOptionalParams, + ) => checkQuotaAvailability(context, location, options), + checkTrialAvailability: ( + location: string, + options?: LocationsCheckTrialAvailabilityOptionalParams, + ) => checkTrialAvailability(context, location, options), + }; +} + +export function _getLocationsOperations( + context: AzureVMwareSolutionAPIContext, +): LocationsOperations { + return { + ..._getLocations(context), + }; +} 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..eb33ab28afcf --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/operations/index.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { Operation } from "../../models/models.js"; +import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import { list } from "../../api/operations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: AzureVMwareSolutionAPIContext) { + return { + list: (options?: OperationsListOptionalParams) => list(context, options), + }; +} + +export function _getOperationsOperations( + context: AzureVMwareSolutionAPIContext, +): 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..e0d6b43aeabb --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/placementPolicies/index.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { PlacementPolicy, PlacementPolicyUpdate } from "../../models/models.js"; +import { + PlacementPoliciesDeleteOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesListOptionalParams, +} from "../../api/placementPolicies/options.js"; +import { + $delete, + update, + createOrUpdate, + get, + list, +} from "../../api/placementPolicies/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PlacementPolicies operations. */ +export interface PlacementPoliciesOperations { + /** Delete a PlacementPolicy */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a PlacementPolicy */ + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options?: PlacementPoliciesUpdateOptionalParams, + ) => PollerLike, void>; + /** Create a PlacementPolicy */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options?: PlacementPoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, PlacementPolicy>; + /** Get a PlacementPolicy */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesGetOptionalParams, + ) => Promise; + /** List PlacementPolicy resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: PlacementPoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getPlacementPolicies(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + options, + ), + update: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicyUpdate: PlacementPolicyUpdate, + options?: PlacementPoliciesUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicyUpdate, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + placementPolicy: PlacementPolicy, + options?: PlacementPoliciesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + clusterName, + placementPolicyName, + placementPolicy, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + placementPolicyName: string, + options?: PlacementPoliciesGetOptionalParams, + ) => + get(context, resourceGroupName, privateCloudName, clusterName, placementPolicyName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: PlacementPoliciesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, clusterName, options), + }; +} + +export function _getPlacementPoliciesOperations( + context: AzureVMwareSolutionAPIContext, +): PlacementPoliciesOperations { + return { + ..._getPlacementPolicies(context), + }; +} 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..41c6892f2cd8 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/privateClouds/index.ts @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { + PrivateCloud, + PrivateCloudUpdate, + ArmResponsePrivateCloud, + AdminCredentials, +} from "../../models/models.js"; +import { + PrivateCloudsListAdminCredentialsOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsListOptionalParams, +} from "../../api/privateClouds/options.js"; +import { + listAdminCredentials, + rotateNsxtPassword, + rotateVcenterPassword, + $delete, + update, + createOrUpdate, + get, + listInSubscription, + list, +} from "../../api/privateClouds/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateClouds operations. */ +export interface PrivateCloudsOperations { + /** List the admin credentials for the private cloud */ + listAdminCredentials: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsListAdminCredentialsOptionalParams, + ) => Promise; + /** Rotate the NSX-T Manager password */ + rotateNsxtPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateNsxtPasswordOptionalParams, + ) => PollerLike, void>; + /** Rotate the vCenter password */ + rotateVcenterPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateVcenterPasswordOptionalParams, + ) => PollerLike, void>; + /** Delete a PrivateCloud */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a PrivateCloud */ + update: ( + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options?: PrivateCloudsUpdateOptionalParams, + ) => PollerLike, ArmResponsePrivateCloud>; + /** Create a PrivateCloud */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options?: PrivateCloudsCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateCloud>; + /** Get a PrivateCloud */ + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsGetOptionalParams, + ) => Promise; + /** List PrivateCloud resources by subscription ID */ + listInSubscription: ( + options?: PrivateCloudsListInSubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** List PrivateCloud resources by resource group */ + list: ( + resourceGroupName: string, + options?: PrivateCloudsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getPrivateClouds(context: AzureVMwareSolutionAPIContext) { + return { + listAdminCredentials: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsListAdminCredentialsOptionalParams, + ) => listAdminCredentials(context, resourceGroupName, privateCloudName, options), + rotateNsxtPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateNsxtPasswordOptionalParams, + ) => rotateNsxtPassword(context, resourceGroupName, privateCloudName, options), + rotateVcenterPassword: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsRotateVcenterPasswordOptionalParams, + ) => rotateVcenterPassword(context, resourceGroupName, privateCloudName, options), + delete: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + privateCloudUpdate: PrivateCloudUpdate, + options?: PrivateCloudsUpdateOptionalParams, + ) => update(context, resourceGroupName, privateCloudName, privateCloudUpdate, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + privateCloud: PrivateCloud, + options?: PrivateCloudsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, privateCloudName, privateCloud, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: PrivateCloudsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, options), + listInSubscription: (options?: PrivateCloudsListInSubscriptionOptionalParams) => + listInSubscription(context, options), + list: (resourceGroupName: string, options?: PrivateCloudsListOptionalParams) => + list(context, resourceGroupName, options), + }; +} + +export function _getPrivateCloudsOperations( + context: AzureVMwareSolutionAPIContext, +): PrivateCloudsOperations { + return { + ..._getPrivateClouds(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/provisionedNetworks/index.ts b/sdk/avs/arm-avs/src/classic/provisionedNetworks/index.ts new file mode 100644 index 000000000000..16380b569651 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/provisionedNetworks/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ProvisionedNetwork } from "../../models/models.js"; +import { + ProvisionedNetworksGetOptionalParams, + ProvisionedNetworksListOptionalParams, +} from "../../api/provisionedNetworks/options.js"; +import { get, list } from "../../api/provisionedNetworks/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProvisionedNetworks operations. */ +export interface ProvisionedNetworksOperations { + /** Get a ProvisionedNetwork */ + get: ( + resourceGroupName: string, + privateCloudName: string, + provisionedNetworkName: string, + options?: ProvisionedNetworksGetOptionalParams, + ) => Promise; + /** List ProvisionedNetwork resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ProvisionedNetworksListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProvisionedNetworks(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + provisionedNetworkName: string, + options?: ProvisionedNetworksGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, provisionedNetworkName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ProvisionedNetworksListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getProvisionedNetworksOperations( + context: AzureVMwareSolutionAPIContext, +): ProvisionedNetworksOperations { + return { + ..._getProvisionedNetworks(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/pureStoragePolicies/index.ts b/sdk/avs/arm-avs/src/classic/pureStoragePolicies/index.ts new file mode 100644 index 000000000000..2f6bfb08270f --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/pureStoragePolicies/index.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { PureStoragePolicy } from "../../models/models.js"; +import { + PureStoragePoliciesDeleteOptionalParams, + PureStoragePoliciesCreateOrUpdateOptionalParams, + PureStoragePoliciesGetOptionalParams, + PureStoragePoliciesListOptionalParams, +} from "../../api/pureStoragePolicies/options.js"; +import { $delete, createOrUpdate, get, list } from "../../api/pureStoragePolicies/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PureStoragePolicies operations. */ +export interface PureStoragePoliciesOperations { + /** Delete a PureStoragePolicy */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options?: PureStoragePoliciesDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a PureStoragePolicy */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + resource: PureStoragePolicy, + options?: PureStoragePoliciesCreateOrUpdateOptionalParams, + ) => PollerLike, PureStoragePolicy>; + /** Get a PureStoragePolicy */ + get: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options?: PureStoragePoliciesGetOptionalParams, + ) => Promise; + /** List PureStoragePolicy resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: PureStoragePoliciesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getPureStoragePolicies(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options?: PureStoragePoliciesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, storagePolicyName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + resource: PureStoragePolicy, + options?: PureStoragePoliciesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + storagePolicyName, + resource, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + storagePolicyName: string, + options?: PureStoragePoliciesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, storagePolicyName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: PureStoragePoliciesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getPureStoragePoliciesOperations( + context: AzureVMwareSolutionAPIContext, +): PureStoragePoliciesOperations { + return { + ..._getPureStoragePolicies(context), + }; +} 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..e9438cf3f4fa --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptCmdlets/index.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ScriptCmdlet } from "../../models/models.js"; +import { + ScriptCmdletsGetOptionalParams, + ScriptCmdletsListOptionalParams, +} from "../../api/scriptCmdlets/options.js"; +import { get, list } from "../../api/scriptCmdlets/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ScriptCmdlets operations. */ +export interface ScriptCmdletsOperations { + /** Get a ScriptCmdlet */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options?: ScriptCmdletsGetOptionalParams, + ) => Promise; + /** List ScriptCmdlet resources by ScriptPackage */ + list: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptCmdletsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getScriptCmdlets(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + scriptCmdletName: string, + options?: ScriptCmdletsGetOptionalParams, + ) => + get( + context, + resourceGroupName, + privateCloudName, + scriptPackageName, + scriptCmdletName, + options, + ), + list: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptCmdletsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, scriptPackageName, options), + }; +} + +export function _getScriptCmdletsOperations( + context: AzureVMwareSolutionAPIContext, +): ScriptCmdletsOperations { + return { + ..._getScriptCmdlets(context), + }; +} 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..955aef911b92 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptExecutions/index.ts @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ScriptExecution } from "../../models/models.js"; +import { + ScriptExecutionsGetExecutionLogsOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsListOptionalParams, +} from "../../api/scriptExecutions/options.js"; +import { + getExecutionLogs, + $delete, + createOrUpdate, + get, + list, +} from "../../api/scriptExecutions/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ScriptExecutions operations. */ +export interface ScriptExecutionsOperations { + /** Return the logs for a script execution resource */ + getExecutionLogs: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetExecutionLogsOptionalParams, + ) => Promise; + /** Delete a ScriptExecution */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a ScriptExecution */ + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options?: ScriptExecutionsCreateOrUpdateOptionalParams, + ) => PollerLike, ScriptExecution>; + /** Get a ScriptExecution */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetOptionalParams, + ) => Promise; + /** List ScriptExecution resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptExecutionsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getScriptExecutions(context: AzureVMwareSolutionAPIContext) { + return { + getExecutionLogs: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetExecutionLogsOptionalParams, + ) => + getExecutionLogs(context, resourceGroupName, privateCloudName, scriptExecutionName, options), + delete: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, scriptExecutionName, options), + createOrUpdate: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + scriptExecution: ScriptExecution, + options?: ScriptExecutionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + privateCloudName, + scriptExecutionName, + scriptExecution, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptExecutionName: string, + options?: ScriptExecutionsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, scriptExecutionName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptExecutionsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getScriptExecutionsOperations( + context: AzureVMwareSolutionAPIContext, +): ScriptExecutionsOperations { + return { + ..._getScriptExecutions(context), + }; +} 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..41c2e2dc25fb --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/scriptPackages/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ScriptPackage } from "../../models/models.js"; +import { + ScriptPackagesGetOptionalParams, + ScriptPackagesListOptionalParams, +} from "../../api/scriptPackages/options.js"; +import { get, list } from "../../api/scriptPackages/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ScriptPackages operations. */ +export interface ScriptPackagesOperations { + /** Get a ScriptPackage */ + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptPackagesGetOptionalParams, + ) => Promise; + /** List ScriptPackage resources by PrivateCloud */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptPackagesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getScriptPackages(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + scriptPackageName: string, + options?: ScriptPackagesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, scriptPackageName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: ScriptPackagesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getScriptPackagesOperations( + context: AzureVMwareSolutionAPIContext, +): ScriptPackagesOperations { + return { + ..._getScriptPackages(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/skus/index.ts b/sdk/avs/arm-avs/src/classic/skus/index.ts new file mode 100644 index 000000000000..074516a6431e --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/skus/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { ResourceSku } from "../../models/models.js"; +import { SkusListOptionalParams } from "../../api/skus/options.js"; +import { list } from "../../api/skus/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Skus operations. */ +export interface SkusOperations { + /** A list of SKUs. */ + list: (options?: SkusListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getSkus(context: AzureVMwareSolutionAPIContext) { + return { + list: (options?: SkusListOptionalParams) => list(context, options), + }; +} + +export function _getSkusOperations(context: AzureVMwareSolutionAPIContext): SkusOperations { + return { + ..._getSkus(context), + }; +} 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..1e7c39c1de27 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/virtualMachines/index.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { VirtualMachine, VirtualMachineRestrictMovement } from "../../models/models.js"; +import { + VirtualMachinesRestrictMovementOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesListOptionalParams, +} from "../../api/virtualMachines/options.js"; +import { restrictMovement, get, list } from "../../api/virtualMachines/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualMachines operations. */ +export interface VirtualMachinesOperations { + /** Enable or disable DRS-driven VM movement restriction */ + restrictMovement: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options?: VirtualMachinesRestrictMovementOptionalParams, + ) => PollerLike, void>; + /** Get a VirtualMachine */ + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options?: VirtualMachinesGetOptionalParams, + ) => Promise; + /** List VirtualMachine resources by Cluster */ + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: VirtualMachinesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getVirtualMachines(context: AzureVMwareSolutionAPIContext) { + return { + restrictMovement: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + restrictMovementParameter: VirtualMachineRestrictMovement, + options?: VirtualMachinesRestrictMovementOptionalParams, + ) => + restrictMovement( + context, + resourceGroupName, + privateCloudName, + clusterName, + virtualMachineId, + restrictMovementParameter, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + virtualMachineId: string, + options?: VirtualMachinesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, clusterName, virtualMachineId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + clusterName: string, + options?: VirtualMachinesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, clusterName, options), + }; +} + +export function _getVirtualMachinesOperations( + context: AzureVMwareSolutionAPIContext, +): VirtualMachinesOperations { + return { + ..._getVirtualMachines(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkDhcpConfigurations/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkDhcpConfigurations/index.ts new file mode 100644 index 000000000000..5a6f4cbb4ab3 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkDhcpConfigurations/index.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkDhcp } from "../../models/models.js"; +import { + WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + WorkloadNetworkDhcpConfigurationsGetOptionalParams, + WorkloadNetworkDhcpConfigurationsListOptionalParams, +} from "../../api/workloadNetworkDhcpConfigurations/options.js"; +import { + $delete, + update, + create, + get, + list, +} from "../../api/workloadNetworkDhcpConfigurations/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkDhcpConfigurations operations. */ +export interface WorkloadNetworkDhcpConfigurationsOperations { + /** Delete a WorkloadNetworkDhcp */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + options?: WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkDhcp */ + update: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkDhcp>; + /** Create a WorkloadNetworkDhcp */ + create: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + ) => PollerLike, WorkloadNetworkDhcp>; + /** Get a WorkloadNetworkDhcp */ + get: ( + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options?: WorkloadNetworkDhcpConfigurationsGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkDhcp resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDhcpConfigurationsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkDhcpConfigurations(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + options?: WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, privateCloudName, dhcpId, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + ) => update(context, resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, options), + create: ( + resourceGroupName: string, + privateCloudName: string, + dhcpId: string, + workloadNetworkDhcp: WorkloadNetworkDhcp, + options?: WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + ) => create(context, resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, options), + get: ( + resourceGroupName: string, + dhcpId: string, + privateCloudName: string, + options?: WorkloadNetworkDhcpConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, dhcpId, privateCloudName, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDhcpConfigurationsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkDhcpConfigurationsOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkDhcpConfigurationsOperations { + return { + ..._getWorkloadNetworkDhcpConfigurations(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkDnsServices/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkDnsServices/index.ts new file mode 100644 index 000000000000..3a50951d7a74 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkDnsServices/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkDnsService } from "../../models/models.js"; +import { + WorkloadNetworkDnsServicesDeleteOptionalParams, + WorkloadNetworkDnsServicesUpdateOptionalParams, + WorkloadNetworkDnsServicesCreateOptionalParams, + WorkloadNetworkDnsServicesGetOptionalParams, + WorkloadNetworkDnsServicesListOptionalParams, +} from "../../api/workloadNetworkDnsServices/options.js"; +import { + $delete, + update, + create, + get, + list, +} from "../../api/workloadNetworkDnsServices/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkDnsServices operations. */ +export interface WorkloadNetworkDnsServicesOperations { + /** Delete a WorkloadNetworkDnsService */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options?: WorkloadNetworkDnsServicesDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkDnsService */ + update: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworkDnsServicesUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkDnsService>; + /** Create a WorkloadNetworkDnsService */ + create: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworkDnsServicesCreateOptionalParams, + ) => PollerLike, WorkloadNetworkDnsService>; + /** Get a WorkloadNetworkDnsService */ + get: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + options?: WorkloadNetworkDnsServicesGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkDnsService resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDnsServicesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkDnsServices(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + dnsServiceId: string, + privateCloudName: string, + options?: WorkloadNetworkDnsServicesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, dnsServiceId, privateCloudName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworkDnsServicesUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + create: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + workloadNetworkDnsService: WorkloadNetworkDnsService, + options?: WorkloadNetworkDnsServicesCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + dnsServiceId, + workloadNetworkDnsService, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + dnsServiceId: string, + options?: WorkloadNetworkDnsServicesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, dnsServiceId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDnsServicesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkDnsServicesOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkDnsServicesOperations { + return { + ..._getWorkloadNetworkDnsServices(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkDnsZones/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkDnsZones/index.ts new file mode 100644 index 000000000000..0b624f356166 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkDnsZones/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkDnsZone } from "../../models/models.js"; +import { + WorkloadNetworkDnsZonesDeleteOptionalParams, + WorkloadNetworkDnsZonesUpdateOptionalParams, + WorkloadNetworkDnsZonesCreateOptionalParams, + WorkloadNetworkDnsZonesGetOptionalParams, + WorkloadNetworkDnsZonesListOptionalParams, +} from "../../api/workloadNetworkDnsZones/options.js"; +import { + $delete, + update, + create, + get, + list, +} from "../../api/workloadNetworkDnsZones/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkDnsZones operations. */ +export interface WorkloadNetworkDnsZonesOperations { + /** Delete a WorkloadNetworkDnsZone */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options?: WorkloadNetworkDnsZonesDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkDnsZone */ + update: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworkDnsZonesUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkDnsZone>; + /** Create a WorkloadNetworkDnsZone */ + create: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworkDnsZonesCreateOptionalParams, + ) => PollerLike, WorkloadNetworkDnsZone>; + /** Get a WorkloadNetworkDnsZone */ + get: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + options?: WorkloadNetworkDnsZonesGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkDnsZone resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDnsZonesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkDnsZones(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + dnsZoneId: string, + privateCloudName: string, + options?: WorkloadNetworkDnsZonesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, dnsZoneId, privateCloudName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworkDnsZonesUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + create: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + workloadNetworkDnsZone: WorkloadNetworkDnsZone, + options?: WorkloadNetworkDnsZonesCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + dnsZoneId, + workloadNetworkDnsZone, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + dnsZoneId: string, + options?: WorkloadNetworkDnsZonesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, dnsZoneId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkDnsZonesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkDnsZonesOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkDnsZonesOperations { + return { + ..._getWorkloadNetworkDnsZones(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkGateways/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkGateways/index.ts new file mode 100644 index 000000000000..e6321d362298 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkGateways/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkGateway } from "../../models/models.js"; +import { + WorkloadNetworkGatewaysGetOptionalParams, + WorkloadNetworkGatewaysListOptionalParams, +} from "../../api/workloadNetworkGateways/options.js"; +import { get, list } from "../../api/workloadNetworkGateways/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkloadNetworkGateways operations. */ +export interface WorkloadNetworkGatewaysOperations { + /** Get a WorkloadNetworkGateway */ + get: ( + resourceGroupName: string, + privateCloudName: string, + gatewayId: string, + options?: WorkloadNetworkGatewaysGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkGateway resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkGatewaysListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkGateways(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + gatewayId: string, + options?: WorkloadNetworkGatewaysGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, gatewayId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkGatewaysListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkGatewaysOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkGatewaysOperations { + return { + ..._getWorkloadNetworkGateways(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkPortMirroringProfiles/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkPortMirroringProfiles/index.ts new file mode 100644 index 000000000000..f207c2d76758 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkPortMirroringProfiles/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkPortMirroring } from "../../models/models.js"; +import { + WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + WorkloadNetworkPortMirroringProfilesGetOptionalParams, + WorkloadNetworkPortMirroringProfilesListOptionalParams, +} from "../../api/workloadNetworkPortMirroringProfiles/options.js"; +import { + $delete, + update, + create, + get, + list, +} from "../../api/workloadNetworkPortMirroringProfiles/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkPortMirroringProfiles operations. */ +export interface WorkloadNetworkPortMirroringProfilesOperations { + /** Delete a WorkloadNetworkPortMirroring */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options?: WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkPortMirroring */ + update: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkPortMirroring>; + /** Create a WorkloadNetworkPortMirroring */ + create: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + ) => PollerLike, WorkloadNetworkPortMirroring>; + /** Get a WorkloadNetworkPortMirroring */ + get: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + options?: WorkloadNetworkPortMirroringProfilesGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkPortMirroring resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkPortMirroringProfilesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkPortMirroringProfiles(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + portMirroringId: string, + privateCloudName: string, + options?: WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, portMirroringId, privateCloudName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + create: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + workloadNetworkPortMirroring: WorkloadNetworkPortMirroring, + options?: WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + portMirroringId, + workloadNetworkPortMirroring, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + portMirroringId: string, + options?: WorkloadNetworkPortMirroringProfilesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, portMirroringId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkPortMirroringProfilesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkPortMirroringProfilesOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkPortMirroringProfilesOperations { + return { + ..._getWorkloadNetworkPortMirroringProfiles(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkPublicIps/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkPublicIps/index.ts new file mode 100644 index 000000000000..c175915190cf --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkPublicIps/index.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkPublicIP } from "../../models/models.js"; +import { + WorkloadNetworkPublicIpsDeleteOptionalParams, + WorkloadNetworkPublicIpsCreateOptionalParams, + WorkloadNetworkPublicIpsGetOptionalParams, + WorkloadNetworkPublicIpsListOptionalParams, +} from "../../api/workloadNetworkPublicIps/options.js"; +import { $delete, create, get, list } from "../../api/workloadNetworkPublicIps/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkPublicIps operations. */ +export interface WorkloadNetworkPublicIpsOperations { + /** Delete a WorkloadNetworkPublicIP */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options?: WorkloadNetworkPublicIpsDeleteOptionalParams, + ) => PollerLike, void>; + /** Create a WorkloadNetworkPublicIP */ + create: ( + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options?: WorkloadNetworkPublicIpsCreateOptionalParams, + ) => PollerLike, WorkloadNetworkPublicIP>; + /** Get a WorkloadNetworkPublicIP */ + get: ( + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + options?: WorkloadNetworkPublicIpsGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkPublicIP resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkPublicIpsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkPublicIps(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + publicIPId: string, + privateCloudName: string, + options?: WorkloadNetworkPublicIpsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, publicIPId, privateCloudName, options), + create: ( + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + workloadNetworkPublicIP: WorkloadNetworkPublicIP, + options?: WorkloadNetworkPublicIpsCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + publicIPId, + workloadNetworkPublicIP, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + publicIPId: string, + options?: WorkloadNetworkPublicIpsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, publicIPId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkPublicIpsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkPublicIpsOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkPublicIpsOperations { + return { + ..._getWorkloadNetworkPublicIps(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkSegments/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkSegments/index.ts new file mode 100644 index 000000000000..00708fff0c78 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkSegments/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkSegment } from "../../models/models.js"; +import { + WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + WorkloadNetworkSegmentsUpdateOptionalParams, + WorkloadNetworkSegmentsCreateOptionalParams, + WorkloadNetworkSegmentsGetOptionalParams, + WorkloadNetworkSegmentsListOptionalParams, +} from "../../api/workloadNetworkSegments/options.js"; +import { + deleteSegment, + update, + create, + get, + list, +} from "../../api/workloadNetworkSegments/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkSegments operations. */ +export interface WorkloadNetworkSegmentsOperations { + /** Delete a WorkloadNetworkSegment */ + deleteSegment: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options?: WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkSegment */ + update: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworkSegmentsUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkSegment>; + /** Create a WorkloadNetworkSegment */ + create: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworkSegmentsCreateOptionalParams, + ) => PollerLike, WorkloadNetworkSegment>; + /** Get a WorkloadNetworkSegment */ + get: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options?: WorkloadNetworkSegmentsGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkSegment resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkSegmentsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkSegments(context: AzureVMwareSolutionAPIContext) { + return { + deleteSegment: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options?: WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + ) => deleteSegment(context, resourceGroupName, privateCloudName, segmentId, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworkSegmentsUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options, + ), + create: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + workloadNetworkSegment: WorkloadNetworkSegment, + options?: WorkloadNetworkSegmentsCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + segmentId, + workloadNetworkSegment, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + segmentId: string, + options?: WorkloadNetworkSegmentsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, segmentId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkSegmentsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkSegmentsOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkSegmentsOperations { + return { + ..._getWorkloadNetworkSegments(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkVirtualMachines/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkVirtualMachines/index.ts new file mode 100644 index 000000000000..5b081a71c8d8 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkVirtualMachines/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkVirtualMachine } from "../../models/models.js"; +import { + WorkloadNetworkVirtualMachinesGetOptionalParams, + WorkloadNetworkVirtualMachinesListOptionalParams, +} from "../../api/workloadNetworkVirtualMachines/options.js"; +import { get, list } from "../../api/workloadNetworkVirtualMachines/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkloadNetworkVirtualMachines operations. */ +export interface WorkloadNetworkVirtualMachinesOperations { + /** Get a WorkloadNetworkVirtualMachine */ + get: ( + resourceGroupName: string, + privateCloudName: string, + virtualMachineId: string, + options?: WorkloadNetworkVirtualMachinesGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkVirtualMachine resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkVirtualMachinesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkVirtualMachines(context: AzureVMwareSolutionAPIContext) { + return { + get: ( + resourceGroupName: string, + privateCloudName: string, + virtualMachineId: string, + options?: WorkloadNetworkVirtualMachinesGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, virtualMachineId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkVirtualMachinesListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkVirtualMachinesOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkVirtualMachinesOperations { + return { + ..._getWorkloadNetworkVirtualMachines(context), + }; +} diff --git a/sdk/avs/arm-avs/src/classic/workloadNetworkVmGroups/index.ts b/sdk/avs/arm-avs/src/classic/workloadNetworkVmGroups/index.ts new file mode 100644 index 000000000000..64d750eadcd6 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworkVmGroups/index.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetworkVMGroup } from "../../models/models.js"; +import { + WorkloadNetworkVmGroupsDeleteOptionalParams, + WorkloadNetworkVmGroupsUpdateOptionalParams, + WorkloadNetworkVmGroupsCreateOptionalParams, + WorkloadNetworkVmGroupsGetOptionalParams, + WorkloadNetworkVmGroupsListOptionalParams, +} from "../../api/workloadNetworkVmGroups/options.js"; +import { + $delete, + update, + create, + get, + list, +} from "../../api/workloadNetworkVmGroups/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkloadNetworkVmGroups operations. */ +export interface WorkloadNetworkVmGroupsOperations { + /** Delete a WorkloadNetworkVMGroup */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options?: WorkloadNetworkVmGroupsDeleteOptionalParams, + ) => PollerLike, void>; + /** Update a WorkloadNetworkVMGroup */ + update: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworkVmGroupsUpdateOptionalParams, + ) => PollerLike, WorkloadNetworkVMGroup>; + /** Create a WorkloadNetworkVMGroup */ + create: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworkVmGroupsCreateOptionalParams, + ) => PollerLike, WorkloadNetworkVMGroup>; + /** Get a WorkloadNetworkVMGroup */ + get: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + options?: WorkloadNetworkVmGroupsGetOptionalParams, + ) => Promise; + /** List WorkloadNetworkVMGroup resources by WorkloadNetwork */ + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkVmGroupsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkloadNetworkVmGroups(context: AzureVMwareSolutionAPIContext) { + return { + delete: ( + resourceGroupName: string, + vmGroupId: string, + privateCloudName: string, + options?: WorkloadNetworkVmGroupsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, vmGroupId, privateCloudName, options), + update: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworkVmGroupsUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + create: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + workloadNetworkVMGroup: WorkloadNetworkVMGroup, + options?: WorkloadNetworkVmGroupsCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + privateCloudName, + vmGroupId, + workloadNetworkVMGroup, + options, + ), + get: ( + resourceGroupName: string, + privateCloudName: string, + vmGroupId: string, + options?: WorkloadNetworkVmGroupsGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, vmGroupId, options), + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworkVmGroupsListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworkVmGroupsOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworkVmGroupsOperations { + return { + ..._getWorkloadNetworkVmGroups(context), + }; +} 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..f1e80e3c8052 --- /dev/null +++ b/sdk/avs/arm-avs/src/classic/workloadNetworks/index.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIContext } from "../../api/azureVMwareSolutionAPIContext.js"; +import { WorkloadNetwork } from "../../models/models.js"; +import { + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, +} from "../../api/workloadNetworks/options.js"; +import { list, get } from "../../api/workloadNetworks/operations.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** 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, + options?: WorkloadNetworksGetOptionalParams, + ) => Promise; +} + +function _getWorkloadNetworks(context: AzureVMwareSolutionAPIContext) { + return { + list: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworksListOptionalParams, + ) => list(context, resourceGroupName, privateCloudName, options), + get: ( + resourceGroupName: string, + privateCloudName: string, + options?: WorkloadNetworksGetOptionalParams, + ) => get(context, resourceGroupName, privateCloudName, options), + }; +} + +export function _getWorkloadNetworksOperations( + context: AzureVMwareSolutionAPIContext, +): WorkloadNetworksOperations { + return { + ..._getWorkloadNetworks(context), + }; +} diff --git a/sdk/avs/arm-avs/src/index.ts b/sdk/avs/arm-avs/src/index.ts index 76aa5ee83db7..e7ae851f206c 100644 --- a/sdk/avs/arm-avs/src/index.ts +++ b/sdk/avs/arm-avs/src/index.ts @@ -1,13 +1,474 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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.js"; -export * from "./models/index.js"; -export { AzureVMwareSolutionAPI } from "./azureVMwareSolutionAPI.js"; -export * from "./operationsInterfaces/index.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { AzureVMwareSolutionAPIClient } from "./azureVMwareSolutionAPIClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + Addon, + AddonProperties, + AddonPropertiesUnion, + KnownAddonType, + AddonType, + KnownAddonProvisioningState, + AddonProvisioningState, + AddonSrmProperties, + AddonVrProperties, + AddonHcxProperties, + AddonArcProperties, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ExpressRouteAuthorization, + ExpressRouteAuthorizationProperties, + KnownExpressRouteAuthorizationProvisioningState, + ExpressRouteAuthorizationProvisioningState, + CloudLink, + CloudLinkProperties, + KnownCloudLinkProvisioningState, + CloudLinkProvisioningState, + KnownCloudLinkStatus, + CloudLinkStatus, + Cluster, + ClusterProperties, + KnownClusterProvisioningState, + ClusterProvisioningState, + Sku, + SkuTier, + ClusterUpdate, + ClusterUpdateProperties, + ArmResponseCluster, + ClusterZoneList, + ClusterZone, + Datastore, + DatastoreProperties, + KnownDatastoreProvisioningState, + DatastoreProvisioningState, + NetAppVolume, + DiskPoolVolume, + KnownMountOptionEnum, + MountOptionEnum, + ElasticSanVolume, + PureStorageVolume, + KnownDatastoreStatus, + DatastoreStatus, + GlobalReachConnection, + GlobalReachConnectionProperties, + KnownGlobalReachConnectionProvisioningState, + GlobalReachConnectionProvisioningState, + KnownGlobalReachConnectionStatus, + GlobalReachConnectionStatus, + HcxEnterpriseSite, + HcxEnterpriseSiteProperties, + KnownHcxEnterpriseSiteProvisioningState, + HcxEnterpriseSiteProvisioningState, + KnownHcxEnterpriseSiteStatus, + HcxEnterpriseSiteStatus, + Host, + HostProperties, + HostPropertiesUnion, + KnownHostKind, + HostKind, + KnownHostProvisioningState, + HostProvisioningState, + KnownHostMaintenance, + HostMaintenance, + GeneralHostProperties, + SpecializedHostProperties, + IscsiPath, + IscsiPathProperties, + KnownIscsiPathProvisioningState, + IscsiPathProvisioningState, + Trial, + KnownTrialStatus, + TrialStatus, + Quota, + KnownQuotaEnabled, + QuotaEnabled, + PlacementPolicy, + PlacementPolicyProperties, + PlacementPolicyPropertiesUnion, + KnownPlacementPolicyType, + PlacementPolicyType, + KnownPlacementPolicyState, + PlacementPolicyState, + KnownPlacementPolicyProvisioningState, + PlacementPolicyProvisioningState, + VmVmPlacementPolicyProperties, + KnownAffinityType, + AffinityType, + VmHostPlacementPolicyProperties, + KnownAffinityStrength, + AffinityStrength, + KnownAzureHybridBenefitType, + AzureHybridBenefitType, + PlacementPolicyUpdate, + PlacementPolicyUpdateProperties, + 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, + SystemAssignedServiceIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + PrivateCloudUpdate, + PrivateCloudUpdateProperties, + ArmResponsePrivateCloud, + AdminCredentials, + ProvisionedNetwork, + ProvisionedNetworkProperties, + KnownProvisionedNetworkProvisioningState, + ProvisionedNetworkProvisioningState, + KnownProvisionedNetworkTypes, + ProvisionedNetworkTypes, + PureStoragePolicy, + PureStoragePolicyProperties, + KnownPureStoragePolicyProvisioningState, + PureStoragePolicyProvisioningState, + ScriptCmdlet, + ScriptCmdletProperties, + KnownScriptCmdletProvisioningState, + ScriptCmdletProvisioningState, + KnownScriptCmdletAudience, + ScriptCmdletAudience, + ScriptParameter, + KnownScriptParameterTypes, + ScriptParameterTypes, + KnownVisibilityParameterEnum, + VisibilityParameterEnum, + KnownOptionalParamEnum, + OptionalParamEnum, + ScriptExecution, + ScriptExecutionProperties, + ScriptExecutionParameter, + ScriptExecutionParameterUnion, + KnownScriptExecutionParameterType, + ScriptExecutionParameterType, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + PSCredentialExecutionParameter, + KnownScriptExecutionProvisioningState, + ScriptExecutionProvisioningState, + ScriptPackage, + ScriptPackageProperties, + KnownScriptPackageProvisioningState, + ScriptPackageProvisioningState, + ResourceSku, + KnownResourceSkuResourceType, + ResourceSkuResourceType, + ResourceSkuLocationInfo, + ResourceSkuZoneDetails, + ResourceSkuCapabilities, + ResourceSkuRestrictions, + KnownResourceSkuRestrictionsType, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionInfo, + KnownResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsReasonCode, + VirtualMachine, + VirtualMachineProperties, + KnownVirtualMachineProvisioningState, + VirtualMachineProvisioningState, + KnownVirtualMachineRestrictMovementState, + VirtualMachineRestrictMovementState, + VirtualMachineRestrictMovement, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpEntityUnion, + KnownDhcpTypeEnum, + DhcpTypeEnum, + KnownWorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpServer, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDnsService, + WorkloadNetworkDnsServiceProperties, + KnownDnsServiceLogLevelEnum, + DnsServiceLogLevelEnum, + KnownDnsServiceStatusEnum, + DnsServiceStatusEnum, + KnownWorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsZone, + WorkloadNetworkDnsZoneProperties, + KnownWorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkGateway, + WorkloadNetworkGatewayProperties, + KnownWorkloadNetworkProvisioningState, + WorkloadNetworkProvisioningState, + WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroringProperties, + KnownPortMirroringDirectionEnum, + PortMirroringDirectionEnum, + KnownPortMirroringStatusEnum, + PortMirroringStatusEnum, + KnownWorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPublicIP, + WorkloadNetworkPublicIPProperties, + KnownWorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkSegment, + WorkloadNetworkSegmentProperties, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkSegmentPortVif, + KnownSegmentStatusEnum, + SegmentStatusEnum, + KnownWorkloadNetworkSegmentProvisioningState, + WorkloadNetworkSegmentProvisioningState, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVirtualMachineProperties, + KnownVMTypeEnum, + VMTypeEnum, + WorkloadNetworkVMGroup, + WorkloadNetworkVMGroupProperties, + KnownVMGroupStatusEnum, + VMGroupStatusEnum, + KnownWorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVMGroupProvisioningState, + WorkloadNetwork, + WorkloadNetworkProperties, + KnownScriptOutputStreamType, + ScriptOutputStreamType, + KnownVersions, +} from "./models/index.js"; +export { AzureVMwareSolutionAPIClientOptionalParams } from "./api/index.js"; +export { + AddonsDeleteOptionalParams, + AddonsCreateOrUpdateOptionalParams, + AddonsGetOptionalParams, + AddonsListOptionalParams, +} from "./api/addons/index.js"; +export { + AuthorizationsDeleteOptionalParams, + AuthorizationsCreateOrUpdateOptionalParams, + AuthorizationsGetOptionalParams, + AuthorizationsListOptionalParams, +} from "./api/authorizations/index.js"; +export { + CloudLinksDeleteOptionalParams, + CloudLinksCreateOrUpdateOptionalParams, + CloudLinksGetOptionalParams, + CloudLinksListOptionalParams, +} from "./api/cloudLinks/index.js"; +export { + ClustersListZonesOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, + ClustersListOptionalParams, +} from "./api/clusters/index.js"; +export { + DatastoresDeleteOptionalParams, + DatastoresCreateOrUpdateOptionalParams, + DatastoresGetOptionalParams, + DatastoresListOptionalParams, +} from "./api/datastores/index.js"; +export { + GlobalReachConnectionsDeleteOptionalParams, + GlobalReachConnectionsCreateOrUpdateOptionalParams, + GlobalReachConnectionsGetOptionalParams, + GlobalReachConnectionsListOptionalParams, +} from "./api/globalReachConnections/index.js"; +export { + HcxEnterpriseSitesDeleteOptionalParams, + HcxEnterpriseSitesCreateOrUpdateOptionalParams, + HcxEnterpriseSitesGetOptionalParams, + HcxEnterpriseSitesListOptionalParams, +} from "./api/hcxEnterpriseSites/index.js"; +export { HostsGetOptionalParams, HostsListOptionalParams } from "./api/hosts/index.js"; +export { + IscsiPathsDeleteOptionalParams, + IscsiPathsCreateOrUpdateOptionalParams, + IscsiPathsGetOptionalParams, + IscsiPathsListByPrivateCloudOptionalParams, +} from "./api/iscsiPaths/index.js"; +export { + LocationsCheckQuotaAvailabilityOptionalParams, + LocationsCheckTrialAvailabilityOptionalParams, +} from "./api/locations/index.js"; +export { OperationsListOptionalParams } from "./api/operations/index.js"; +export { + PlacementPoliciesDeleteOptionalParams, + PlacementPoliciesUpdateOptionalParams, + PlacementPoliciesCreateOrUpdateOptionalParams, + PlacementPoliciesGetOptionalParams, + PlacementPoliciesListOptionalParams, +} from "./api/placementPolicies/index.js"; +export { + PrivateCloudsListAdminCredentialsOptionalParams, + PrivateCloudsRotateNsxtPasswordOptionalParams, + PrivateCloudsRotateVcenterPasswordOptionalParams, + PrivateCloudsDeleteOptionalParams, + PrivateCloudsUpdateOptionalParams, + PrivateCloudsCreateOrUpdateOptionalParams, + PrivateCloudsGetOptionalParams, + PrivateCloudsListInSubscriptionOptionalParams, + PrivateCloudsListOptionalParams, +} from "./api/privateClouds/index.js"; +export { + ProvisionedNetworksGetOptionalParams, + ProvisionedNetworksListOptionalParams, +} from "./api/provisionedNetworks/index.js"; +export { + PureStoragePoliciesDeleteOptionalParams, + PureStoragePoliciesCreateOrUpdateOptionalParams, + PureStoragePoliciesGetOptionalParams, + PureStoragePoliciesListOptionalParams, +} from "./api/pureStoragePolicies/index.js"; +export { + ScriptCmdletsGetOptionalParams, + ScriptCmdletsListOptionalParams, +} from "./api/scriptCmdlets/index.js"; +export { + ScriptExecutionsGetExecutionLogsOptionalParams, + ScriptExecutionsDeleteOptionalParams, + ScriptExecutionsCreateOrUpdateOptionalParams, + ScriptExecutionsGetOptionalParams, + ScriptExecutionsListOptionalParams, +} from "./api/scriptExecutions/index.js"; +export { + ScriptPackagesGetOptionalParams, + ScriptPackagesListOptionalParams, +} from "./api/scriptPackages/index.js"; +export { SkusListOptionalParams } from "./api/skus/index.js"; +export { + VirtualMachinesRestrictMovementOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesListOptionalParams, +} from "./api/virtualMachines/index.js"; +export { + WorkloadNetworkDhcpConfigurationsDeleteOptionalParams, + WorkloadNetworkDhcpConfigurationsUpdateOptionalParams, + WorkloadNetworkDhcpConfigurationsCreateOptionalParams, + WorkloadNetworkDhcpConfigurationsGetOptionalParams, + WorkloadNetworkDhcpConfigurationsListOptionalParams, +} from "./api/workloadNetworkDhcpConfigurations/index.js"; +export { + WorkloadNetworkDnsServicesDeleteOptionalParams, + WorkloadNetworkDnsServicesUpdateOptionalParams, + WorkloadNetworkDnsServicesCreateOptionalParams, + WorkloadNetworkDnsServicesGetOptionalParams, + WorkloadNetworkDnsServicesListOptionalParams, +} from "./api/workloadNetworkDnsServices/index.js"; +export { + WorkloadNetworkDnsZonesDeleteOptionalParams, + WorkloadNetworkDnsZonesUpdateOptionalParams, + WorkloadNetworkDnsZonesCreateOptionalParams, + WorkloadNetworkDnsZonesGetOptionalParams, + WorkloadNetworkDnsZonesListOptionalParams, +} from "./api/workloadNetworkDnsZones/index.js"; +export { + WorkloadNetworkGatewaysGetOptionalParams, + WorkloadNetworkGatewaysListOptionalParams, +} from "./api/workloadNetworkGateways/index.js"; +export { + WorkloadNetworkPortMirroringProfilesDeleteOptionalParams, + WorkloadNetworkPortMirroringProfilesUpdateOptionalParams, + WorkloadNetworkPortMirroringProfilesCreateOptionalParams, + WorkloadNetworkPortMirroringProfilesGetOptionalParams, + WorkloadNetworkPortMirroringProfilesListOptionalParams, +} from "./api/workloadNetworkPortMirroringProfiles/index.js"; +export { + WorkloadNetworkPublicIpsDeleteOptionalParams, + WorkloadNetworkPublicIpsCreateOptionalParams, + WorkloadNetworkPublicIpsGetOptionalParams, + WorkloadNetworkPublicIpsListOptionalParams, +} from "./api/workloadNetworkPublicIps/index.js"; +export { + WorkloadNetworksListOptionalParams, + WorkloadNetworksGetOptionalParams, +} from "./api/workloadNetworks/index.js"; +export { + WorkloadNetworkSegmentsDeleteSegmentOptionalParams, + WorkloadNetworkSegmentsUpdateOptionalParams, + WorkloadNetworkSegmentsCreateOptionalParams, + WorkloadNetworkSegmentsGetOptionalParams, + WorkloadNetworkSegmentsListOptionalParams, +} from "./api/workloadNetworkSegments/index.js"; +export { + WorkloadNetworkVirtualMachinesGetOptionalParams, + WorkloadNetworkVirtualMachinesListOptionalParams, +} from "./api/workloadNetworkVirtualMachines/index.js"; +export { + WorkloadNetworkVmGroupsDeleteOptionalParams, + WorkloadNetworkVmGroupsUpdateOptionalParams, + WorkloadNetworkVmGroupsCreateOptionalParams, + WorkloadNetworkVmGroupsGetOptionalParams, + WorkloadNetworkVmGroupsListOptionalParams, +} from "./api/workloadNetworkVmGroups/index.js"; +export { + AddonsOperations, + AuthorizationsOperations, + CloudLinksOperations, + ClustersOperations, + DatastoresOperations, + GlobalReachConnectionsOperations, + HcxEnterpriseSitesOperations, + HostsOperations, + IscsiPathsOperations, + LocationsOperations, + OperationsOperations, + PlacementPoliciesOperations, + PrivateCloudsOperations, + ProvisionedNetworksOperations, + PureStoragePoliciesOperations, + ScriptCmdletsOperations, + ScriptExecutionsOperations, + ScriptPackagesOperations, + SkusOperations, + VirtualMachinesOperations, + WorkloadNetworkDhcpConfigurationsOperations, + WorkloadNetworkDnsServicesOperations, + WorkloadNetworkDnsZonesOperations, + WorkloadNetworkGatewaysOperations, + WorkloadNetworkPortMirroringProfilesOperations, + WorkloadNetworkPublicIpsOperations, + WorkloadNetworksOperations, + WorkloadNetworkSegmentsOperations, + WorkloadNetworkVirtualMachinesOperations, + WorkloadNetworkVmGroupsOperations, +} 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 d8bc98987053..000000000000 --- a/sdk/avs/arm-avs/src/lroImpl.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. - */ -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..b1784b0376b9 100644 --- a/sdk/avs/arm-avs/src/models/index.ts +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -1,4409 +1,267 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + Addon, + AddonProperties, + AddonPropertiesUnion, + KnownAddonType, + AddonType, + KnownAddonProvisioningState, + AddonProvisioningState, + AddonSrmProperties, + AddonVrProperties, + AddonHcxProperties, + AddonArcProperties, + ProxyResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ExpressRouteAuthorization, + ExpressRouteAuthorizationProperties, + KnownExpressRouteAuthorizationProvisioningState, + ExpressRouteAuthorizationProvisioningState, + CloudLink, + CloudLinkProperties, + KnownCloudLinkProvisioningState, + CloudLinkProvisioningState, + KnownCloudLinkStatus, + CloudLinkStatus, + Cluster, + ClusterProperties, + KnownClusterProvisioningState, + ClusterProvisioningState, + Sku, + SkuTier, + ClusterUpdate, + ClusterUpdateProperties, + ArmResponseCluster, + ClusterZoneList, + ClusterZone, + Datastore, + DatastoreProperties, + KnownDatastoreProvisioningState, + DatastoreProvisioningState, + NetAppVolume, + DiskPoolVolume, + KnownMountOptionEnum, + MountOptionEnum, + ElasticSanVolume, + PureStorageVolume, + KnownDatastoreStatus, + DatastoreStatus, + GlobalReachConnection, + GlobalReachConnectionProperties, + KnownGlobalReachConnectionProvisioningState, + GlobalReachConnectionProvisioningState, + KnownGlobalReachConnectionStatus, + GlobalReachConnectionStatus, + HcxEnterpriseSite, + HcxEnterpriseSiteProperties, + KnownHcxEnterpriseSiteProvisioningState, + HcxEnterpriseSiteProvisioningState, + KnownHcxEnterpriseSiteStatus, + HcxEnterpriseSiteStatus, + Host, + HostProperties, + HostPropertiesUnion, + KnownHostKind, + HostKind, + KnownHostProvisioningState, + HostProvisioningState, + KnownHostMaintenance, + HostMaintenance, + GeneralHostProperties, + SpecializedHostProperties, + IscsiPath, + IscsiPathProperties, + KnownIscsiPathProvisioningState, + IscsiPathProvisioningState, + Trial, + KnownTrialStatus, + TrialStatus, + Quota, + KnownQuotaEnabled, + QuotaEnabled, + PlacementPolicy, + PlacementPolicyProperties, + PlacementPolicyPropertiesUnion, + KnownPlacementPolicyType, + PlacementPolicyType, + KnownPlacementPolicyState, + PlacementPolicyState, + KnownPlacementPolicyProvisioningState, + PlacementPolicyProvisioningState, + VmVmPlacementPolicyProperties, + KnownAffinityType, + AffinityType, + VmHostPlacementPolicyProperties, + KnownAffinityStrength, + AffinityStrength, + KnownAzureHybridBenefitType, + AzureHybridBenefitType, + PlacementPolicyUpdate, + PlacementPolicyUpdateProperties, + 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, + SystemAssignedServiceIdentity, + KnownSystemAssignedServiceIdentityType, + SystemAssignedServiceIdentityType, + TrackedResource, + PrivateCloudUpdate, + PrivateCloudUpdateProperties, + ArmResponsePrivateCloud, + AdminCredentials, + ProvisionedNetwork, + ProvisionedNetworkProperties, + KnownProvisionedNetworkProvisioningState, + ProvisionedNetworkProvisioningState, + KnownProvisionedNetworkTypes, + ProvisionedNetworkTypes, + PureStoragePolicy, + PureStoragePolicyProperties, + KnownPureStoragePolicyProvisioningState, + PureStoragePolicyProvisioningState, + ScriptCmdlet, + ScriptCmdletProperties, + KnownScriptCmdletProvisioningState, + ScriptCmdletProvisioningState, + KnownScriptCmdletAudience, + ScriptCmdletAudience, + ScriptParameter, + KnownScriptParameterTypes, + ScriptParameterTypes, + KnownVisibilityParameterEnum, + VisibilityParameterEnum, + KnownOptionalParamEnum, + OptionalParamEnum, + ScriptExecution, + ScriptExecutionProperties, + ScriptExecutionParameter, + ScriptExecutionParameterUnion, + KnownScriptExecutionParameterType, + ScriptExecutionParameterType, + ScriptSecureStringExecutionParameter, + ScriptStringExecutionParameter, + PSCredentialExecutionParameter, + KnownScriptExecutionProvisioningState, + ScriptExecutionProvisioningState, + ScriptPackage, + ScriptPackageProperties, + KnownScriptPackageProvisioningState, + ScriptPackageProvisioningState, + ResourceSku, + KnownResourceSkuResourceType, + ResourceSkuResourceType, + ResourceSkuLocationInfo, + ResourceSkuZoneDetails, + ResourceSkuCapabilities, + ResourceSkuRestrictions, + KnownResourceSkuRestrictionsType, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionInfo, + KnownResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsReasonCode, + VirtualMachine, + VirtualMachineProperties, + KnownVirtualMachineProvisioningState, + VirtualMachineProvisioningState, + KnownVirtualMachineRestrictMovementState, + VirtualMachineRestrictMovementState, + VirtualMachineRestrictMovement, + WorkloadNetworkDhcp, + WorkloadNetworkDhcpEntity, + WorkloadNetworkDhcpEntityUnion, + KnownDhcpTypeEnum, + DhcpTypeEnum, + KnownWorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpProvisioningState, + WorkloadNetworkDhcpServer, + WorkloadNetworkDhcpRelay, + WorkloadNetworkDnsService, + WorkloadNetworkDnsServiceProperties, + KnownDnsServiceLogLevelEnum, + DnsServiceLogLevelEnum, + KnownDnsServiceStatusEnum, + DnsServiceStatusEnum, + KnownWorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsServiceProvisioningState, + WorkloadNetworkDnsZone, + WorkloadNetworkDnsZoneProperties, + KnownWorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkDnsZoneProvisioningState, + WorkloadNetworkGateway, + WorkloadNetworkGatewayProperties, + KnownWorkloadNetworkProvisioningState, + WorkloadNetworkProvisioningState, + WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroringProperties, + KnownPortMirroringDirectionEnum, + PortMirroringDirectionEnum, + KnownPortMirroringStatusEnum, + PortMirroringStatusEnum, + KnownWorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPortMirroringProvisioningState, + WorkloadNetworkPublicIP, + WorkloadNetworkPublicIPProperties, + KnownWorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkPublicIPProvisioningState, + WorkloadNetworkSegment, + WorkloadNetworkSegmentProperties, + WorkloadNetworkSegmentSubnet, + WorkloadNetworkSegmentPortVif, + KnownSegmentStatusEnum, + SegmentStatusEnum, + KnownWorkloadNetworkSegmentProvisioningState, + WorkloadNetworkSegmentProvisioningState, + WorkloadNetworkVirtualMachine, + WorkloadNetworkVirtualMachineProperties, + KnownVMTypeEnum, + VMTypeEnum, + WorkloadNetworkVMGroup, + WorkloadNetworkVMGroupProperties, + KnownVMGroupStatusEnum, + VMGroupStatusEnum, + KnownWorkloadNetworkVMGroupProvisioningState, + WorkloadNetworkVMGroupProvisioningState, + WorkloadNetwork, + WorkloadNetworkProperties, + 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..3c98edaf3ce4 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/models.ts @@ -0,0 +1,5957 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** 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. */ + UserSystem = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo { + return item; +} + +/** 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"; + /** HCX management network. */ + managementNetwork?: string; + /** HCX uplink network */ + uplinkNetwork?: string; +} + +export function addonHcxPropertiesSerializer(item: AddonHcxProperties): any { + return { + addonType: item["addonType"], + offer: item["offer"], + managementNetwork: item["managementNetwork"], + uplinkNetwork: item["uplinkNetwork"], + }; +} + +export function addonHcxPropertiesDeserializer(item: any): AddonHcxProperties { + return { + addonType: item["addonType"], + provisioningState: item["provisioningState"], + offer: item["offer"], + managementNetwork: item["managementNetwork"], + uplinkNetwork: item["uplinkNetwork"], + }; +} + +/** 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 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 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 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 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; + }), + }; +} + +/** Azure operation completed successfully. */ +export interface ArmResponseCluster { + /** The body type of the operation request or response. */ + body: Cluster; +} + +export function armResponseClusterDeserializer(item: any): ArmResponseCluster { + return { + body: clusterDeserializer(item["body"]), + }; +} + +/** 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 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; + /** A Pure Storage volume */ + pureStorageVolume?: PureStorageVolume; + /** 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"]), + pureStorageVolume: !item["pureStorageVolume"] + ? item["pureStorageVolume"] + : pureStorageVolumeSerializer(item["pureStorageVolume"]), + }; +} + +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"]), + pureStorageVolume: !item["pureStorageVolume"] + ? item["pureStorageVolume"] + : pureStorageVolumeDeserializer(item["pureStorageVolume"]), + 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"], + }; +} + +/** A Pure Storage volume from PureStorage.Block provider */ +export interface PureStorageVolume { + /** Azure resource ID of the Pure Storage Pool */ + storagePoolId: string; + /** Volume size to be used to create a Virtual Volumes (vVols) datastore */ + sizeGb: number; +} + +export function pureStorageVolumeSerializer(item: PureStorageVolume): any { + return { storagePoolId: item["storagePoolId"], sizeGb: item["sizeGb"] }; +} + +export function pureStorageVolumeDeserializer(item: any): PureStorageVolume { + return { + storagePoolId: item["storagePoolId"], + sizeGb: item["sizeGb"], + }; +} + +/** 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 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 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 Host list operation. */ +export interface _HostListResult { + /** The Host items on this page */ + value: Host[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _hostListResultDeserializer(item: any): _HostListResult { + return { + value: hostArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function hostArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return hostDeserializer(item); + }); +} + +/** A host resource */ +export interface Host extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: HostPropertiesUnion; + /** The availability zones. */ + zones?: string[]; + /** The SKU (Stock Keeping Unit) assigned to this resource. */ + sku?: Sku; +} + +export function hostDeserializer(item: any): Host { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : hostPropertiesUnionDeserializer(item["properties"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + sku: !item["sku"] ? item["sku"] : skuDeserializer(item["sku"]), + }; +} + +/** The properties of a host. */ +export interface HostProperties { + /** The kind of host */ + /** The discriminator possible values: General, Specialized */ + kind: HostKind; + /** The state of the host provisioning. */ + readonly provisioningState?: HostProvisioningState; + /** Display name of the host in VMware vCenter. */ + displayName?: string; + /** vCenter managed object reference ID of the host. */ + readonly moRefId?: string; + /** Fully qualified domain name of the host. */ + readonly fqdn?: string; + /** If provided, the host is in maintenance. The value is the reason for maintenance. */ + maintenance?: HostMaintenance; + readonly faultDomain?: string; +} + +export function hostPropertiesDeserializer(item: any): HostProperties { + return { + kind: item["kind"], + provisioningState: item["provisioningState"], + displayName: item["displayName"], + moRefId: item["moRefId"], + fqdn: item["fqdn"], + maintenance: item["maintenance"], + faultDomain: item["faultDomain"], + }; +} + +/** Alias for HostPropertiesUnion */ +export type HostPropertiesUnion = + | GeneralHostProperties + | SpecializedHostProperties + | HostProperties; + +export function hostPropertiesUnionDeserializer(item: any): HostPropertiesUnion { + switch (item.kind) { + case "General": + return generalHostPropertiesDeserializer(item as GeneralHostProperties); + + case "Specialized": + return specializedHostPropertiesDeserializer(item as SpecializedHostProperties); + + default: + return hostPropertiesDeserializer(item); + } +} + +/** The kind of host. */ +export enum KnownHostKind { + General = "General", + Specialized = "Specialized", +} + +/** + * The kind of host. \ + * {@link KnownHostKind} can be used interchangeably with HostKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **General** \ + * **Specialized** + */ +export type HostKind = string; + +/** provisioning state of the host */ +export enum KnownHostProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * provisioning state of the host \ + * {@link KnownHostProvisioningState} can be used interchangeably with HostProvisioningState, + * 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 HostProvisioningState = string; + +/** The reason for host maintenance. */ +export enum KnownHostMaintenance { + /** The host is a replacement host. */ + Replacement = "Replacement", + /** The host is for an upgrade, such as an upgrade to ESXi, NSX-T, or other component. */ + Upgrade = "Upgrade", +} + +/** + * The reason for host maintenance. \ + * {@link KnownHostMaintenance} can be used interchangeably with HostMaintenance, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Replacement**: The host is a replacement host. \ + * **Upgrade**: The host is for an upgrade, such as an upgrade to ESXi, NSX-T, or other component. + */ +export type HostMaintenance = string; + +/** The properties of a general host. */ +export interface GeneralHostProperties extends HostProperties { + /** The kind of host. */ + kind: "General"; +} + +export function generalHostPropertiesDeserializer(item: any): GeneralHostProperties { + return { + kind: item["kind"], + provisioningState: item["provisioningState"], + displayName: item["displayName"], + moRefId: item["moRefId"], + fqdn: item["fqdn"], + maintenance: item["maintenance"], + faultDomain: item["faultDomain"], + }; +} + +/** The properties of a specialized host. */ +export interface SpecializedHostProperties extends HostProperties { + /** The kind of host is specialized. */ + kind: "Specialized"; +} + +export function specializedHostPropertiesDeserializer(item: any): SpecializedHostProperties { + return { + kind: item["kind"], + provisioningState: item["provisioningState"], + displayName: item["displayName"], + moRefId: item["moRefId"], + fqdn: item["fqdn"], + maintenance: item["maintenance"], + faultDomain: item["faultDomain"], + }; +} + +/** 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; + +/** 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; + +/** 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 = + | VmVmPlacementPolicyProperties + | VmHostPlacementPolicyProperties + | PlacementPolicyProperties; + +export function placementPolicyPropertiesUnionSerializer( + item: PlacementPolicyPropertiesUnion, +): any { + switch (item.type) { + case "VmVm": + return vmVmPlacementPolicyPropertiesSerializer(item as VmVmPlacementPolicyProperties); + + case "VmHost": + return vmHostPlacementPolicyPropertiesSerializer(item as VmHostPlacementPolicyProperties); + + default: + return placementPolicyPropertiesSerializer(item); + } +} + +export function placementPolicyPropertiesUnionDeserializer( + item: any, +): PlacementPolicyPropertiesUnion { + switch (item.type) { + case "VmVm": + return vmVmPlacementPolicyPropertiesDeserializer(item as VmVmPlacementPolicyProperties); + + 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 VmVmPlacementPolicyProperties extends PlacementPolicyProperties { + /** Virtual machine members list */ + vmMembers: string[]; + /** placement policy affinity type */ + affinityType: AffinityType; + /** placement policy type */ + type: "VmVm"; +} + +export function vmVmPlacementPolicyPropertiesSerializer(item: VmVmPlacementPolicyProperties): any { + return { + type: item["type"], + state: item["state"], + displayName: item["displayName"], + vmMembers: item["vmMembers"].map((p: any) => { + return p; + }), + affinityType: item["affinityType"], + }; +} + +export function vmVmPlacementPolicyPropertiesDeserializer( + item: any, +): VmVmPlacementPolicyProperties { + 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 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?: SystemAssignedServiceIdentity; + /** The availability zones. */ + zones?: string[]; +} + +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"] + : systemAssignedServiceIdentitySerializer(item["identity"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +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"] + : systemAssignedServiceIdentityDeserializer(item["identity"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** 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 SystemAssignedServiceIdentity { + /** 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 systemAssignedServiceIdentitySerializer(item: SystemAssignedServiceIdentity): any { + return { type: item["type"] }; +} + +export function systemAssignedServiceIdentityDeserializer( + item: any, +): SystemAssignedServiceIdentity { + 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?: SystemAssignedServiceIdentity; + /** 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"] + : systemAssignedServiceIdentitySerializer(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"], + }; +} + +/** Azure operation completed successfully. */ +export interface ArmResponsePrivateCloud { + /** The body type of the operation request or response. */ + body: PrivateCloud; +} + +export function armResponsePrivateCloudDeserializer(item: any): ArmResponsePrivateCloud { + return { + body: privateCloudDeserializer(item["body"]), + }; +} + +/** 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"], + }; +} + +/** The response of a ProvisionedNetwork list operation. */ +export interface _ProvisionedNetworkListResult { + /** The ProvisionedNetwork items on this page */ + value: ProvisionedNetwork[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _provisionedNetworkListResultDeserializer( + item: any, +): _ProvisionedNetworkListResult { + return { + value: provisionedNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function provisionedNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return provisionedNetworkDeserializer(item); + }); +} + +/** A provisioned network resource */ +export interface ProvisionedNetwork extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: ProvisionedNetworkProperties; +} + +export function provisionedNetworkDeserializer(item: any): ProvisionedNetwork { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : provisionedNetworkPropertiesDeserializer(item["properties"]), + }; +} + +/** The properties of a provisioned network. */ +export interface ProvisionedNetworkProperties { + /** The provisioning state of the resource. */ + readonly provisioningState?: ProvisionedNetworkProvisioningState; + /** The address prefixes of the provisioned network in CIDR notation. */ + readonly addressPrefix?: string; + /** The type of network provisioned. */ + readonly networkType?: ProvisionedNetworkTypes; +} + +export function provisionedNetworkPropertiesDeserializer(item: any): ProvisionedNetworkProperties { + return { + provisioningState: item["provisioningState"], + addressPrefix: item["addressPrefix"], + networkType: item["networkType"], + }; +} + +/** provisioned network provisioning state */ +export enum KnownProvisionedNetworkProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", +} + +/** + * provisioned network provisioning state \ + * {@link KnownProvisionedNetworkProvisioningState} can be used interchangeably with ProvisionedNetworkProvisioningState, + * 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 ProvisionedNetworkProvisioningState = string; + +/** The type of network provisioned. */ +export enum KnownProvisionedNetworkTypes { + /** network for ESX management */ + EsxManagement = "esxManagement", + /** network for ESX replication */ + EsxReplication = "esxReplication", + /** network for HCX management */ + HcxManagement = "hcxManagement", + /** network for HCX uplink */ + HcxUplink = "hcxUplink", + /** network for vCenter management */ + VcenterManagement = "vcenterManagement", + /** network for vmotion */ + Vmotion = "vmotion", + /** network for vsan */ + Vsan = "vsan", +} + +/** + * The type of network provisioned. \ + * {@link KnownProvisionedNetworkTypes} can be used interchangeably with ProvisionedNetworkTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **esxManagement**: network for ESX management \ + * **esxReplication**: network for ESX replication \ + * **hcxManagement**: network for HCX management \ + * **hcxUplink**: network for HCX uplink \ + * **vcenterManagement**: network for vCenter management \ + * **vmotion**: network for vmotion \ + * **vsan**: network for vsan + */ +export type ProvisionedNetworkTypes = string; + +/** The response of a PureStoragePolicy list operation. */ +export interface _PureStoragePolicyListResult { + /** The PureStoragePolicy items on this page */ + value: PureStoragePolicy[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _pureStoragePolicyListResultDeserializer(item: any): _PureStoragePolicyListResult { + return { + value: pureStoragePolicyArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function pureStoragePolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return pureStoragePolicySerializer(item); + }); +} + +export function pureStoragePolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return pureStoragePolicyDeserializer(item); + }); +} + +/** An instance describing a Pure Storage Policy Based Management policy */ +export interface PureStoragePolicy extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: PureStoragePolicyProperties; +} + +export function pureStoragePolicySerializer(item: PureStoragePolicy): any { + return { + properties: !item["properties"] + ? item["properties"] + : pureStoragePolicyPropertiesSerializer(item["properties"]), + }; +} + +export function pureStoragePolicyDeserializer(item: any): PureStoragePolicy { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : pureStoragePolicyPropertiesDeserializer(item["properties"]), + }; +} + +/** Properties of a Pure Storage Policy Based Management policy */ +export interface PureStoragePolicyProperties { + /** Definition of a Pure Storage Policy Based Management policy */ + storagePolicyDefinition: string; + /** Azure resource ID of the Pure Storage Pool associated with the storage policy */ + storagePoolId: string; + /** The state of the Pure Storage Policy Based Management policy provisioning */ + readonly provisioningState?: PureStoragePolicyProvisioningState; +} + +export function pureStoragePolicyPropertiesSerializer(item: PureStoragePolicyProperties): any { + return { + storagePolicyDefinition: item["storagePolicyDefinition"], + storagePoolId: item["storagePoolId"], + }; +} + +export function pureStoragePolicyPropertiesDeserializer(item: any): PureStoragePolicyProperties { + return { + storagePolicyDefinition: item["storagePolicyDefinition"], + storagePoolId: item["storagePoolId"], + provisioningState: item["provisioningState"], + }; +} + +/** Pure Storage Policy Based Management policy provisioning state */ +export enum KnownPureStoragePolicyProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** is deleting */ + Deleting = "Deleting", + /** is updating */ + Updating = "Updating", +} + +/** + * Pure Storage Policy Based Management policy provisioning state \ + * {@link KnownPureStoragePolicyProvisioningState} can be used interchangeably with PureStoragePolicyProvisioningState, + * 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. \ + * **Deleting**: is deleting \ + * **Updating**: is updating + */ +export type PureStoragePolicyProvisioningState = 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; +} + +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 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 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; + +/** Paged collection of ResourceSku items */ +export interface _PagedResourceSku { + /** The ResourceSku items on this page */ + value: ResourceSku[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _pagedResourceSkuDeserializer(item: any): _PagedResourceSku { + return { + value: resourceSkuArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function resourceSkuArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return resourceSkuDeserializer(item); + }); +} + +/** A SKU for a resource. */ +export interface ResourceSku { + /** The type of resource the SKU applies to. */ + resourceType: ResourceSkuResourceType; + /** The name of the SKU. */ + name: string; + /** The tier of virtual machines in a scale set */ + tier?: string; + /** The size of the SKU. */ + size?: string; + /** The family of the SKU. */ + family?: string; + /** The set of locations that the SKU is available. */ + locations: string[]; + /** A list of locations and availability zones in those locations where the SKU is available */ + locationInfo: ResourceSkuLocationInfo[]; + /** Name value pairs to describe the capability. */ + capabilities?: ResourceSkuCapabilities[]; + /** The restrictions of the SKU. */ + restrictions: ResourceSkuRestrictions[]; +} + +export function resourceSkuDeserializer(item: any): ResourceSku { + return { + resourceType: item["resourceType"], + name: item["name"], + tier: item["tier"], + size: item["size"], + family: item["family"], + locations: item["locations"].map((p: any) => { + return p; + }), + locationInfo: resourceSkuLocationInfoArrayDeserializer(item["locationInfo"]), + capabilities: !item["capabilities"] + ? item["capabilities"] + : resourceSkuCapabilitiesArrayDeserializer(item["capabilities"]), + restrictions: resourceSkuRestrictionsArrayDeserializer(item["restrictions"]), + }; +} + +/** Describes the type of resource the SKU applies to. */ +export enum KnownResourceSkuResourceType { + /** The SKU is for a private cloud. */ + PrivateClouds = "privateClouds", + /** The SKU is for a private cloud cluster. */ + PrivateCloudsClusters = "privateClouds/clusters", +} + +/** + * Describes the type of resource the SKU applies to. \ + * {@link KnownResourceSkuResourceType} can be used interchangeably with ResourceSkuResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **privateClouds**: The SKU is for a private cloud. \ + * **privateClouds\/clusters**: The SKU is for a private cloud cluster. + */ +export type ResourceSkuResourceType = string; + +export function resourceSkuLocationInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceSkuLocationInfoDeserializer(item); + }); +} + +/** Describes an available Compute SKU Location Information. */ +export interface ResourceSkuLocationInfo { + /** Location of the SKU */ + location: string; + /** List of availability zones where the SKU is supported. */ + zones: string[]; + /** Gets details of capabilities available to a SKU in specific zones. */ + zoneDetails: ResourceSkuZoneDetails[]; +} + +export function resourceSkuLocationInfoDeserializer(item: any): ResourceSkuLocationInfo { + return { + location: item["location"], + zones: item["zones"].map((p: any) => { + return p; + }), + zoneDetails: resourceSkuZoneDetailsArrayDeserializer(item["zoneDetails"]), + }; +} + +export function resourceSkuZoneDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceSkuZoneDetailsDeserializer(item); + }); +} + +/** Describes The zonal capabilities of a SKU. */ +export interface ResourceSkuZoneDetails { + /** Gets the set of zones that the SKU is available in with the specified capabilities. */ + name: string[]; + /** A list of capabilities that are available for the SKU in the specified list of zones. */ + capabilities: ResourceSkuCapabilities[]; +} + +export function resourceSkuZoneDetailsDeserializer(item: any): ResourceSkuZoneDetails { + return { + name: item["name"].map((p: any) => { + return p; + }), + capabilities: resourceSkuCapabilitiesArrayDeserializer(item["capabilities"]), + }; +} + +export function resourceSkuCapabilitiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceSkuCapabilitiesDeserializer(item); + }); +} + +/** Describes The SKU capabilities object. */ +export interface ResourceSkuCapabilities { + /** The name of the SKU capability. */ + name: string; + /** The value of the SKU capability. */ + value: string; +} + +export function resourceSkuCapabilitiesDeserializer(item: any): ResourceSkuCapabilities { + return { + name: item["name"], + value: item["value"], + }; +} + +export function resourceSkuRestrictionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceSkuRestrictionsDeserializer(item); + }); +} + +/** The restrictions of the SKU. */ +export interface ResourceSkuRestrictions { + /** the type of restrictions. */ + type?: ResourceSkuRestrictionsType; + /** The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. */ + values: string[]; + /** The information about the restriction where the SKU cannot be used. */ + restrictionInfo: ResourceSkuRestrictionInfo; + /** the reason for restriction. */ + reasonCode?: ResourceSkuRestrictionsReasonCode; +} + +export function resourceSkuRestrictionsDeserializer(item: any): ResourceSkuRestrictions { + return { + type: item["type"], + values: item["values"].map((p: any) => { + return p; + }), + restrictionInfo: resourceSkuRestrictionInfoDeserializer(item["restrictionInfo"]), + reasonCode: item["reasonCode"], + }; +} + +/** Describes the kind of SKU restrictions that can exist */ +export enum KnownResourceSkuRestrictionsType { + /** SKU restricted by location. */ + Location = "Location", + /** SKU restricted by availability zone. */ + Zone = "Zone", +} + +/** + * Describes the kind of SKU restrictions that can exist \ + * {@link KnownResourceSkuRestrictionsType} can be used interchangeably with ResourceSkuRestrictionsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Location**: SKU restricted by location. \ + * **Zone**: SKU restricted by availability zone. + */ +export type ResourceSkuRestrictionsType = string; + +/** Describes an available Compute SKU Restriction Information. */ +export interface ResourceSkuRestrictionInfo { + /** Locations where the SKU is restricted */ + locations?: string[]; + /** List of availability zones where the SKU is restricted. */ + zones?: string[]; +} + +export function resourceSkuRestrictionInfoDeserializer(item: any): ResourceSkuRestrictionInfo { + return { + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Describes the reason for SKU restriction. */ +export enum KnownResourceSkuRestrictionsReasonCode { + /** The restriction is due to exceeding a quota limitation. */ + QuotaId = "QuotaId", + /** The restriction is not available for this subscription. */ + NotAvailableForSubscription = "NotAvailableForSubscription", +} + +/** + * Describes the reason for SKU restriction. \ + * {@link KnownResourceSkuRestrictionsReasonCode} can be used interchangeably with ResourceSkuRestrictionsReasonCode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **QuotaId**: The restriction is due to exceeding a quota limitation. \ + * **NotAvailableForSubscription**: The restriction is not available for this subscription. + */ +export type ResourceSkuRestrictionsReasonCode = string; + +/** 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; + /** vCenter managed object reference ID of the virtual machine */ + 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 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 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 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"], + }; +} + +/** 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 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 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 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 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 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; + +/** 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"], + }; +} + +/** 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); + }); +} + +/** 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. */ + V20230901 = "2023-09-01", + /** Azure VMware Solution API version 2024-09-01. */ + V20240901 = "2024-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 93285fafa864..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.js"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "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 c9966b179994..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.js"; -import { Addons } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - Addon, - AddonsListNextOptionalParams, - AddonsListOptionalParams, - AddonsListResponse, - AddonsGetOptionalParams, - AddonsGetResponse, - AddonsCreateOrUpdateOptionalParams, - AddonsCreateOrUpdateResponse, - AddonsDeleteOptionalParams, - AddonsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 fb756d82d970..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.js"; -import { Authorizations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ExpressRouteAuthorization, - AuthorizationsListNextOptionalParams, - AuthorizationsListOptionalParams, - AuthorizationsListResponse, - AuthorizationsGetOptionalParams, - AuthorizationsGetResponse, - AuthorizationsCreateOrUpdateOptionalParams, - AuthorizationsCreateOrUpdateResponse, - AuthorizationsDeleteOptionalParams, - AuthorizationsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 3d4c4e432571..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.js"; -import { CloudLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - CloudLink, - CloudLinksListNextOptionalParams, - CloudLinksListOptionalParams, - CloudLinksListResponse, - CloudLinksGetOptionalParams, - CloudLinksGetResponse, - CloudLinksCreateOrUpdateOptionalParams, - CloudLinksCreateOrUpdateResponse, - CloudLinksDeleteOptionalParams, - CloudLinksListNextResponse, -} from "../models/index.js"; - -/// -/** 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 fe1db15578d5..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.js"; -import { Clusters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - Cluster, - ClustersListNextOptionalParams, - ClustersListOptionalParams, - ClustersListResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClusterUpdate, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersListZonesOptionalParams, - ClustersListZonesResponse, - ClustersListNextResponse, -} from "../models/index.js"; - -/// -/** 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 8062671d8a15..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.js"; -import { Datastores } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - Datastore, - DatastoresListNextOptionalParams, - DatastoresListOptionalParams, - DatastoresListResponse, - DatastoresGetOptionalParams, - DatastoresGetResponse, - DatastoresCreateOrUpdateOptionalParams, - DatastoresCreateOrUpdateResponse, - DatastoresDeleteOptionalParams, - DatastoresListNextResponse, -} from "../models/index.js"; - -/// -/** 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 6ad6008a92c7..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.js"; -import { GlobalReachConnections } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - GlobalReachConnection, - GlobalReachConnectionsListNextOptionalParams, - GlobalReachConnectionsListOptionalParams, - GlobalReachConnectionsListResponse, - GlobalReachConnectionsGetOptionalParams, - GlobalReachConnectionsGetResponse, - GlobalReachConnectionsCreateOrUpdateOptionalParams, - GlobalReachConnectionsCreateOrUpdateResponse, - GlobalReachConnectionsDeleteOptionalParams, - GlobalReachConnectionsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 a6f010ac8186..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.js"; -import { HcxEnterpriseSites } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - HcxEnterpriseSite, - HcxEnterpriseSitesListNextOptionalParams, - HcxEnterpriseSitesListOptionalParams, - HcxEnterpriseSitesListResponse, - HcxEnterpriseSitesGetOptionalParams, - HcxEnterpriseSitesGetResponse, - HcxEnterpriseSitesCreateOrUpdateOptionalParams, - HcxEnterpriseSitesCreateOrUpdateResponse, - HcxEnterpriseSitesDeleteOptionalParams, - HcxEnterpriseSitesListNextResponse, -} from "../models/index.js"; - -/// -/** 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 ee1071d19a18..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.js"; -export * from "./locations.js"; -export * from "./privateClouds.js"; -export * from "./addons.js"; -export * from "./authorizations.js"; -export * from "./cloudLinks.js"; -export * from "./clusters.js"; -export * from "./datastores.js"; -export * from "./placementPolicies.js"; -export * from "./virtualMachines.js"; -export * from "./globalReachConnections.js"; -export * from "./hcxEnterpriseSites.js"; -export * from "./iscsiPaths.js"; -export * from "./scriptExecutions.js"; -export * from "./scriptPackages.js"; -export * from "./scriptCmdlets.js"; -export * from "./workloadNetworks.js"; 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 9e0665491830..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.js"; -import { IscsiPaths } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - IscsiPath, - IscsiPathsListByPrivateCloudNextOptionalParams, - IscsiPathsListByPrivateCloudOptionalParams, - IscsiPathsListByPrivateCloudResponse, - IscsiPathsGetOptionalParams, - IscsiPathsGetResponse, - IscsiPathsCreateOrUpdateOptionalParams, - IscsiPathsCreateOrUpdateResponse, - IscsiPathsDeleteOptionalParams, - IscsiPathsListByPrivateCloudNextResponse, -} from "../models/index.js"; - -/// -/** 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 a0035bdab9fc..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/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - LocationsCheckQuotaAvailabilityOptionalParams, - LocationsCheckQuotaAvailabilityResponse, - LocationsCheckTrialAvailabilityOptionalParams, - LocationsCheckTrialAvailabilityResponse, -} from "../models/index.js"; - -/** 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 0240c1740eb0..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.js"; -import { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 a2bd95b8306c..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.js"; -import { PlacementPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PlacementPolicy, - PlacementPoliciesListNextOptionalParams, - PlacementPoliciesListOptionalParams, - PlacementPoliciesListResponse, - PlacementPoliciesGetOptionalParams, - PlacementPoliciesGetResponse, - PlacementPoliciesCreateOrUpdateOptionalParams, - PlacementPoliciesCreateOrUpdateResponse, - PlacementPolicyUpdate, - PlacementPoliciesUpdateOptionalParams, - PlacementPoliciesUpdateResponse, - PlacementPoliciesDeleteOptionalParams, - PlacementPoliciesListNextResponse, -} from "../models/index.js"; - -/// -/** 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 0f7f53097ae8..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.js"; -import { PrivateClouds } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -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/index.js"; - -/// -/** 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 97d21490cf87..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.js"; -import { ScriptCmdlets } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - ScriptCmdlet, - ScriptCmdletsListNextOptionalParams, - ScriptCmdletsListOptionalParams, - ScriptCmdletsListResponse, - ScriptCmdletsGetOptionalParams, - ScriptCmdletsGetResponse, - ScriptCmdletsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 42c27bdfdefa..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.js"; -import { ScriptExecutions } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ScriptExecution, - ScriptExecutionsListNextOptionalParams, - ScriptExecutionsListOptionalParams, - ScriptExecutionsListResponse, - ScriptExecutionsGetOptionalParams, - ScriptExecutionsGetResponse, - ScriptExecutionsCreateOrUpdateOptionalParams, - ScriptExecutionsCreateOrUpdateResponse, - ScriptExecutionsDeleteOptionalParams, - ScriptExecutionsGetExecutionLogsOptionalParams, - ScriptExecutionsGetExecutionLogsResponse, - ScriptExecutionsListNextResponse, -} from "../models/index.js"; - -/// -/** 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 afed7877e995..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.js"; -import { ScriptPackages } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - ScriptPackage, - ScriptPackagesListNextOptionalParams, - ScriptPackagesListOptionalParams, - ScriptPackagesListResponse, - ScriptPackagesGetOptionalParams, - ScriptPackagesGetResponse, - ScriptPackagesListNextResponse, -} from "../models/index.js"; - -/// -/** 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 f7751e678ce5..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.js"; -import { VirtualMachines } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - VirtualMachine, - VirtualMachinesListNextOptionalParams, - VirtualMachinesListOptionalParams, - VirtualMachinesListResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachineRestrictMovement, - VirtualMachinesRestrictMovementOptionalParams, - VirtualMachinesRestrictMovementResponse, - VirtualMachinesListNextResponse, -} from "../models/index.js"; - -/// -/** 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 f49372a22dfa..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.js"; -import { WorkloadNetworks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { AzureVMwareSolutionAPI } from "../azureVMwareSolutionAPI.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -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/index.js"; - -/// -/** 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 646a8eeac056..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/index.js"; - -/// -/** 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 27138d4148ad..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/index.js"; - -/// -/** 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 057cf05c06e3..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/index.js"; - -/// -/** 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 6ce600c9a62d..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/index.js"; - -/// -/** 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 ce78748a25f8..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/index.js"; - -/// -/** 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 a70d54b831fd..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/index.js"; - -/// -/** 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 f7acc5e76031..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/index.js"; - -/// -/** 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 ee1071d19a18..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.js"; -export * from "./locations.js"; -export * from "./privateClouds.js"; -export * from "./addons.js"; -export * from "./authorizations.js"; -export * from "./cloudLinks.js"; -export * from "./clusters.js"; -export * from "./datastores.js"; -export * from "./placementPolicies.js"; -export * from "./virtualMachines.js"; -export * from "./globalReachConnections.js"; -export * from "./hcxEnterpriseSites.js"; -export * from "./iscsiPaths.js"; -export * from "./scriptExecutions.js"; -export * from "./scriptPackages.js"; -export * from "./scriptCmdlets.js"; -export * from "./workloadNetworks.js"; 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 c19d4756c9aa..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/index.js"; - -/// -/** 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 7f23411d5b5e..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/index.js"; - -/** 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 2c280c7eb723..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/index.js"; - -/// -/** 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 17cc93473388..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/index.js"; - -/// -/** 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 b02d090b6c5a..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/index.js"; - -/// -/** 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 20063ca326bc..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/index.js"; - -/// -/** 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 82aef5b71199..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/index.js"; - -/// -/** 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 1ae2c5e49982..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/index.js"; - -/// -/** 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 d1592a274401..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/index.js"; - -/// -/** 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 d25dbaa5fa4a..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/index.js"; - -/// -/** 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..a9c13375da23 --- /dev/null +++ b/sdk/avs/arm-avs/src/restorePollerHelpers.ts @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureVMwareSolutionAPIClient } from "./azureVMwareSolutionAPIClient.js"; +import { + _$deleteDeserialize, + _updateDeserialize, + _createDeserialize, +} from "./api/workloadNetworkVmGroups/operations.js"; +import { + _deleteSegmentDeserialize, + _updateDeserialize as _updateDeserializeWorkloadNetworkSegments, + _createDeserialize as _createDeserializeWorkloadNetworkSegments, +} from "./api/workloadNetworkSegments/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeWorkloadNetworkPublicIps, + _createDeserialize as _createDeserializeWorkloadNetworkPublicIps, +} from "./api/workloadNetworkPublicIps/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeWorkloadNetworkPortMirroringProfiles, + _updateDeserialize as _updateDeserializeWorkloadNetworkPortMirroringProfiles, + _createDeserialize as _createDeserializeWorkloadNetworkPortMirroringProfiles, +} from "./api/workloadNetworkPortMirroringProfiles/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeWorkloadNetworkDnsZones, + _updateDeserialize as _updateDeserializeWorkloadNetworkDnsZones, + _createDeserialize as _createDeserializeWorkloadNetworkDnsZones, +} from "./api/workloadNetworkDnsZones/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeWorkloadNetworkDnsServices, + _updateDeserialize as _updateDeserializeWorkloadNetworkDnsServices, + _createDeserialize as _createDeserializeWorkloadNetworkDnsServices, +} from "./api/workloadNetworkDnsServices/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeWorkloadNetworkDhcpConfigurations, + _updateDeserialize as _updateDeserializeWorkloadNetworkDhcpConfigurations, + _createDeserialize as _createDeserializeWorkloadNetworkDhcpConfigurations, +} from "./api/workloadNetworkDhcpConfigurations/operations.js"; +import { _restrictMovementDeserialize } from "./api/virtualMachines/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeScriptExecutions, + _createOrUpdateDeserialize, +} from "./api/scriptExecutions/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializePureStoragePolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializePureStoragePolicies, +} from "./api/pureStoragePolicies/operations.js"; +import { + _rotateNsxtPasswordDeserialize, + _rotateVcenterPasswordDeserialize, + _$deleteDeserialize as _$deleteDeserializePrivateClouds, + _updateDeserialize as _updateDeserializePrivateClouds, + _createOrUpdateDeserialize as _createOrUpdateDeserializePrivateClouds, +} from "./api/privateClouds/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializePlacementPolicies, + _updateDeserialize as _updateDeserializePlacementPolicies, + _createOrUpdateDeserialize as _createOrUpdateDeserializePlacementPolicies, +} from "./api/placementPolicies/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeIscsiPaths, + _createOrUpdateDeserialize as _createOrUpdateDeserializeIscsiPaths, +} from "./api/iscsiPaths/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeGlobalReachConnections, + _createOrUpdateDeserialize as _createOrUpdateDeserializeGlobalReachConnections, +} from "./api/globalReachConnections/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeDatastores, + _createOrUpdateDeserialize as _createOrUpdateDeserializeDatastores, +} from "./api/datastores/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeClusters, + _updateDeserialize as _updateDeserializeClusters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeClusters, +} from "./api/clusters/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeCloudLinks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeCloudLinks, +} from "./api/cloudLinks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeAuthorizations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeAuthorizations, +} from "./api/authorizations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeAddons, + _createOrUpdateDeserialize as _createOrUpdateDeserializeAddons, +} from "./api/addons/operations.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: AzureVMwareSolutionAPIClient, + 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 = { + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}": + { + deserializer: _$deleteDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}": + { deserializer: _updateDeserialize, expectedStatuses: ["200", "202"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}": + { deserializer: _createDeserialize, expectedStatuses: ["200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}": + { + deserializer: _deleteSegmentDeserialize, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}": + { + deserializer: _updateDeserializeWorkloadNetworkSegments, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}": + { + deserializer: _createDeserializeWorkloadNetworkSegments, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}": + { + deserializer: _$deleteDeserializeWorkloadNetworkPublicIps, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}": + { + deserializer: _createDeserializeWorkloadNetworkPublicIps, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}": + { + deserializer: _$deleteDeserializeWorkloadNetworkPortMirroringProfiles, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}": + { + deserializer: _updateDeserializeWorkloadNetworkPortMirroringProfiles, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}": + { + deserializer: _createDeserializeWorkloadNetworkPortMirroringProfiles, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}": + { + deserializer: _$deleteDeserializeWorkloadNetworkDnsZones, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}": + { + deserializer: _updateDeserializeWorkloadNetworkDnsZones, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}": + { + deserializer: _createDeserializeWorkloadNetworkDnsZones, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}": + { + deserializer: _$deleteDeserializeWorkloadNetworkDnsServices, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}": + { + deserializer: _updateDeserializeWorkloadNetworkDnsServices, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}": + { + deserializer: _createDeserializeWorkloadNetworkDnsServices, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}": + { + deserializer: _$deleteDeserializeWorkloadNetworkDhcpConfigurations, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}": + { + deserializer: _updateDeserializeWorkloadNetworkDhcpConfigurations, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}": + { + deserializer: _createDeserializeWorkloadNetworkDhcpConfigurations, + expectedStatuses: ["200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement": + { + deserializer: _restrictMovementDeserialize, + expectedStatuses: ["202", "200"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}": + { + deserializer: _$deleteDeserializeScriptExecutions, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}": + { + deserializer: _createOrUpdateDeserialize, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}": + { + deserializer: _$deleteDeserializePureStoragePolicies, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}": + { + deserializer: _createOrUpdateDeserializePureStoragePolicies, + expectedStatuses: ["200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword": + { + deserializer: _rotateNsxtPasswordDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword": + { + deserializer: _rotateVcenterPasswordDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _$deleteDeserializePrivateClouds, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _updateDeserializePrivateClouds, + expectedStatuses: ["200", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}": + { + deserializer: _createOrUpdateDeserializePrivateClouds, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _$deleteDeserializePlacementPolicies, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _updateDeserializePlacementPolicies, + expectedStatuses: ["200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}": + { + deserializer: _createOrUpdateDeserializePlacementPolicies, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default": + { + deserializer: _$deleteDeserializeIscsiPaths, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default": + { + deserializer: _createOrUpdateDeserializeIscsiPaths, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}": + { + deserializer: _$deleteDeserializeGlobalReachConnections, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}": + { + deserializer: _createOrUpdateDeserializeGlobalReachConnections, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}": + { + deserializer: _$deleteDeserializeDatastores, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}": + { + deserializer: _createOrUpdateDeserializeDatastores, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _$deleteDeserializeClusters, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _updateDeserializeClusters, + expectedStatuses: ["200", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}": + { + deserializer: _createOrUpdateDeserializeClusters, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}": + { + deserializer: _$deleteDeserializeCloudLinks, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}": + { + deserializer: _createOrUpdateDeserializeCloudLinks, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}": + { + deserializer: _$deleteDeserializeAuthorizations, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}": + { + deserializer: _createOrUpdateDeserializeAuthorizations, + expectedStatuses: ["200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}": + { + deserializer: _$deleteDeserializeAddons, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}": + { + deserializer: _createOrUpdateDeserializeAddons, + expectedStatuses: ["200", "201"], + }, +}; + +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..ce33af5f4178 --- /dev/null +++ b/sdk/avs/arm-avs/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * 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( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} 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..f01c41bab69d --- /dev/null +++ b/sdk/avs/arm-avs/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// 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( + 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/src/static-helpers/urlTemplate.ts b/sdk/avs/arm-avs/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..cd03319fda35 --- /dev/null +++ b/sdk/avs/arm-avs/src/static-helpers/urlTemplate.ts @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +//--------------------- +// interfaces +//--------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string) { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string) { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any) { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false) { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions) { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + named && val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions) { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + (op = expr[0]), (expr = expr.slice(1)); + } + const varList = expr.split(/,/g); + const result = []; + for (const varSpec of varList) { + const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: result.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + result.push(varValue); + } + } + return result.join(""); + }); +} 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 c942a949c41d..000000000000 --- a/sdk/avs/arm-avs/test/avs_examples.spec.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import type { RecorderStartOptions } from "@azure-tools/test-recorder"; -import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { AzureVMwareSolutionAPI } from "../src/azureVMwareSolutionAPI.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -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 (ctx) => { - recorder = new Recorder(ctx); - 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 () => { - await recorder.stop(); - }); - - // skip private clouds curd function because it costs too long. - it.skip("privateClouds create test", async () => { - 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); - }); - - it.skip("privateClouds get test", async () => { - const res = await client.privateClouds.get(resourceGroup, privateCloudName); - assert.equal(res.name, privateCloudName); - }); - - it.skip("privateClouds list test", async () => { - const resArray = new Array(); - for await (const 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 () => { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - }); - - it.skip("privateClouds delete test", async () => { - const resArray = new Array(); - await client.privateClouds.beginDeleteAndWait( - resourceGroup, - privateCloudName, - testPollingOptions, - ); - for await (const 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..e4591bbad342 --- /dev/null +++ b/sdk/avs/arm-avs/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // 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..14dcd9fa397c --- /dev/null +++ b/sdk/avs/arm-avs/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// 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/test/snippets.spec.ts b/sdk/avs/arm-avs/test/snippets.spec.ts index 06734cd090d5..4561c5fd942f 100644 --- a/sdk/avs/arm-avs/test/snippets.spec.ts +++ b/sdk/avs/arm-avs/test/snippets.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { AzureVMwareSolutionAPI } from "../src/index.js"; +import { AzureVMwareSolutionAPIClient } from "../src/index.js"; import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; import { setLogLevel } from "@azure/logger"; import { describe, it } from "vitest"; @@ -9,7 +9,7 @@ import { describe, it } from "vitest"; describe("snippets", () => { it("ReadmeSampleCreateClient_Node", async () => { const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new AzureVMwareSolutionAPI(new DefaultAzureCredential(), subscriptionId); + const client = new AzureVMwareSolutionAPIClient(new DefaultAzureCredential(), subscriptionId); }); it("ReadmeSampleCreateClient_Browser", async () => { @@ -18,7 +18,7 @@ describe("snippets", () => { tenantId: "", clientId: "", }); - const client = new AzureVMwareSolutionAPI(credential, subscriptionId); + const client = new AzureVMwareSolutionAPIClient(credential, subscriptionId); }); it("SetLogLevel", async () => { diff --git a/sdk/avs/arm-avs/tsconfig.browser.config.json b/sdk/avs/arm-avs/tsconfig.browser.config.json index b6586181d006..75871518e3a0 100644 --- a/sdk/avs/arm-avs/tsconfig.browser.config.json +++ b/sdk/avs/arm-avs/tsconfig.browser.config.json @@ -1,17 +1,3 @@ { - "extends": "./.tshy/build.json", - "include": [ - "./src/**/*.ts", - "./src/**/*.mts", - "./test/**/*.spec.ts", - "./test/**/*.mts" - ], - "exclude": [ - "./test/**/node/**/*.ts" - ], - "compilerOptions": { - "outDir": "./dist-test/browser", - "rootDir": ".", - "skipLibCheck": true - } + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] } diff --git a/sdk/avs/arm-avs/tsconfig.samples.json b/sdk/avs/arm-avs/tsconfig.samples.json index 14ec0221a2d2..4f72699b44c3 100644 --- a/sdk/avs/arm-avs/tsconfig.samples.json +++ b/sdk/avs/arm-avs/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-avs": [ - "./dist/esm" - ] + "@azure/arm-avs": ["./dist/esm"] } } } diff --git a/sdk/avs/arm-avs/tsconfig.test.json b/sdk/avs/arm-avs/tsconfig.test.json index 3c2b783a8c1b..290ca214aebc 100644 --- a/sdk/avs/arm-avs/tsconfig.test.json +++ b/sdk/avs/arm-avs/tsconfig.test.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/avs/arm-avs/tsp-location.yaml b/sdk/avs/arm-avs/tsp-location.yaml new file mode 100644 index 000000000000..5a301032556c --- /dev/null +++ b/sdk/avs/arm-avs/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/vmware/Microsoft.AVS.Management +commit: 4877ae7faaf53bdc650b26ae7ba1075f7d63d2c4 +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 index b48c61b2ef46..182729ab5ce9 100644 --- a/sdk/avs/arm-avs/vitest.browser.config.ts +++ b/sdk/avs/arm-avs/vitest.browser.config.ts @@ -9,9 +9,9 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: [ - "dist-test/browser/test/**/*.spec.js", - ], + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, }, }), ); diff --git a/sdk/avs/arm-avs/vitest.config.ts b/sdk/avs/arm-avs/vitest.config.ts index 2a4750c84292..40e031385dd8 100644 --- a/sdk/avs/arm-avs/vitest.config.ts +++ b/sdk/avs/arm-avs/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,8 +9,8 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - hookTimeout: 1200000, testTimeout: 1200000, + hookTimeout: 1200000, }, }), );