From 040767f18606d81492a9caa0f4068cd597d0fb61 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 24 Dec 2025 00:44:42 +0000 Subject: [PATCH] Configurations: 'specification/connectedcache/ConnectedCache.Management/tspconfig.yaml', API Version: 2024-11-30-preview, SDK Release Type: beta, and CommitSHA: 'be46becafeb29aa993898709e35759d3643b2809' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5699155 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../arm-connectedcache/CHANGELOG.md | 69 + .../arm-connectedcache/metadata.json | 93 + .../arm-connectedcache/package.json | 116 +- ...erpriseMccCacheNodesOperations-node.api.md | 79 + ...che-api-enterpriseMccCustomers-node.api.md | 58 + ...he-api-ispCacheNodesOperations-node.api.md | 79 + ...onnectedcache-api-ispCustomers-node.api.md | 58 + .../review/arm-connectedcache-api-node.api.md | 28 + ...-connectedcache-api-operations-node.api.md | 19 + .../arm-connectedcache-models-node.api.md | 136 +- .../review/arm-connectedcache-node.api.md | 256 +- ...acheNodesOperationsCreateorUpdateSample.ts | 39 - .../cacheNodesOperationsDeleteSample.ts | 28 - .../cacheNodesOperationsGetSample.ts | 29 - ...odesOperationsListByResourceGroupSample.ts | 30 - ...NodesOperationsListBySubscriptionSample.ts | 30 - .../cacheNodesOperationsUpdateSample.ts | 28 - ...eCustomerOperationsCreateOrUpdateSample.ts | 35 - ...nterpriseCustomerOperationsDeleteSample.ts | 28 - .../enterpriseCustomerOperationsGetSample.ts | 26 - ...omerOperationsListByResourceGroupSample.ts | 32 - ...tomerOperationsListBySubscriptionSample.ts | 30 - ...nterpriseCustomerOperationsUpdateSample.ts | 30 - ...acheNodesOperationsCreateOrUpdateSample.ts | 10 +- ...riseMccCacheNodesOperationsDeleteSample.ts | 9 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 9 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + ...GetCacheNodeTlsCertificateHistorySample.ts | 29 + ...erpriseMccCacheNodesOperationsGetSample.ts | 9 +- ...stByEnterpriseMccCustomerResourceSample.ts | 9 +- ...riseMccCacheNodesOperationsUpdateSample.ts | 9 +- ...erpriseMccCustomersCreateOrUpdateSample.ts | 10 +- .../enterpriseMccCustomersDeleteSample.ts | 9 +- .../enterpriseMccCustomersGetSample.ts | 9 +- ...seMccCustomersListByResourceGroupSample.ts | 9 +- ...iseMccCustomersListBySubscriptionSample.ts | 9 +- .../enterpriseMccCustomersUpdateSample.ts | 9 +- ...acheNodesOperationsCreateOrUpdateSample.ts | 17 +- .../ispCacheNodesOperationsDeleteSample.ts | 9 +- ...spCacheNodesOperationsGetBgpCidrsSample.ts | 9 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 9 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + .../ispCacheNodesOperationsGetSample.ts | 9 +- ...erationsListByIspCustomerResourceSample.ts | 9 +- .../ispCacheNodesOperationsUpdateSample.ts | 9 +- .../ispCustomersCreateOrUpdateSample.ts | 10 +- .../samples-dev/ispCustomersDeleteSample.ts | 9 +- .../samples-dev/ispCustomersGetSample.ts | 9 +- .../ispCustomersListByResourceGroupSample.ts | 9 +- .../ispCustomersListBySubscriptionSample.ts | 9 +- .../samples-dev/ispCustomersUpdateSample.ts | 9 +- .../samples-dev/operationsListSample.ts | 11 +- .../samples/v1-beta/javascript/README.md | 92 +- ...acheNodesOperationsCreateorUpdateSample.js | 38 - .../cacheNodesOperationsDeleteSample.js | 27 - .../cacheNodesOperationsGetSample.js | 28 - ...odesOperationsListByResourceGroupSample.js | 29 - ...NodesOperationsListBySubscriptionSample.js | 29 - .../cacheNodesOperationsUpdateSample.js | 27 - ...eCustomerOperationsCreateOrUpdateSample.js | 34 - ...nterpriseCustomerOperationsDeleteSample.js | 27 - .../enterpriseCustomerOperationsGetSample.js | 25 - ...omerOperationsListByResourceGroupSample.js | 31 - ...tomerOperationsListBySubscriptionSample.js | 29 - ...nterpriseCustomerOperationsUpdateSample.js | 29 - ...acheNodesOperationsCreateOrUpdateSample.js | 5 +- ...riseMccCacheNodesOperationsDeleteSample.js | 4 +- ...ionsGetCacheNodeAutoUpdateHistorySample.js | 29 + ...rationsGetCacheNodeInstallDetailsSample.js | 4 +- ...etCacheNodeMccIssueDetailsHistorySample.js | 29 + ...GetCacheNodeTlsCertificateHistorySample.js | 29 + ...erpriseMccCacheNodesOperationsGetSample.js | 4 +- ...stByEnterpriseMccCustomerResourceSample.js | 6 +- ...riseMccCacheNodesOperationsUpdateSample.js | 4 +- ...erpriseMccCustomersCreateOrUpdateSample.js | 5 +- .../enterpriseMccCustomersDeleteSample.js | 4 +- .../enterpriseMccCustomersGetSample.js | 4 +- ...seMccCustomersListByResourceGroupSample.js | 6 +- ...iseMccCustomersListBySubscriptionSample.js | 6 +- .../enterpriseMccCustomersUpdateSample.js | 4 +- ...acheNodesOperationsCreateOrUpdateSample.js | 12 +- .../ispCacheNodesOperationsDeleteSample.js | 4 +- ...spCacheNodesOperationsGetBgpCidrsSample.js | 4 +- ...ionsGetCacheNodeAutoUpdateHistorySample.js | 29 + ...rationsGetCacheNodeInstallDetailsSample.js | 4 +- ...etCacheNodeMccIssueDetailsHistorySample.js | 29 + .../ispCacheNodesOperationsGetSample.js | 4 +- ...erationsListByIspCustomerResourceSample.js | 6 +- .../ispCacheNodesOperationsUpdateSample.js | 4 +- .../ispCustomersCreateOrUpdateSample.js | 5 +- .../javascript/ispCustomersDeleteSample.js | 4 +- .../javascript/ispCustomersGetSample.js | 4 +- .../ispCustomersListByResourceGroupSample.js | 6 +- .../ispCustomersListBySubscriptionSample.js | 6 +- .../javascript/ispCustomersUpdateSample.js | 4 +- .../javascript/operationsListSample.js | 8 +- .../samples/v1-beta/javascript/package.json | 5 +- .../samples/v1-beta/typescript/README.md | 92 +- .../samples/v1-beta/typescript/package.json | 7 +- ...acheNodesOperationsCreateorUpdateSample.ts | 38 - .../src/cacheNodesOperationsDeleteSample.ts | 27 - .../src/cacheNodesOperationsGetSample.ts | 28 - ...odesOperationsListByResourceGroupSample.ts | 31 - ...NodesOperationsListBySubscriptionSample.ts | 29 - .../src/cacheNodesOperationsUpdateSample.ts | 29 - ...eCustomerOperationsCreateOrUpdateSample.ts | 38 - ...nterpriseCustomerOperationsDeleteSample.ts | 27 - .../enterpriseCustomerOperationsGetSample.ts | 28 - ...omerOperationsListByResourceGroupSample.ts | 31 - ...tomerOperationsListBySubscriptionSample.ts | 29 - ...nterpriseCustomerOperationsUpdateSample.ts | 29 - ...acheNodesOperationsCreateOrUpdateSample.ts | 9 +- ...riseMccCacheNodesOperationsDeleteSample.ts | 4 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 15 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + ...GetCacheNodeTlsCertificateHistorySample.ts | 29 + ...erpriseMccCacheNodesOperationsGetSample.ts | 4 +- ...stByEnterpriseMccCustomerResourceSample.ts | 6 +- ...riseMccCacheNodesOperationsUpdateSample.ts | 4 +- ...erpriseMccCustomersCreateOrUpdateSample.ts | 5 +- .../src/enterpriseMccCustomersDeleteSample.ts | 4 +- .../src/enterpriseMccCustomersGetSample.ts | 4 +- ...seMccCustomersListByResourceGroupSample.ts | 8 +- ...iseMccCustomersListBySubscriptionSample.ts | 6 +- .../src/enterpriseMccCustomersUpdateSample.ts | 12 +- ...acheNodesOperationsCreateOrUpdateSample.ts | 12 +- .../ispCacheNodesOperationsDeleteSample.ts | 4 +- ...spCacheNodesOperationsGetBgpCidrsSample.ts | 4 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 15 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + .../src/ispCacheNodesOperationsGetSample.ts | 4 +- ...erationsListByIspCustomerResourceSample.ts | 6 +- .../ispCacheNodesOperationsUpdateSample.ts | 4 +- .../src/ispCustomersCreateOrUpdateSample.ts | 77 +- .../src/ispCustomersDeleteSample.ts | 4 +- .../typescript/src/ispCustomersGetSample.ts | 9 +- .../ispCustomersListByResourceGroupSample.ts | 8 +- .../ispCustomersListBySubscriptionSample.ts | 6 +- .../src/ispCustomersUpdateSample.ts | 12 +- .../typescript/src/operationsListSample.ts | 8 +- .../samples/v1-beta/typescript/tsconfig.json | 21 +- .../src/api/cacheNodesOperations/index.ts | 338 --- .../src/api/connectedCacheContext.ts | 31 +- .../api/enterpriseCustomerOperations/index.ts | 350 --- .../index.ts | 406 +-- .../operations.ts | 597 ++++ .../options.ts | 37 + .../src/api/enterpriseMccCustomers/index.ts | 357 +-- .../api/enterpriseMccCustomers/operations.ts | 344 +++ .../src/api/enterpriseMccCustomers/options.ts | 28 + .../arm-connectedcache/src/api/index.ts | 90 - .../src/api/ispCacheNodesOperations/index.ts | 451 +-- .../api/ispCacheNodesOperations/operations.ts | 579 ++++ .../api/ispCacheNodesOperations/options.ts | 37 + .../src/api/ispCustomers/index.ts | 335 +-- .../src/api/ispCustomers/operations.ts | 342 +++ .../src/api/ispCustomers/options.ts | 28 + .../src/api/operations/index.ts | 52 +- .../src/api/operations/operations.ts | 61 + .../src/api/operations/options.ts | 7 + .../arm-connectedcache/src/api/options.ts | 148 - .../src/classic/cacheNodesOperations/index.ts | 135 - .../enterpriseCustomerOperations/index.ts | 143 - .../index.ts | 198 +- .../classic/enterpriseMccCustomers/index.ts | 165 +- .../arm-connectedcache/src/classic/index.ts | 2 - .../classic/ispCacheNodesOperations/index.ts | 203 +- .../src/classic/ispCustomers/index.ts | 145 +- .../src/classic/operations/index.ts | 18 +- .../src/connectedCacheClient.ts | 86 +- .../src/helpers/serializerHelpers.ts | 36 - .../arm-connectedcache/src/index.ts | 146 +- .../arm-connectedcache/src/models/index.ts | 65 +- .../arm-connectedcache/src/models/models.ts | 2492 +++++++++-------- .../src/restorePollerHelpers.ts | 100 +- .../src/static-helpers/cloudSettingHelpers.ts | 42 + .../src/static-helpers/pagingHelpers.ts | 9 +- .../src/static-helpers/pollingHelpers.ts | 9 +- .../src/static-helpers/urlTemplate.ts | 227 ++ .../arm-connectedcache/tsp-location.yaml | 4 +- sdk/connectedcache/ci.mgmt.yml | 2 + 185 files changed, 5969 insertions(+), 6233 deletions(-) create mode 100644 sdk/connectedcache/arm-connectedcache/metadata.json create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCacheNodesOperations-node.api.md create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCustomers-node.api.md create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCacheNodesOperations-node.api.md create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCustomers-node.api.md create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-node.api.md create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-operations-node.api.md delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsCreateorUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsDeleteSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsGetSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListByResourceGroupSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListBySubscriptionSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsCreateOrUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsDeleteSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsGetSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListByResourceGroupSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListBySubscriptionSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsUpdateSample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsCreateorUpdateSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsDeleteSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsGetSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListByResourceGroupSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListBySubscriptionSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsUpdateSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsCreateOrUpdateSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsDeleteSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsGetSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListByResourceGroupSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListBySubscriptionSample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsUpdateSample.js create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsCreateorUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsDeleteSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsGetSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListByResourceGroupSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListBySubscriptionSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsCreateOrUpdateSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsDeleteSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsGetSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListByResourceGroupSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListBySubscriptionSample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsUpdateSample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts create mode 100644 sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/api/cacheNodesOperations/index.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/api/enterpriseCustomerOperations/index.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/operations.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/options.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/operations.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/options.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/operations.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/options.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/operations.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/options.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/operations/operations.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/api/operations/options.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/api/options.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/classic/cacheNodesOperations/index.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/classic/enterpriseCustomerOperations/index.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/src/helpers/serializerHelpers.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/static-helpers/cloudSettingHelpers.ts create mode 100644 sdk/connectedcache/arm-connectedcache/src/static-helpers/urlTemplate.ts diff --git a/sdk/connectedcache/arm-connectedcache/CHANGELOG.md b/sdk/connectedcache/arm-connectedcache/CHANGELOG.md index c70842647d83..184194e18725 100644 --- a/sdk/connectedcache/arm-connectedcache/CHANGELOG.md +++ b/sdk/connectedcache/arm-connectedcache/CHANGELOG.md @@ -1,4 +1,73 @@ # Release History + +## 1.0.0-beta.2 (2025-12-24) +Compared with version 1.0.0-beta.1 + +### Features Added + - Added operation EnterpriseMccCacheNodesOperationsOperations.getCacheNodeAutoUpdateHistory + - Added operation EnterpriseMccCacheNodesOperationsOperations.getCacheNodeMccIssueDetailsHistory + - Added operation EnterpriseMccCacheNodesOperationsOperations.getCacheNodeTlsCertificateHistory + - Added operation IspCacheNodesOperationsOperations.getCacheNodeAutoUpdateHistory + - Added operation IspCacheNodesOperationsOperations.getCacheNodeMccIssueDetailsHistory + - Added Interface EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams + - Added Interface EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams + - Added Interface EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams + - Added Interface ErrorResponse + - Added Interface IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams + - Added Interface IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams + - Added Interface MccCacheNodeAutoUpdateHistory + - Added Interface MccCacheNodeAutoUpdateHistoryProperties + - Added Interface MccCacheNodeAutoUpdateInfo + - Added Interface MccCacheNodeIssueHistory + - Added Interface MccCacheNodeIssueHistoryProperties + - Added Interface MccCacheNodeTlsCertificate + - Added Interface MccCacheNodeTlsCertificateHistory + - Added Interface MccCacheNodeTlsCertificateProperties + - Added Interface MccIssue + - Interface AdditionalCacheNodeProperties has a new optional parameter creationMethod + - Interface AdditionalCacheNodeProperties has a new optional parameter currentTlsCertificate + - Interface AdditionalCacheNodeProperties has a new optional parameter issuesCount + - Interface AdditionalCacheNodeProperties has a new optional parameter issuesList + - Interface AdditionalCacheNodeProperties has a new optional parameter lastAutoUpdateInfo + - Interface AdditionalCacheNodeProperties has a new optional parameter tlsStatus + - Interface CacheNodeInstallProperties has a new optional parameter driveConfiguration + - Interface CacheNodeInstallProperties has a new optional parameter proxyUrlConfiguration + - Interface CacheNodeInstallProperties has a new optional parameter tlsCertificateProvisioningKey + - Interface ConnectedCacheClientOptionalParams has a new optional parameter cloudSetting + - Added Type Alias AzureSupportedClouds + - Added Enum AzureClouds + - Enum KnownConfigurationState has a new value NotConfiguredIp + - Enum KnownVersions has a new value V20230501Preview + - Enum KnownVersions has a new value V20241130Preview + +### Breaking Changes + - Removed operation group CacheNodesOperationsOperations + - Removed operation group EnterpriseCustomerOperationsOperations + - Class ConnectedCacheClient no longer has parameter cacheNodesOperations + - Class ConnectedCacheClient no longer has parameter enterpriseCustomerOperations + - Removed Interface CacheNodeOldResponse + - Removed Interface CacheNodePreviewResource + - Removed Interface CacheNodesOperationsCreateorUpdateOptionalParams + - Removed Interface CacheNodesOperationsDeleteOptionalParams + - Removed Interface CacheNodesOperationsGetOptionalParams + - Removed Interface CacheNodesOperationsListByResourceGroupOptionalParams + - Removed Interface CacheNodesOperationsListBySubscriptionOptionalParams + - Removed Interface CacheNodesOperationsUpdateOptionalParams + - Removed Interface EnterpriseCustomerOperationsCreateOrUpdateOptionalParams + - Removed Interface EnterpriseCustomerOperationsDeleteOptionalParams + - Removed Interface EnterpriseCustomerOperationsGetOptionalParams + - Removed Interface EnterpriseCustomerOperationsListByResourceGroupOptionalParams + - Removed Interface EnterpriseCustomerOperationsListBySubscriptionOptionalParams + - Removed Interface EnterpriseCustomerOperationsUpdateOptionalParams + - Removed Interface EnterprisePreviewResource + - Interface AdditionalCacheNodeProperties no longer has parameter proxyUrl + - Interface AdditionalCacheNodeProperties no longer has parameter updateCycleType + - Interface AdditionalCustomerProperties no longer has parameter peeringDbLastUpdateTime + - Removed Type Alias CycleType + - Removed Enum KnownCycleType + - Enum KnownConfigurationState no longer has value NotConfigured_Ip + - Enum KnownVersions no longer has value v2023_05_01_preview + ## 1.0.0-beta.1 (2024-11-19) diff --git a/sdk/connectedcache/arm-connectedcache/metadata.json b/sdk/connectedcache/arm-connectedcache/metadata.json new file mode 100644 index 000000000000..e9716f6bd993 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/metadata.json @@ -0,0 +1,93 @@ +{ + "apiVersion": "2024-11-30-preview", + "emitterVersion": "0.47.1", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.ConnectedCache", + "CrossLanguageDefinitionId": { + "@azure/arm-connectedcache!OperationListResult:interface": "Azure.ResourceManager.CommonTypes.OperationListResult", + "@azure/arm-connectedcache!Operation:interface": "Azure.ResourceManager.CommonTypes.Operation", + "@azure/arm-connectedcache!OperationDisplay:interface": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "@azure/arm-connectedcache!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "@azure/arm-connectedcache!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-connectedcache!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-connectedcache!IspCustomerResource:interface": "Microsoft.ConnectedCache.IspCustomerResource", + "@azure/arm-connectedcache!CustomerProperty:interface": "Microsoft.ConnectedCache.CustomerProperty", + "@azure/arm-connectedcache!CustomerEntity:interface": "Microsoft.ConnectedCache.CustomerEntity", + "@azure/arm-connectedcache!AdditionalCustomerProperties:interface": "Microsoft.ConnectedCache.AdditionalCustomerProperties", + "@azure/arm-connectedcache!TrackedResource:interface": "Azure.ResourceManager.CommonTypes.TrackedResource", + "@azure/arm-connectedcache!Resource:interface": "Azure.ResourceManager.CommonTypes.Resource", + "@azure/arm-connectedcache!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-connectedcache!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-connectedcache!ConnectedCachePatchResource:interface": "Microsoft.ConnectedCache.ConnectedCachePatchResource", + "@azure/arm-connectedcache!IspCustomerResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-connectedcache!IspCacheNodeResource:interface": "Microsoft.ConnectedCache.IspCacheNodeResource", + "@azure/arm-connectedcache!CacheNodeProperty:interface": "Microsoft.ConnectedCache.CacheNodeProperty", + "@azure/arm-connectedcache!CacheNodeEntity:interface": "Microsoft.ConnectedCache.CacheNodeEntity", + "@azure/arm-connectedcache!AdditionalCacheNodeProperties:interface": "Microsoft.ConnectedCache.AdditionalCacheNodeProperties", + "@azure/arm-connectedcache!MccCacheNodeTlsCertificate:interface": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificate", + "@azure/arm-connectedcache!MccCacheNodeAutoUpdateInfo:interface": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateInfo", + "@azure/arm-connectedcache!CacheNodeDriveConfiguration:interface": "Microsoft.ConnectedCache.CacheNodeDriveConfiguration", + "@azure/arm-connectedcache!BgpConfiguration:interface": "Microsoft.ConnectedCache.BgpConfiguration", + "@azure/arm-connectedcache!ProxyUrlConfiguration:interface": "Microsoft.ConnectedCache.ProxyUrlConfiguration", + "@azure/arm-connectedcache!IspCacheNodeResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-connectedcache!MccCacheNodeBgpCidrDetails:interface": "Microsoft.ConnectedCache.MccCacheNodeBgpCidrDetails", + "@azure/arm-connectedcache!BgpCidrsConfiguration:interface": "Microsoft.ConnectedCache.BgpCidrsConfiguration", + "@azure/arm-connectedcache!MccCacheNodeInstallDetails:interface": "Microsoft.ConnectedCache.MccCacheNodeInstallDetails", + "@azure/arm-connectedcache!CacheNodeInstallProperties:interface": "Microsoft.ConnectedCache.CacheNodeInstallProperties", + "@azure/arm-connectedcache!MccCacheNodeAutoUpdateHistory:interface": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateHistory", + "@azure/arm-connectedcache!MccCacheNodeAutoUpdateHistoryProperties:interface": "Microsoft.ConnectedCache.MccCacheNodeAutoUpdateHistoryProperties", + "@azure/arm-connectedcache!MccCacheNodeIssueHistory:interface": "Microsoft.ConnectedCache.MccCacheNodeIssueHistory", + "@azure/arm-connectedcache!MccCacheNodeIssueHistoryProperties:interface": "Microsoft.ConnectedCache.MccCacheNodeIssueHistoryProperties", + "@azure/arm-connectedcache!MccIssue:interface": "Microsoft.ConnectedCache.MccIssue", + "@azure/arm-connectedcache!EnterpriseMccCustomerResource:interface": "Microsoft.ConnectedCache.EnterpriseMccCustomerResource", + "@azure/arm-connectedcache!EnterpriseMccCustomerResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-connectedcache!EnterpriseMccCacheNodeResource:interface": "Microsoft.ConnectedCache.EnterpriseMccCacheNodeResource", + "@azure/arm-connectedcache!EnterpriseMccCacheNodeResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-connectedcache!MccCacheNodeTlsCertificateHistory:interface": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificateHistory", + "@azure/arm-connectedcache!MccCacheNodeTlsCertificateProperties:interface": "Microsoft.ConnectedCache.MccCacheNodeTlsCertificateProperties", + "@azure/arm-connectedcache!KnownOrigin:enum": "Azure.ResourceManager.CommonTypes.Origin", + "@azure/arm-connectedcache!KnownActionType:enum": "Azure.ResourceManager.CommonTypes.ActionType", + "@azure/arm-connectedcache!KnownProvisioningState:enum": "Microsoft.ConnectedCache.ProvisioningState", + "@azure/arm-connectedcache!KnownCustomerTransitState:enum": "Microsoft.ConnectedCache.CustomerTransitState", + "@azure/arm-connectedcache!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-connectedcache!KnownResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-connectedcache!KnownBgpReviewStateEnum:enum": "Microsoft.ConnectedCache.BgpReviewStateEnum", + "@azure/arm-connectedcache!KnownConfigurationState:enum": "Microsoft.ConnectedCache.ConfigurationState", + "@azure/arm-connectedcache!KnownautoUpdateRingType:enum": "Microsoft.ConnectedCache.autoUpdateRingType", + "@azure/arm-connectedcache!KnownProxyRequired:enum": "Microsoft.ConnectedCache.ProxyRequired", + "@azure/arm-connectedcache!KnownOsType:enum": "Microsoft.ConnectedCache.OsType", + "@azure/arm-connectedcache!KnownVersions:enum": "Microsoft.ConnectedCache.Versions", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#getCacheNodeTlsCertificateHistory:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#getCacheNodeMccIssueDetailsHistory:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#getCacheNodeAutoUpdateHistory:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#getCacheNodeInstallDetails:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeInstallDetails", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#listByEnterpriseMccCustomerResource:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#delete:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#update:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#createOrUpdate:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "@azure/arm-connectedcache!EnterpriseMccCacheNodesOperationsOperations#get:member": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#listBySubscription:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#listByResourceGroup:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#delete:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#update:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#createOrUpdate:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "@azure/arm-connectedcache!EnterpriseMccCustomersOperations#get:member": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#getCacheNodeMccIssueDetailsHistory:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeMccIssueDetailsHistory", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#getCacheNodeAutoUpdateHistory:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeAutoUpdateHistory", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#getCacheNodeInstallDetails:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#getBgpCidrs:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#listByIspCustomerResource:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#delete:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#update:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#createOrUpdate:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "@azure/arm-connectedcache!IspCacheNodesOperationsOperations#get:member": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "@azure/arm-connectedcache!IspCustomersOperations#listBySubscription:member": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "@azure/arm-connectedcache!IspCustomersOperations#listByResourceGroup:member": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "@azure/arm-connectedcache!IspCustomersOperations#delete:member": "Microsoft.ConnectedCache.IspCustomers.delete", + "@azure/arm-connectedcache!IspCustomersOperations#update:member": "Microsoft.ConnectedCache.IspCustomers.update", + "@azure/arm-connectedcache!IspCustomersOperations#createOrUpdate:member": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "@azure/arm-connectedcache!IspCustomersOperations#get:member": "Microsoft.ConnectedCache.IspCustomers.get", + "@azure/arm-connectedcache!OperationsOperations#list:member": "Azure.ResourceManager.Operations.list" + } + } +} diff --git a/sdk/connectedcache/arm-connectedcache/package.json b/sdk/connectedcache/arm-connectedcache/package.json index aa0f21561bf4..2e797d3b070d 100644 --- a/sdk/connectedcache/arm-connectedcache/package.json +++ b/sdk/connectedcache/arm-connectedcache/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-connectedcache", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "A generated SDK for ConnectedCacheClient.", "engines": { "node": ">=20.0.0" @@ -12,6 +12,12 @@ "exports": { "./package.json": "./package.json", ".": "./src/index.ts", + "./api": "./src/api/index.ts", + "./api/enterpriseMccCacheNodesOperations": "./src/api/enterpriseMccCacheNodesOperations/index.ts", + "./api/enterpriseMccCustomers": "./src/api/enterpriseMccCustomers/index.ts", + "./api/ispCacheNodesOperations": "./src/api/ispCacheNodesOperations/index.ts", + "./api/ispCustomers": "./src/api/ispCustomers/index.ts", + "./api/operations": "./src/api/operations/index.ts", "./models": "./src/models/index.ts" }, "dialects": [ @@ -131,6 +137,114 @@ "default": "./dist/commonjs/index.js" } }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./api/enterpriseMccCacheNodesOperations": { + "browser": { + "types": "./dist/browser/api/enterpriseMccCacheNodesOperations/index.d.ts", + "default": "./dist/browser/api/enterpriseMccCacheNodesOperations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/enterpriseMccCacheNodesOperations/index.d.ts", + "default": "./dist/react-native/api/enterpriseMccCacheNodesOperations/index.js" + }, + "import": { + "types": "./dist/esm/api/enterpriseMccCacheNodesOperations/index.d.ts", + "default": "./dist/esm/api/enterpriseMccCacheNodesOperations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/enterpriseMccCacheNodesOperations/index.d.ts", + "default": "./dist/commonjs/api/enterpriseMccCacheNodesOperations/index.js" + } + }, + "./api/enterpriseMccCustomers": { + "browser": { + "types": "./dist/browser/api/enterpriseMccCustomers/index.d.ts", + "default": "./dist/browser/api/enterpriseMccCustomers/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/enterpriseMccCustomers/index.d.ts", + "default": "./dist/react-native/api/enterpriseMccCustomers/index.js" + }, + "import": { + "types": "./dist/esm/api/enterpriseMccCustomers/index.d.ts", + "default": "./dist/esm/api/enterpriseMccCustomers/index.js" + }, + "require": { + "types": "./dist/commonjs/api/enterpriseMccCustomers/index.d.ts", + "default": "./dist/commonjs/api/enterpriseMccCustomers/index.js" + } + }, + "./api/ispCacheNodesOperations": { + "browser": { + "types": "./dist/browser/api/ispCacheNodesOperations/index.d.ts", + "default": "./dist/browser/api/ispCacheNodesOperations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/ispCacheNodesOperations/index.d.ts", + "default": "./dist/react-native/api/ispCacheNodesOperations/index.js" + }, + "import": { + "types": "./dist/esm/api/ispCacheNodesOperations/index.d.ts", + "default": "./dist/esm/api/ispCacheNodesOperations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/ispCacheNodesOperations/index.d.ts", + "default": "./dist/commonjs/api/ispCacheNodesOperations/index.js" + } + }, + "./api/ispCustomers": { + "browser": { + "types": "./dist/browser/api/ispCustomers/index.d.ts", + "default": "./dist/browser/api/ispCustomers/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/ispCustomers/index.d.ts", + "default": "./dist/react-native/api/ispCustomers/index.js" + }, + "import": { + "types": "./dist/esm/api/ispCustomers/index.d.ts", + "default": "./dist/esm/api/ispCustomers/index.js" + }, + "require": { + "types": "./dist/commonjs/api/ispCustomers/index.d.ts", + "default": "./dist/commonjs/api/ispCustomers/index.js" + } + }, + "./api/operations": { + "browser": { + "types": "./dist/browser/api/operations/index.d.ts", + "default": "./dist/browser/api/operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/operations/index.d.ts", + "default": "./dist/react-native/api/operations/index.js" + }, + "import": { + "types": "./dist/esm/api/operations/index.d.ts", + "default": "./dist/esm/api/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operations/index.d.ts", + "default": "./dist/commonjs/api/operations/index.js" + } + }, "./models": { "browser": { "types": "./dist/browser/models/index.d.ts", diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCacheNodesOperations-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCacheNodesOperations-node.api.md new file mode 100644 index 000000000000..f7e91d38fa9f --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCacheNodesOperations-node.api.md @@ -0,0 +1,79 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams): PollerLike, void>; + +// @public +export function createOrUpdate(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, resource: EnterpriseMccCacheNodeResource, options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams): PollerLike, EnterpriseMccCacheNodeResource>; + +// @public +export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCacheNodesOperationsUpdateOptionalParams extends OperationOptions { +} + +// @public +export function get(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetOptionalParams): Promise; + +// @public +export function getCacheNodeAutoUpdateHistory(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams): Promise; + +// @public +export function getCacheNodeInstallDetails(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams): Promise; + +// @public +export function getCacheNodeMccIssueDetailsHistory(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams): Promise; + +// @public +export function getCacheNodeTlsCertificateHistory(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams): Promise; + +// @public +export function listByEnterpriseMccCustomerResource(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, properties: ConnectedCachePatchResource, options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCustomers-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCustomers-node.api.md new file mode 100644 index 000000000000..2c38aa9370fa --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-enterpriseMccCustomers-node.api.md @@ -0,0 +1,58 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: EnterpriseMccCustomersDeleteOptionalParams): PollerLike, void>; + +// @public +export function createOrUpdate(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, resource: EnterpriseMccCustomerResource, options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams): PollerLike, EnterpriseMccCustomerResource>; + +// @public +export interface EnterpriseMccCustomersCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface EnterpriseMccCustomersDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface EnterpriseMccCustomersGetOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCustomersListByResourceGroupOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCustomersListBySubscriptionOptionalParams extends OperationOptions { +} + +// @public +export interface EnterpriseMccCustomersUpdateOptionalParams extends OperationOptions { +} + +// @public +export function get(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: EnterpriseMccCustomersGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: ConnectedCacheContext, resourceGroupName: string, options?: EnterpriseMccCustomersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: ConnectedCacheContext, options?: EnterpriseMccCustomersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: EnterpriseMccCustomersUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCacheNodesOperations-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCacheNodesOperations-node.api.md new file mode 100644 index 000000000000..57ee08ed617f --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCacheNodesOperations-node.api.md @@ -0,0 +1,79 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsDeleteOptionalParams): PollerLike, void>; + +// @public +export function createOrUpdate(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, resource: IspCacheNodeResource, options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams): PollerLike, IspCacheNodeResource>; + +// @public +export function get(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetOptionalParams): Promise; + +// @public +export function getBgpCidrs(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams): Promise; + +// @public +export function getCacheNodeAutoUpdateHistory(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams): Promise; + +// @public +export function getCacheNodeInstallDetails(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams): Promise; + +// @public +export function getCacheNodeMccIssueDetailsHistory(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams): Promise; + +// @public +export interface IspCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface IspCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface IspCacheNodesOperationsGetBgpCidrsOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsListByIspCustomerResourceOptionalParams extends OperationOptions { +} + +// @public +export interface IspCacheNodesOperationsUpdateOptionalParams extends OperationOptions { +} + +// @public +export function listByIspCustomerResource(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, properties: ConnectedCachePatchResource, options?: IspCacheNodesOperationsUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCustomers-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCustomers-node.api.md new file mode 100644 index 000000000000..f483ef899846 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-ispCustomers-node.api.md @@ -0,0 +1,58 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: IspCustomersDeleteOptionalParams): PollerLike, void>; + +// @public +export function createOrUpdate(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, resource: IspCustomerResource, options?: IspCustomersCreateOrUpdateOptionalParams): PollerLike, IspCustomerResource>; + +// @public +export function get(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, options?: IspCustomersGetOptionalParams): Promise; + +// @public +export interface IspCustomersCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface IspCustomersDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface IspCustomersGetOptionalParams extends OperationOptions { +} + +// @public +export interface IspCustomersListByResourceGroupOptionalParams extends OperationOptions { +} + +// @public +export interface IspCustomersListBySubscriptionOptionalParams extends OperationOptions { +} + +// @public +export interface IspCustomersUpdateOptionalParams extends OperationOptions { +} + +// @public +export function listByResourceGroup(context: ConnectedCacheContext, resourceGroupName: string, options?: IspCustomersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: ConnectedCacheContext, options?: IspCustomersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: ConnectedCacheContext, resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: IspCustomersUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-node.api.md new file mode 100644 index 000000000000..0474afc5bc75 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-node.api.md @@ -0,0 +1,28 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { TokenCredential } from '@azure/core-auth'; + +// @public +export interface ConnectedCacheClientOptionalParams extends ClientOptions { + apiVersion?: string; + cloudSetting?: AzureSupportedClouds; +} + +// @public +export interface ConnectedCacheContext extends Client { + apiVersion: string; + subscriptionId: string; +} + +// @public +export function createConnectedCache(credential: TokenCredential, subscriptionId: string, options?: ConnectedCacheClientOptionalParams): ConnectedCacheContext; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-operations-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-operations-node.api.md new file mode 100644 index 000000000000..2a353fe04164 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api-operations-node.api.md @@ -0,0 +1,19 @@ +## API Report File for "@azure/arm-connectedcache" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; + +// @public +export function list(context: ConnectedCacheContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface OperationsListOptionalParams extends OperationOptions { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models-node.api.md index 3098b9173d57..d536f3c80d6d 100644 --- a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models-node.api.md +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models-node.api.md @@ -25,9 +25,14 @@ export interface AdditionalCacheNodeProperties { readonly cacheNodeState?: number; readonly cacheNodeStateDetailedText?: string; readonly cacheNodeStateShortText?: string; + creationMethod?: number; + readonly currentTlsCertificate?: MccCacheNodeTlsCertificate; driveConfiguration?: CacheNodeDriveConfiguration[]; readonly isProvisioned?: boolean; isProxyRequired?: ProxyRequired; + readonly issuesCount?: number; + readonly issuesList?: string[]; + readonly lastAutoUpdateInfo?: MccCacheNodeAutoUpdateInfo; optionalProperty1?: string; optionalProperty2?: string; optionalProperty3?: string; @@ -35,9 +40,8 @@ export interface AdditionalCacheNodeProperties { optionalProperty5?: string; osType?: OsType; readonly productVersion?: string; - proxyUrl?: string; proxyUrlConfiguration?: ProxyUrlConfiguration; - updateCycleType?: CycleType; + readonly tlsStatus?: string; updateInfoDetails?: string; updateRequestedDateTime?: Date; } @@ -69,7 +73,6 @@ export interface AdditionalCustomerProperties { optionalProperty4?: string; optionalProperty5?: string; readonly peeringDbLastUpdateDate?: Date; - readonly peeringDbLastUpdateTime?: Date; readonly signupPhaseStatusCode?: number; readonly signupPhaseStatusText?: string; readonly signupStatus?: boolean; @@ -161,24 +164,12 @@ export interface CacheNodeEntity { export interface CacheNodeInstallProperties { cacheNodeId?: string; customerId?: string; + driveConfiguration?: CacheNodeDriveConfiguration[]; readonly primaryAccountKey?: string; + proxyUrlConfiguration?: ProxyUrlConfiguration; readonly registrationKey?: string; readonly secondaryAccountKey?: string; -} - -// @public -export interface CacheNodeOldResponse { - error?: ErrorDetail; - readonly provisioningState?: ProvisioningState; - readonly status?: string; - statusCode?: string; - statusDetails?: string; - statusText?: string; -} - -// @public -export interface CacheNodePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; + readonly tlsCertificateProvisioningKey?: string; } // @public @@ -241,9 +232,6 @@ export interface CustomerProperty { // @public export type CustomerTransitState = string; -// @public -export type CycleType = string; - // @public export interface EnterpriseMccCacheNodeResource extends TrackedResource { properties?: CacheNodeProperty; @@ -254,14 +242,9 @@ export interface EnterpriseMccCustomerResource extends TrackedResource { properties?: CustomerProperty; } -// @public -export interface EnterprisePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; -} - // @public export interface ErrorAdditionalInfo { - readonly info?: Record; + readonly info?: any; readonly type?: string; } @@ -274,6 +257,11 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface IspCacheNodeResource extends TrackedResource { properties?: CacheNodeProperty; @@ -307,7 +295,7 @@ export enum KnownBgpReviewStateEnum { // @public export enum KnownConfigurationState { Configured = "Configured", - NotConfigured_Ip = "NotConfigured_Ip" + NotConfiguredIp = "NotConfigured_Ip" } // @public @@ -325,13 +313,6 @@ export enum KnownCustomerTransitState { TransitOnly = "TransitOnly" } -// @public -export enum KnownCycleType { - Fast = "Fast", - Preview = "Preview", - Slow = "Slow" -} - // @public export enum KnownOrigin { System = "system", @@ -365,7 +346,41 @@ export enum KnownProxyRequired { // @public export enum KnownVersions { - v2023_05_01_preview = "2023-05-01-preview" + V20230501Preview = "2023-05-01-preview", + V20241130Preview = "2024-11-30-preview" +} + +// @public +export interface MccCacheNodeAutoUpdateHistory extends TrackedResource { + properties?: MccCacheNodeAutoUpdateHistoryProperties; +} + +// @public +export interface MccCacheNodeAutoUpdateHistoryProperties { + autoUpdateHistory?: MccCacheNodeAutoUpdateInfo[]; + readonly cacheNodeId?: string; + readonly customerId?: string; +} + +// @public +export interface MccCacheNodeAutoUpdateInfo { + readonly autoUpdateLastAppliedStatus?: number; + readonly autoUpdateLastAppliedStatusDetailedText?: string; + readonly autoUpdateLastAppliedStatusText?: string; + readonly autoUpdateRingType?: number; + readonly createdDateTimeUtc?: Date; + readonly imageUriBeforeUpdate?: string; + readonly imageUriTargeted?: string; + readonly imageUriTerminal?: string; + readonly movedToTerminalStateDateTime?: Date; + readonly planChangeLogText?: string; + readonly planId?: number; + readonly ruleRequestedDay?: number; + readonly ruleRequestedHour?: string; + readonly ruleRequestedMinute?: string; + readonly ruleRequestedWeek?: number; + readonly timeToGoLiveDateTime?: string; + readonly updatedRegistryDateTimeUtc?: Date; } // @public @@ -378,10 +393,55 @@ export interface MccCacheNodeInstallDetails extends TrackedResource { properties?: CacheNodeInstallProperties; } +// @public +export interface MccCacheNodeIssueHistory extends TrackedResource { + properties?: MccCacheNodeIssueHistoryProperties; +} + +// @public +export interface MccCacheNodeIssueHistoryProperties { + readonly cacheNodeId?: string; + readonly customerId?: string; + mccIssueHistory?: MccIssue[]; +} + +// @public +export interface MccCacheNodeTlsCertificate { + readonly actionRequired?: string; + readonly certificateFileName?: string; + readonly expiryDate?: Date; + readonly notBeforeDate?: Date; + readonly subject?: string; + readonly subjectAltName?: string; + readonly thumbprint?: string; +} + +// @public +export interface MccCacheNodeTlsCertificateHistory extends TrackedResource { + properties?: MccCacheNodeTlsCertificateProperties; +} + +// @public +export interface MccCacheNodeTlsCertificateProperties { + readonly cacheNodeId?: string; + readonly customerId?: string; + tlsCertificateHistory?: MccCacheNodeTlsCertificate[]; +} + +// @public +export interface MccIssue { + readonly detailString?: string; + readonly helpLink?: string; + readonly issueEndDate?: Date; + readonly issueStartDate?: Date; + readonly mccIssueType?: string; + readonly toastString?: string; +} + // @public export interface Operation { - actionType?: ActionType; - readonly display?: OperationDisplay; + readonly actionType?: ActionType; + display?: OperationDisplay; readonly isDataAction?: boolean; readonly name?: string; readonly origin?: Origin; diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-node.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-node.api.md index 13c710d3ae35..c24cce4521a9 100644 --- a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-node.api.md +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-node.api.md @@ -4,14 +4,14 @@ ```ts -import { AbortSignalLike } from '@azure/abort-controller'; -import { ClientOptions } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PathUncheckedResponse } from '@azure-rest/core-client'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { PollerLike } from '@azure/core-lro'; -import { TokenCredential } from '@azure/core-auth'; +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PathUncheckedResponse } from '@azure-rest/core-client'; +import type { Pipeline } from '@azure/core-rest-pipeline'; +import type { PollerLike } from '@azure/core-lro'; +import type { TokenCredential } from '@azure/core-auth'; // @public export type ActionType = string; @@ -34,9 +34,14 @@ export interface AdditionalCacheNodeProperties { readonly cacheNodeState?: number; readonly cacheNodeStateDetailedText?: string; readonly cacheNodeStateShortText?: string; + creationMethod?: number; + readonly currentTlsCertificate?: MccCacheNodeTlsCertificate; driveConfiguration?: CacheNodeDriveConfiguration[]; readonly isProvisioned?: boolean; isProxyRequired?: ProxyRequired; + readonly issuesCount?: number; + readonly issuesList?: string[]; + readonly lastAutoUpdateInfo?: MccCacheNodeAutoUpdateInfo; optionalProperty1?: string; optionalProperty2?: string; optionalProperty3?: string; @@ -44,9 +49,8 @@ export interface AdditionalCacheNodeProperties { optionalProperty5?: string; osType?: OsType; readonly productVersion?: string; - proxyUrl?: string; proxyUrlConfiguration?: ProxyUrlConfiguration; - updateCycleType?: CycleType; + readonly tlsStatus?: string; updateInfoDetails?: string; updateRequestedDateTime?: Date; } @@ -78,7 +82,6 @@ export interface AdditionalCustomerProperties { optionalProperty4?: string; optionalProperty5?: string; readonly peeringDbLastUpdateDate?: Date; - readonly peeringDbLastUpdateTime?: Date; readonly signupPhaseStatusCode?: number; readonly signupPhaseStatusText?: string; readonly signupStatus?: boolean; @@ -89,6 +92,16 @@ export interface AdditionalCustomerProperties { // @public export type AutoUpdateRingType = string; +// @public +export enum AzureClouds { + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" +} + +// @public +export type AzureSupportedClouds = `${AzureClouds}`; + // @public export interface BgpCidrsConfiguration { readonly bgpCidrs?: string[]; @@ -170,24 +183,12 @@ export interface CacheNodeEntity { export interface CacheNodeInstallProperties { cacheNodeId?: string; customerId?: string; + driveConfiguration?: CacheNodeDriveConfiguration[]; readonly primaryAccountKey?: string; + proxyUrlConfiguration?: ProxyUrlConfiguration; readonly registrationKey?: string; readonly secondaryAccountKey?: string; -} - -// @public -export interface CacheNodeOldResponse { - error?: ErrorDetail; - readonly provisioningState?: ProvisioningState; - readonly status?: string; - statusCode?: string; - statusDetails?: string; - statusText?: string; -} - -// @public -export interface CacheNodePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; + readonly tlsCertificateProvisioningKey?: string; } // @public @@ -202,49 +203,12 @@ export interface CacheNodeProperty { statusText?: string; } -// @public -export interface CacheNodesOperationsCreateorUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface CacheNodesOperationsDeleteOptionalParams extends OperationOptions { -} - -// @public -export interface CacheNodesOperationsGetOptionalParams extends OperationOptions { -} - -// @public -export interface CacheNodesOperationsListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface CacheNodesOperationsListBySubscriptionOptionalParams extends OperationOptions { -} - -// @public -export interface CacheNodesOperationsOperations { - createorUpdate: (resourceGroupName: string, customerResourceName: string, resource: CacheNodePreviewResource, options?: CacheNodesOperationsCreateorUpdateOptionalParams) => PollerLike, CacheNodePreviewResource>; - delete: (resourceGroupName: string, customerResourceName: string, options?: CacheNodesOperationsDeleteOptionalParams) => Promise; - get: (resourceGroupName: string, customerResourceName: string, options?: CacheNodesOperationsGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, options?: CacheNodesOperationsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; - listBySubscription: (options?: CacheNodesOperationsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; - update: (resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: CacheNodesOperationsUpdateOptionalParams) => Promise; -} - -// @public -export interface CacheNodesOperationsUpdateOptionalParams extends OperationOptions { -} - // @public export type ConfigurationState = string; // @public (undocumented) export class ConnectedCacheClient { constructor(credential: TokenCredential, subscriptionId: string, options?: ConnectedCacheClientOptionalParams); - readonly cacheNodesOperations: CacheNodesOperationsOperations; - readonly enterpriseCustomerOperations: EnterpriseCustomerOperationsOperations; readonly enterpriseMccCacheNodesOperations: EnterpriseMccCacheNodesOperationsOperations; readonly enterpriseMccCustomers: EnterpriseMccCustomersOperations; readonly ispCacheNodesOperations: IspCacheNodesOperationsOperations; @@ -256,6 +220,7 @@ export class ConnectedCacheClient { // @public export interface ConnectedCacheClientOptionalParams extends ClientOptions { apiVersion?: string; + cloudSetting?: AzureSupportedClouds; } // @public @@ -309,60 +274,34 @@ export interface CustomerProperty { export type CustomerTransitState = string; // @public -export type CycleType = string; - -// @public -export interface EnterpriseCustomerOperationsCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; -} - -// @public -export interface EnterpriseCustomerOperationsDeleteOptionalParams extends OperationOptions { -} - -// @public -export interface EnterpriseCustomerOperationsGetOptionalParams extends OperationOptions { -} - -// @public -export interface EnterpriseCustomerOperationsListByResourceGroupOptionalParams extends OperationOptions { -} - -// @public -export interface EnterpriseCustomerOperationsListBySubscriptionOptionalParams extends OperationOptions { +export interface EnterpriseMccCacheNodeResource extends TrackedResource { + properties?: CacheNodeProperty; } // @public -export interface EnterpriseCustomerOperationsOperations { - createOrUpdate: (resourceGroupName: string, customerResourceName: string, resource: EnterprisePreviewResource, options?: EnterpriseCustomerOperationsCreateOrUpdateOptionalParams) => PollerLike, EnterprisePreviewResource>; - delete: (resourceGroupName: string, customerResourceName: string, options?: EnterpriseCustomerOperationsDeleteOptionalParams) => Promise; - get: (resourceGroupName: string, customerResourceName: string, options?: EnterpriseCustomerOperationsGetOptionalParams) => Promise; - listByResourceGroup: (resourceGroupName: string, options?: EnterpriseCustomerOperationsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; - listBySubscription: (options?: EnterpriseCustomerOperationsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; - update: (resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: EnterpriseCustomerOperationsUpdateOptionalParams) => Promise; +export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface EnterpriseCustomerOperationsUpdateOptionalParams extends OperationOptions { +export interface EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface EnterpriseMccCacheNodeResource extends TrackedResource { - properties?: CacheNodeProperty; +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions { } // @public -export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { - updateIntervalInMs?: number; +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions { } // @public -export interface EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { - updateIntervalInMs?: number; +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions { } // @public -export interface EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions { +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams extends OperationOptions { } // @public @@ -378,7 +317,10 @@ export interface EnterpriseMccCacheNodesOperationsOperations { createOrUpdate: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, resource: EnterpriseMccCacheNodeResource, options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams) => PollerLike, EnterpriseMccCacheNodeResource>; delete: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams) => PollerLike, void>; get: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetOptionalParams) => Promise; + getCacheNodeAutoUpdateHistory: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams) => Promise; getCacheNodeInstallDetails: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams) => Promise; + getCacheNodeMccIssueDetailsHistory: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams) => Promise; + getCacheNodeTlsCertificateHistory: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams) => Promise; listByEnterpriseMccCustomerResource: (resourceGroupName: string, customerResourceName: string, options?: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams) => PagedAsyncIterableIterator; update: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, properties: ConnectedCachePatchResource, options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams) => Promise; } @@ -428,14 +370,9 @@ export interface EnterpriseMccCustomersOperations { export interface EnterpriseMccCustomersUpdateOptionalParams extends OperationOptions { } -// @public -export interface EnterprisePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; -} - // @public export interface ErrorAdditionalInfo { - readonly info?: Record; + readonly info?: any; readonly type?: string; } @@ -448,6 +385,11 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface IspCacheNodeResource extends TrackedResource { properties?: CacheNodeProperty; @@ -467,10 +409,18 @@ export interface IspCacheNodesOperationsDeleteOptionalParams extends OperationOp export interface IspCacheNodesOperationsGetBgpCidrsOptionalParams extends OperationOptions { } +// @public +export interface IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions { +} + // @public export interface IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions { } +// @public +export interface IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions { +} + // @public export interface IspCacheNodesOperationsGetOptionalParams extends OperationOptions { } @@ -485,7 +435,9 @@ export interface IspCacheNodesOperationsOperations { delete: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsDeleteOptionalParams) => PollerLike, void>; get: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetOptionalParams) => Promise; getBgpCidrs: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams) => Promise; + getCacheNodeAutoUpdateHistory: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams) => Promise; getCacheNodeInstallDetails: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams) => Promise; + getCacheNodeMccIssueDetailsHistory: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, options?: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams) => Promise; listByIspCustomerResource: (resourceGroupName: string, customerResourceName: string, options?: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams) => PagedAsyncIterableIterator; update: (resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, properties: ConnectedCachePatchResource, options?: IspCacheNodesOperationsUpdateOptionalParams) => Promise; } @@ -558,7 +510,7 @@ export enum KnownBgpReviewStateEnum { // @public export enum KnownConfigurationState { Configured = "Configured", - NotConfigured_Ip = "NotConfigured_Ip" + NotConfiguredIp = "NotConfigured_Ip" } // @public @@ -576,13 +528,6 @@ export enum KnownCustomerTransitState { TransitOnly = "TransitOnly" } -// @public -export enum KnownCycleType { - Fast = "Fast", - Preview = "Preview", - Slow = "Slow" -} - // @public export enum KnownOrigin { System = "system", @@ -616,7 +561,41 @@ export enum KnownProxyRequired { // @public export enum KnownVersions { - v2023_05_01_preview = "2023-05-01-preview" + V20230501Preview = "2023-05-01-preview", + V20241130Preview = "2024-11-30-preview" +} + +// @public +export interface MccCacheNodeAutoUpdateHistory extends TrackedResource { + properties?: MccCacheNodeAutoUpdateHistoryProperties; +} + +// @public +export interface MccCacheNodeAutoUpdateHistoryProperties { + autoUpdateHistory?: MccCacheNodeAutoUpdateInfo[]; + readonly cacheNodeId?: string; + readonly customerId?: string; +} + +// @public +export interface MccCacheNodeAutoUpdateInfo { + readonly autoUpdateLastAppliedStatus?: number; + readonly autoUpdateLastAppliedStatusDetailedText?: string; + readonly autoUpdateLastAppliedStatusText?: string; + readonly autoUpdateRingType?: number; + readonly createdDateTimeUtc?: Date; + readonly imageUriBeforeUpdate?: string; + readonly imageUriTargeted?: string; + readonly imageUriTerminal?: string; + readonly movedToTerminalStateDateTime?: Date; + readonly planChangeLogText?: string; + readonly planId?: number; + readonly ruleRequestedDay?: number; + readonly ruleRequestedHour?: string; + readonly ruleRequestedMinute?: string; + readonly ruleRequestedWeek?: number; + readonly timeToGoLiveDateTime?: string; + readonly updatedRegistryDateTimeUtc?: Date; } // @public @@ -629,10 +608,55 @@ export interface MccCacheNodeInstallDetails extends TrackedResource { properties?: CacheNodeInstallProperties; } +// @public +export interface MccCacheNodeIssueHistory extends TrackedResource { + properties?: MccCacheNodeIssueHistoryProperties; +} + +// @public +export interface MccCacheNodeIssueHistoryProperties { + readonly cacheNodeId?: string; + readonly customerId?: string; + mccIssueHistory?: MccIssue[]; +} + +// @public +export interface MccCacheNodeTlsCertificate { + readonly actionRequired?: string; + readonly certificateFileName?: string; + readonly expiryDate?: Date; + readonly notBeforeDate?: Date; + readonly subject?: string; + readonly subjectAltName?: string; + readonly thumbprint?: string; +} + +// @public +export interface MccCacheNodeTlsCertificateHistory extends TrackedResource { + properties?: MccCacheNodeTlsCertificateProperties; +} + +// @public +export interface MccCacheNodeTlsCertificateProperties { + readonly cacheNodeId?: string; + readonly customerId?: string; + tlsCertificateHistory?: MccCacheNodeTlsCertificate[]; +} + +// @public +export interface MccIssue { + readonly detailString?: string; + readonly helpLink?: string; + readonly issueEndDate?: Date; + readonly issueStartDate?: Date; + readonly mccIssueType?: string; + readonly toastString?: string; +} + // @public export interface Operation { - actionType?: ActionType; - readonly display?: OperationDisplay; + readonly actionType?: ActionType; + display?: OperationDisplay; readonly isDataAction?: boolean; readonly name?: string; readonly origin?: Origin; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsCreateorUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsCreateorUpdateSample.ts deleted file mode 100644 index c22cc001fda5..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsCreateorUpdateSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesOperationsCreateorUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.createorUpdate( - "rgConnectedCache", - "lwrsyhvfpcfrwrim", - { - location: "westus", - properties: { - statusCode: "movtzupooyhdqk", - statusText: "bjnsrpzaofjntleoesjwammgbi", - statusDetails: "quuziibkwtgf", - error: {}, - }, - tags: { key8256: "oreqiywrjkmate" }, - }, - ); - console.log(result); -} - -async function main(): Promise { - await cacheNodesOperationsCreateorUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsDeleteSample.ts deleted file mode 100644 index 54e5aed84970..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsDeleteSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to deletes an existing cache Node - * - * @summary deletes an existing cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesOperationsDelete(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.cacheNodesOperations.delete( - "rgConnectedCache", - "otvtvhmovthjwzjzbsqkbnmpcmmeianpqxmmaspvdczmrenquxigrtuarmlcmvsnaclhcbw", - ); -} - -async function main(): Promise { - await cacheNodesOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsGetSample.ts deleted file mode 100644 index 90ea4730d500..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of a cacheNodes - * - * @summary retrieves the properties of a cacheNodes - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesOperationsGet(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.get( - "rgConnectedCache", - "nqoxkgorhuzbhjwcegymzqbeydzjupemekt", - ); - console.log(result); -} - -async function main(): Promise { - await cacheNodesOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListByResourceGroupSample.ts deleted file mode 100644 index 07f6f3c347f0..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListByResourceGroupSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache - * - * @summary retrieves the properties of all ConnectedCache - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.cacheNodesOperations.listByResourceGroup("rgConnectedCache")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListBySubscriptionSample.ts deleted file mode 100644 index 58217198efba..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListBySubscriptionSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.cacheNodesOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsUpdateSample.ts deleted file mode 100644 index 8b2edf66385f..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsUpdateSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to updates an existing Cache Node - * - * @summary updates an existing Cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.update("rgConnectedCache", "wlrwpdbcv", { - tags: { key5032: "esiuyjbpcwkpqriqiqztxuocv" }, - }); - console.log(result); -} - -async function main(): Promise { - await cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsCreateOrUpdateSample.ts deleted file mode 100644 index 282aa5e3f3cd..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsCreateOrUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.createOrUpdate("rgConnectedCache", "l", { - properties: { - statusCode: "oldkroffqtkryqffpsi", - statusText: "bs", - statusDetails: "lhwvcz", - error: {}, - }, - tags: { key4215: "zjbszvlzf" }, - location: "zdzhhkjyogrqxwihkifnmeyhwpujbr", - }); - console.log(result); -} - -async function main(): Promise { - await enterpriseCustomerOperationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsDeleteSample.ts deleted file mode 100644 index 932caf09400f..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsDeleteSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to deletes an existing customer Enterprise resource - * - * @summary deletes an existing customer Enterprise resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsDelete(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.enterpriseCustomerOperations.delete( - "rgConnectedCache", - "jeubxmhiaihcusgnahblvvckbdcetacvqgwbohlrqucodtlwuyefpejskvamgrdnwgucziodcfpjhqy", - ); -} - -async function main(): Promise { - await enterpriseCustomerOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsGetSample.ts deleted file mode 100644 index b90f565102fa..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsGetSample.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of a Enterprise customer - * - * @summary retrieves the properties of a Enterprise customer - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsGet(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.get("rgConnectedCache", "MCCTPTest2"); - console.log(result); -} - -async function main(): Promise { - await enterpriseCustomerOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListByResourceGroupSample.ts deleted file mode 100644 index b93d110e19b7..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache enterpriseCustomers - * - * @summary retrieves the properties of all ConnectedCache enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.enterpriseCustomerOperations.listByResourceGroup( - "rgConnectedCache", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await enterpriseCustomerOperationsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListBySubscriptionSample.ts deleted file mode 100644 index 6d05e4c478a0..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsListBySubscriptionSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsListBySubscription(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.enterpriseCustomerOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - await enterpriseCustomerOperationsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsUpdateSample.ts deleted file mode 100644 index 731cd6421cac..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsUpdateSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to updates an existing enterpriseCustomers - * - * @summary updates an existing enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json - */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -async function enterpriseCustomerOperationsUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.update( - "rgConnectedCache", - "MCCTPTest2", - { tags: { key1653: "nzjczrhclhkndesgy" } }, - ); - console.log(result); -} - -async function main(): Promise { - await enterpriseCustomerOperationsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts index 473aaf9d17a7..a37430068b55 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; @@ -52,7 +51,6 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( ], bgpConfiguration: { asnToIpAddressMapping: "fjbggfvumrn" }, proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "ihkzxlzvpcywtzrogupqozkdud", optionalProperty1: "ph", optionalProperty2: "soqqgpgcbhb", optionalProperty3: "fpnycrbagptsujiotnjfuhlm", diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsDeleteSample.ts index a78cfb23a3d5..a82e0040e29a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts new file mode 100644 index 000000000000..5daafa6e2ceb --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts index 46153ace0da7..0c666defeae2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts new file mode 100644 index 000000000000..7471630304bf --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts new file mode 100644 index 000000000000..50208ba04d77 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource tls certificate histrory information + * + * @summary this api gets ispCacheNode resource tls certificate histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetSample.ts index 4e6b5d58a2e4..e292b2831339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts index 013cc7a9f78f..9780aad2c7ff 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts index c8d7cd9c8cdb..51862151564b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts index ef6e31451fe0..c053a0620be2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api creates an enterprise mcc customer with the specified create parameters * * @summary this api creates an enterprise mcc customer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersCreateOrUpdate(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; @@ -38,6 +37,7 @@ async function enterpriseMccCustomersCreateOrUpdate(): Promise { additionalCustomerProperties: { customerEmail: "zdjgibsidydyzm", customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", + customerTransitState: "voblixkxfejbmhxilb", customerAsn: "hgrelgnrtdkleisnepfolu", customerEntitlementSkuId: "b", customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts index 430e76cbf738..a279d567ca45 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api deletes an existing enterprise mcc customer resource * * @summary this api deletes an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersDelete(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts index 69f223cde65c..22b9c75e3e14 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets the enterprise mcc customer resource information using this get call * * @summary gets the enterprise mcc customer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersGet(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts index 0a1470ee182b..89edb8855339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets the information about all enterprise mcc customer resources under the given subscription and resource group * * @summary this api gets the information about all enterprise mcc customer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersListByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts index 81d161e88218..36460eb3428e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets information about all enterpriseMccCustomer resources under the given subscription * * @summary this api gets information about all enterpriseMccCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersListBySubscription(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts index f68c85550f33..c90b375ae35f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api updates an existing enterprise mcc customer resource * * @summary this api updates an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function enterpriseMccCustomersUpdate(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts index f6421b924184..52c2830a022a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesOperationsCreateOrUpdate(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; @@ -39,17 +38,11 @@ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { }, additionalCacheNodeProperties: { driveConfiguration: [ - { - physicalPath: "/mcc", - sizeInGb: 500, - cacheNumber: 1, - nginxMapping: "lijygenjq", - }, + { physicalPath: "/mcc", sizeInGb: 500, cacheNumber: 1, nginxMapping: "lijygenjq" }, ], bgpConfiguration: { asnToIpAddressMapping: "pafcimhoog" }, cacheNodePropertiesDetailsIssuesList: ["ex"], proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "qhux", optionalProperty1: "hvpmt", optionalProperty2: "talanelmsgxvksrzoeeontqkjzbpv", optionalProperty3: "bxkoxq", diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsDeleteSample.ts index d5fb58e21837..3997fba0b6fc 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts index fff0288a1d28..c6d7f9598580 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts new file mode 100644 index 000000000000..e5ed2f1bb152 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts index 13570d1f266e..b97777a1b132 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts new file mode 100644 index 000000000000..04568b330ce1 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetSample.ts index 5217979688f1..c8b4a39c8a2e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesGetResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts index ee9069cf8717..8f44bf5e9b7b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesOperationsListByIspCustomerResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts index bd70984866b7..44885b5c7b48 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCacheNodesOperationsUpdate(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts index 400a1266969f..984d4867b254 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api creates an ispCustomer with the specified create parameters * * @summary this api creates an ispCustomer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; @@ -36,6 +35,7 @@ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts index 7060eb64f17f..d4c6e7160d9f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets the ispCustomer resource information using this get call * * @summary gets the ispCustomer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCustomersGetGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts index 8dc0a7330fd0..bfa31b3f32bf 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets the information about all ispCustomer resources under the given subscription and resource group * * @summary this api gets the information about all ispCustomer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts index d91ccde41b94..9b342c59e0af 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api gets information about all ispCustomer resources under the given subscription * * @summary this api gets information about all ispCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCustomerListBySubscriptionGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts index bce5e2a3f621..84b483d512e8 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to this api updates an existing ispCustomer resource * * @summary this api updates an existing ispCustomer resource - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function ispCustomerUpdateDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts index ed8c75851d5e..da038e6af138 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts @@ -1,19 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json */ - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheOperationsForTheProviderGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/README.md b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/README.md index d2b623e241ee..7d7f4e484846 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/README.md +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/README.md @@ -4,44 +4,37 @@ These sample programs show how to use the JavaScript client libraries for @azure | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [cacheNodesOperationsCreateorUpdateSample.js][cachenodesoperationscreateorupdatesample] | creates a cacheNodes with the specified create parameters x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json | -| [cacheNodesOperationsDeleteSample.js][cachenodesoperationsdeletesample] | deletes an existing cache Node x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json | -| [cacheNodesOperationsGetSample.js][cachenodesoperationsgetsample] | retrieves the properties of a cacheNodes x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json | -| [cacheNodesOperationsListByResourceGroupSample.js][cachenodesoperationslistbyresourcegroupsample] | retrieves the properties of all ConnectedCache x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json | -| [cacheNodesOperationsListBySubscriptionSample.js][cachenodesoperationslistbysubscriptionsample] | retrieves the properties of all ConnectedCaches x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json | -| [cacheNodesOperationsUpdateSample.js][cachenodesoperationsupdatesample] | updates an existing Cache Node x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsCreateOrUpdateSample.js][enterprisecustomeroperationscreateorupdatesample] | creates a cacheNodes with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsDeleteSample.js][enterprisecustomeroperationsdeletesample] | deletes an existing customer Enterprise resource x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsGetSample.js][enterprisecustomeroperationsgetsample] | retrieves the properties of a Enterprise customer x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsListByResourceGroupSample.js][enterprisecustomeroperationslistbyresourcegroupsample] | retrieves the properties of all ConnectedCache enterpriseCustomers x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsListBySubscriptionSample.js][enterprisecustomeroperationslistbysubscriptionsample] | retrieves the properties of all ConnectedCaches x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsUpdateSample.js][enterprisecustomeroperationsupdatesample] | updates an existing enterpriseCustomers x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js][enterprisemcccachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsDeleteSample.js][enterprisemcccachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js][enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsGetSample.js][enterprisemcccachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js][enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsUpdateSample.js][enterprisemcccachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json | -| [enterpriseMccCustomersCreateOrUpdateSample.js][enterprisemcccustomerscreateorupdatesample] | this api creates an enterprise mcc customer with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseMccCustomersDeleteSample.js][enterprisemcccustomersdeletesample] | this api deletes an existing enterprise mcc customer resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json | -| [enterpriseMccCustomersGetSample.js][enterprisemcccustomersgetsample] | gets the enterprise mcc customer resource information using this get call x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json | -| [enterpriseMccCustomersListByResourceGroupSample.js][enterprisemcccustomerslistbyresourcegroupsample] | this api gets the information about all enterprise mcc customer resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json | -| [enterpriseMccCustomersListBySubscriptionSample.js][enterprisemcccustomerslistbysubscriptionsample] | this api gets information about all enterpriseMccCustomer resources under the given subscription x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json | -| [enterpriseMccCustomersUpdateSample.js][enterprisemcccustomersupdatesample] | this api updates an existing enterprise mcc customer resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json | -| [ispCacheNodesOperationsCreateOrUpdateSample.js][ispcachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [ispCacheNodesOperationsDeleteSample.js][ispcachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetBgpCidrsSample.js][ispcachenodesoperationsgetbgpcidrssample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js][ispcachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetSample.js][ispcachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json | -| [ispCacheNodesOperationsListByIspCustomerResourceSample.js][ispcachenodesoperationslistbyispcustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json | -| [ispCacheNodesOperationsUpdateSample.js][ispcachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json | -| [ispCustomersCreateOrUpdateSample.js][ispcustomerscreateorupdatesample] | this api creates an ispCustomer with the specified create parameters x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json | -| [ispCustomersDeleteSample.js][ispcustomersdeletesample] | this api deletes an existing ispCustomer resource x-ms-original-file: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json | -| [ispCustomersGetSample.js][ispcustomersgetsample] | gets the ispCustomer resource information using this get call x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json | -| [ispCustomersListByResourceGroupSample.js][ispcustomerslistbyresourcegroupsample] | this api gets the information about all ispCustomer resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json | -| [ispCustomersListBySubscriptionSample.js][ispcustomerslistbysubscriptionsample] | this api gets information about all ispCustomer resources under the given subscription x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json | -| [ispCustomersUpdateSample.js][ispcustomersupdatesample] | this api updates an existing ispCustomer resource x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js][enterprisemcccachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsDeleteSample.js][enterprisemcccachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js][enterprisemcccachenodesoperationsgetcachenodeautoupdatehistorysample] | this api gets ispCacheNode resource auto update histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js][enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js][enterprisemcccachenodesoperationsgetcachenodemccissuedetailshistorysample] | this api gets ispCacheNode resource issues details histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js][enterprisemcccachenodesoperationsgetcachenodetlscertificatehistorysample] | this api gets ispCacheNode resource tls certificate histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetSample.js][enterprisemcccachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js][enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsUpdateSample.js][enterprisemcccachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json | +| [enterpriseMccCustomersCreateOrUpdateSample.js][enterprisemcccustomerscreateorupdatesample] | this api creates an enterprise mcc customer with the specified create parameters x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json | +| [enterpriseMccCustomersDeleteSample.js][enterprisemcccustomersdeletesample] | this api deletes an existing enterprise mcc customer resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json | +| [enterpriseMccCustomersGetSample.js][enterprisemcccustomersgetsample] | gets the enterprise mcc customer resource information using this get call x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json | +| [enterpriseMccCustomersListByResourceGroupSample.js][enterprisemcccustomerslistbyresourcegroupsample] | this api gets the information about all enterprise mcc customer resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json | +| [enterpriseMccCustomersListBySubscriptionSample.js][enterprisemcccustomerslistbysubscriptionsample] | this api gets information about all enterpriseMccCustomer resources under the given subscription x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json | +| [enterpriseMccCustomersUpdateSample.js][enterprisemcccustomersupdatesample] | this api updates an existing enterprise mcc customer resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json | +| [ispCacheNodesOperationsCreateOrUpdateSample.js][ispcachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | +| [ispCacheNodesOperationsDeleteSample.js][ispcachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetBgpCidrsSample.js][ispcachenodesoperationsgetbgpcidrssample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js][ispcachenodesoperationsgetcachenodeautoupdatehistorysample] | this api gets ispCacheNode resource auto update histrory information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js][ispcachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js][ispcachenodesoperationsgetcachenodemccissuedetailshistorysample] | this api gets ispCacheNode resource issues details histrory information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetSample.js][ispcachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json | +| [ispCacheNodesOperationsListByIspCustomerResourceSample.js][ispcachenodesoperationslistbyispcustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json | +| [ispCacheNodesOperationsUpdateSample.js][ispcachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json | +| [ispCustomersCreateOrUpdateSample.js][ispcustomerscreateorupdatesample] | this api creates an ispCustomer with the specified create parameters x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json | +| [ispCustomersDeleteSample.js][ispcustomersdeletesample] | this api deletes an existing ispCustomer resource x-ms-original-file: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json | +| [ispCustomersGetSample.js][ispcustomersgetsample] | gets the ispCustomer resource information using this get call x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json | +| [ispCustomersListByResourceGroupSample.js][ispcustomerslistbyresourcegroupsample] | this api gets the information about all ispCustomer resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json | +| [ispCustomersListBySubscriptionSample.js][ispcustomerslistbysubscriptionsample] | this api gets information about all ispCustomer resources under the given subscription x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json | +| [ispCustomersUpdateSample.js][ispcustomersupdatesample] | this api updates an existing ispCustomer resource x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json | ## Prerequisites @@ -68,34 +61,25 @@ npm install 3. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node cacheNodesOperationsCreateorUpdateSample.js +node enterpriseMccCacheNodesOperationsCreateOrUpdateSample.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): +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -cross-env node cacheNodesOperationsCreateorUpdateSample.js +node enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[cachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsCreateorUpdateSample.js -[cachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsDeleteSample.js -[cachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsGetSample.js -[cachenodesoperationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListByResourceGroupSample.js -[cachenodesoperationslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListBySubscriptionSample.js -[cachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsUpdateSample.js -[enterprisecustomeroperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsCreateOrUpdateSample.js -[enterprisecustomeroperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsDeleteSample.js -[enterprisecustomeroperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsGetSample.js -[enterprisecustomeroperationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListByResourceGroupSample.js -[enterprisecustomeroperationslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListBySubscriptionSample.js -[enterprisecustomeroperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsUpdateSample.js [enterprisemcccachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js [enterprisemcccachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsDeleteSample.js +[enterprisemcccachenodesoperationsgetcachenodeautoupdatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js [enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js +[enterprisemcccachenodesoperationsgetcachenodemccissuedetailshistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js +[enterprisemcccachenodesoperationsgetcachenodetlscertificatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js [enterprisemcccachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetSample.js [enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js [enterprisemcccachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsUpdateSample.js @@ -108,7 +92,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [ispcachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsCreateOrUpdateSample.js [ispcachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsDeleteSample.js [ispcachenodesoperationsgetbgpcidrssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetBgpCidrsSample.js +[ispcachenodesoperationsgetcachenodeautoupdatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js [ispcachenodesoperationsgetcachenodeinstalldetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js +[ispcachenodesoperationsgetcachenodemccissuedetailshistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js [ispcachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetSample.js [ispcachenodesoperationslistbyispcustomerresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsListByIspCustomerResourceSample.js [ispcachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsUpdateSample.js diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsCreateorUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsCreateorUpdateSample.js deleted file mode 100644 index ec80edd45fe5..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsCreateorUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json - */ -async function cacheNodesOperationsCreateorUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.createorUpdate( - "rgConnectedCache", - "lwrsyhvfpcfrwrim", - { - location: "westus", - properties: { - statusCode: "movtzupooyhdqk", - statusText: "bjnsrpzaofjntleoesjwammgbi", - statusDetails: "quuziibkwtgf", - error: {}, - }, - tags: { key8256: "oreqiywrjkmate" }, - }, - ); - console.log(result); -} - -async function main() { - cacheNodesOperationsCreateorUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsDeleteSample.js deleted file mode 100644 index ebfe0cd305c6..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsDeleteSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to deletes an existing cache Node - * - * @summary deletes an existing cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json - */ -async function cacheNodesOperationsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.cacheNodesOperations.delete( - "rgConnectedCache", - "otvtvhmovthjwzjzbsqkbnmpcmmeianpqxmmaspvdczmrenquxigrtuarmlcmvsnaclhcbw", - ); -} - -async function main() { - cacheNodesOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsGetSample.js deleted file mode 100644 index 6dd50adbe10c..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of a cacheNodes - * - * @summary retrieves the properties of a cacheNodes - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json - */ -async function cacheNodesOperationsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.get( - "rgConnectedCache", - "nqoxkgorhuzbhjwcegymzqbeydzjupemekt", - ); - console.log(result); -} - -async function main() { - cacheNodesOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListByResourceGroupSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListByResourceGroupSample.js deleted file mode 100644 index 6008f32c4155..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListByResourceGroupSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache - * - * @summary retrieves the properties of all ConnectedCache - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cacheNodesOperations.listByResourceGroup("rgConnectedCache")) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListBySubscriptionSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListBySubscriptionSample.js deleted file mode 100644 index 5e6f43483bc8..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cacheNodesOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsUpdateSample.js deleted file mode 100644 index 01acab46fe76..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/cacheNodesOperationsUpdateSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to updates an existing Cache Node - * - * @summary updates an existing Cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.update("rgConnectedCache", "wlrwpdbcv", { - tags: { key5032: "esiuyjbpcwkpqriqiqztxuocv" }, - }); - console.log(result); -} - -async function main() { - cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsCreateOrUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsCreateOrUpdateSample.js deleted file mode 100644 index ea86f5cedef9..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsCreateOrUpdateSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsCreateOrUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.createOrUpdate("rgConnectedCache", "l", { - properties: { - statusCode: "oldkroffqtkryqffpsi", - statusText: "bs", - statusDetails: "lhwvcz", - error: {}, - }, - tags: { key4215: "zjbszvlzf" }, - location: "zdzhhkjyogrqxwihkifnmeyhwpujbr", - }); - console.log(result); -} - -async function main() { - enterpriseCustomerOperationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsDeleteSample.js deleted file mode 100644 index 6ce9d67d85ef..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsDeleteSample.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to deletes an existing customer Enterprise resource - * - * @summary deletes an existing customer Enterprise resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsDelete() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.enterpriseCustomerOperations.delete( - "rgConnectedCache", - "jeubxmhiaihcusgnahblvvckbdcetacvqgwbohlrqucodtlwuyefpejskvamgrdnwgucziodcfpjhqy", - ); -} - -async function main() { - enterpriseCustomerOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsGetSample.js deleted file mode 100644 index 9caac6cd74f1..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsGetSample.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of a Enterprise customer - * - * @summary retrieves the properties of a Enterprise customer - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsGet() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.get("rgConnectedCache", "MCCTPTest2"); - console.log(result); -} - -async function main() { - enterpriseCustomerOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListByResourceGroupSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListByResourceGroupSample.js deleted file mode 100644 index a4b80433ece1..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListByResourceGroupSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache enterpriseCustomers - * - * @summary retrieves the properties of all ConnectedCache enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsListByResourceGroup() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.enterpriseCustomerOperations.listByResourceGroup( - "rgConnectedCache", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - enterpriseCustomerOperationsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListBySubscriptionSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListBySubscriptionSample.js deleted file mode 100644 index 04f3b97d0da9..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsListBySubscriptionSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsListBySubscription() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.enterpriseCustomerOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main() { - enterpriseCustomerOperationsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsUpdateSample.js deleted file mode 100644 index 505dff1f630a..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseCustomerOperationsUpdateSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to updates an existing enterpriseCustomers - * - * @summary updates an existing enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsUpdate() { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.update( - "rgConnectedCache", - "MCCTPTest2", - { tags: { key1653: "nzjczrhclhkndesgy" } }, - ); - console.log(result); -} - -async function main() { - enterpriseCustomerOperationsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js index aa9e6a8ba2cc..a894ce3078c1 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -51,7 +51,6 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( ], bgpConfiguration: { asnToIpAddressMapping: "fjbggfvumrn" }, proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "ihkzxlzvpcywtzrogupqozkdud", optionalProperty1: "ph", optionalProperty2: "soqqgpgcbhb", optionalProperty3: "fpnycrbagptsujiotnjfuhlm", @@ -67,7 +66,7 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( } async function main() { - createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(); + await createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsDeleteSample.js index d6b7e322a035..fa762e9cfdae 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsDeleteSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximu } async function main() { - enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(); + await enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js new file mode 100644 index 000000000000..2ea5ace4b0cb --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main() { + await enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js index cd4eac61a5ac..63732fd2c310 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ async function getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKey } async function main() { - getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(); + await getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js new file mode 100644 index 000000000000..6e7308849fc5 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main() { + await enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js new file mode 100644 index 000000000000..bc1ddaec32ba --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this api gets ispCacheNode resource tls certificate histrory information + * + * @summary this api gets ispCacheNode resource tls certificate histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main() { + await enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetSample.js index fd8605e3a452..67b04b87806f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json */ async function getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCus } async function main() { - getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(); + await getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js index f422314a30b2..57962f125417 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource( + for await (const item of client.enterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource( "rgConnectedCache", "syjjjzk", )) { @@ -26,7 +26,7 @@ async function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResou } async function main() { - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(); + await enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsUpdateSample.js index 3b94d7909a8e..25268b36e885 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCacheNodesOperationsUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -24,7 +24,7 @@ async function enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule( } async function main() { - enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(); + await enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersCreateOrUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersCreateOrUpdateSample.js index ebb81e88a6dc..6a168d1b093d 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersCreateOrUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api creates an enterprise mcc customer with the specified create parameters * * @summary this api creates an enterprise mcc customer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json */ async function enterpriseMccCustomersCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -37,6 +37,7 @@ async function enterpriseMccCustomersCreateOrUpdate() { additionalCustomerProperties: { customerEmail: "zdjgibsidydyzm", customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", + customerTransitState: "voblixkxfejbmhxilb", customerAsn: "hgrelgnrtdkleisnepfolu", customerEntitlementSkuId: "b", customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", @@ -58,7 +59,7 @@ async function enterpriseMccCustomersCreateOrUpdate() { } async function main() { - enterpriseMccCustomersCreateOrUpdate(); + await enterpriseMccCustomersCreateOrUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersDeleteSample.js index df1213de012f..df2974e94e4a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersDeleteSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api deletes an existing enterprise mcc customer resource * * @summary this api deletes an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json */ async function enterpriseMccCustomersDelete() { const credential = new DefaultAzureCredential(); @@ -18,7 +18,7 @@ async function enterpriseMccCustomersDelete() { } async function main() { - enterpriseMccCustomersDelete(); + await enterpriseMccCustomersDelete(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersGetSample.js index 0d926e538ac6..d7b5a5a1145f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersGetSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets the enterprise mcc customer resource information using this get call * * @summary gets the enterprise mcc customer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json */ async function enterpriseMccCustomersGet() { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function enterpriseMccCustomersGet() { } async function main() { - enterpriseMccCustomersGet(); + await enterpriseMccCustomersGet(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListByResourceGroupSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListByResourceGroupSample.js index 5d93bd1318ce..24d503ec4238 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListByResourceGroupSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListByResourceGroupSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets the information about all enterprise mcc customer resources under the given subscription and resource group * * @summary this api gets the information about all enterprise mcc customer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json */ async function enterpriseMccCustomersListByResourceGroup() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCustomers.listByResourceGroup("rgConnectedCache")) { + for await (const item of client.enterpriseMccCustomers.listByResourceGroup("rgConnectedCache")) { resArray.push(item); } @@ -23,7 +23,7 @@ async function enterpriseMccCustomersListByResourceGroup() { } async function main() { - enterpriseMccCustomersListByResourceGroup(); + await enterpriseMccCustomersListByResourceGroup(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListBySubscriptionSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListBySubscriptionSample.js index 37e5ecb83894..5e1aefb39103 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListBySubscriptionSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersListBySubscriptionSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets information about all enterpriseMccCustomer resources under the given subscription * * @summary this api gets information about all enterpriseMccCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json */ async function enterpriseMccCustomersListBySubscription() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCustomers.listBySubscription()) { + for await (const item of client.enterpriseMccCustomers.listBySubscription()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function enterpriseMccCustomersListBySubscription() { } async function main() { - enterpriseMccCustomersListBySubscription(); + await enterpriseMccCustomersListBySubscription(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersUpdateSample.js index 3d96175f63a6..f6418d144cd7 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/enterpriseMccCustomersUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api updates an existing enterprise mcc customer resource * * @summary this api updates an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json */ async function enterpriseMccCustomersUpdate() { const credential = new DefaultAzureCredential(); @@ -21,7 +21,7 @@ async function enterpriseMccCustomersUpdate() { } async function main() { - enterpriseMccCustomersUpdate(); + await enterpriseMccCustomersUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsCreateOrUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsCreateOrUpdateSample.js index fdb0bb41d881..7fe5dc7256a6 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsCreateOrUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ async function ispCacheNodesOperationsCreateOrUpdate() { const credential = new DefaultAzureCredential(); @@ -38,17 +38,11 @@ async function ispCacheNodesOperationsCreateOrUpdate() { }, additionalCacheNodeProperties: { driveConfiguration: [ - { - physicalPath: "/mcc", - sizeInGb: 500, - cacheNumber: 1, - nginxMapping: "lijygenjq", - }, + { physicalPath: "/mcc", sizeInGb: 500, cacheNumber: 1, nginxMapping: "lijygenjq" }, ], bgpConfiguration: { asnToIpAddressMapping: "pafcimhoog" }, cacheNodePropertiesDetailsIssuesList: ["ex"], proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "qhux", optionalProperty1: "hvpmt", optionalProperty2: "talanelmsgxvksrzoeeontqkjzbpv", optionalProperty3: "bxkoxq", @@ -67,7 +61,7 @@ async function ispCacheNodesOperationsCreateOrUpdate() { } async function main() { - ispCacheNodesOperationsCreateOrUpdate(); + await ispCacheNodesOperationsCreateOrUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsDeleteSample.js index 0148f657e603..8a3f52576bde 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsDeleteSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json */ async function ispCacheNodesDeleteOperationGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function ispCacheNodesDeleteOperationGeneratedByMaximumSetRule() { } async function main() { - ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(); + await ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetBgpCidrsSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetBgpCidrsSample.js index 3ca05c76305a..d193bcb773a4 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetBgpCidrsSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetBgpCidrsSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json */ async function ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule() { } async function main() { - ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(); + await ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js new file mode 100644 index 000000000000..e5febe4bedde --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main() { + await ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js index d30b6dff7c75..defeec94aa0d 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ async function ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule() } async function main() { - ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(); + await ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js new file mode 100644 index 000000000000..03c999b00e8f --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ConnectedCacheClient } = require("@azure/arm-connectedcache"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main() { + await ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetSample.js index 16026a7e0a8d..a02ce2b67127 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json */ async function ispCacheNodesGetResourceGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function ispCacheNodesGetResourceGeneratedByMaximumSetRule() { } async function main() { - ispCacheNodesGetResourceGeneratedByMaximumSetRule(); + await ispCacheNodesGetResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsListByIspCustomerResourceSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsListByIspCustomerResourceSample.js index 940d5cd78194..310300a37067 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsListByIspCustomerResourceSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsListByIspCustomerResourceSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json */ async function ispCacheNodesOperationsListByIspCustomerResource() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCacheNodesOperations.listByIspCustomerResource( + for await (const item of client.ispCacheNodesOperations.listByIspCustomerResource( "rgConnectedCache", "MccRPTest1", )) { @@ -26,7 +26,7 @@ async function ispCacheNodesOperationsListByIspCustomerResource() { } async function main() { - ispCacheNodesOperationsListByIspCustomerResource(); + await ispCacheNodesOperationsListByIspCustomerResource(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsUpdateSample.js index 6820e59557eb..2b55c9aa7314 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCacheNodesOperationsUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json */ async function ispCacheNodesOperationsUpdate() { const credential = new DefaultAzureCredential(); @@ -24,7 +24,7 @@ async function ispCacheNodesOperationsUpdate() { } async function main() { - ispCacheNodesOperationsUpdate(); + await ispCacheNodesOperationsUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersCreateOrUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersCreateOrUpdateSample.js index df37e4cf23af..5b2febb31ba5 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersCreateOrUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api creates an ispCustomer with the specified create parameters * * @summary this api creates an ispCustomer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json */ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -35,6 +35,7 @@ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule() { additionalCustomerProperties: { customerEmail: "zdjgibsidydyzm", customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", + customerTransitState: "voblixkxfejbmhxilb", customerAsn: "hgrelgnrtdkleisnepfolu", customerEntitlementSkuId: "b", customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", @@ -54,7 +55,7 @@ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule() { } async function main() { - ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(); + await ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersDeleteSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersDeleteSample.js index 53576d375288..57c126442f8f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersDeleteSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api deletes an existing ispCustomer resource * * @summary this api deletes an existing ispCustomer resource - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json */ async function ispCustomersDeleteGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -21,7 +21,7 @@ async function ispCustomersDeleteGeneratedByMaximumSetRule() { } async function main() { - ispCustomersDeleteGeneratedByMaximumSetRule(); + await ispCustomersDeleteGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersGetSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersGetSample.js index 932606d69d86..7f0c6f4e9389 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersGetSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets the ispCustomer resource information using this get call * * @summary gets the ispCustomer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json */ async function ispCustomersGetGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -19,7 +19,7 @@ async function ispCustomersGetGeneratedByMaximumSetRule() { } async function main() { - ispCustomersGetGeneratedByMaximumSetRule(); + await ispCustomersGetGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListByResourceGroupSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListByResourceGroupSample.js index 6be72f481df8..88dbfb38b3d0 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListByResourceGroupSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListByResourceGroupSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets the information about all ispCustomer resources under the given subscription and resource group * * @summary this api gets the information about all ispCustomer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json */ async function ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCustomers.listByResourceGroup("rgConnectedCache")) { + for await (const item of client.ispCustomers.listByResourceGroup("rgConnectedCache")) { resArray.push(item); } @@ -23,7 +23,7 @@ async function ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule( } async function main() { - ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(); + await ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListBySubscriptionSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListBySubscriptionSample.js index 82a4e137e758..26588980f81d 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListBySubscriptionSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersListBySubscriptionSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api gets information about all ispCustomer resources under the given subscription * * @summary this api gets information about all ispCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json */ async function ispCustomerListBySubscriptionGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCustomers.listBySubscription()) { + for await (const item of client.ispCustomers.listBySubscription()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function ispCustomerListBySubscriptionGeneratedByMaximumSetRule() { } async function main() { - ispCustomerListBySubscriptionGeneratedByMaximumSetRule(); + await ispCustomerListBySubscriptionGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersUpdateSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersUpdateSample.js index 508f5dd64b6b..0b5ebb608b48 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersUpdateSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/ispCustomersUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to this api updates an existing ispCustomer resource * * @summary this api updates an existing ispCustomer resource - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json */ async function ispCustomerUpdateDetailsGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); @@ -21,7 +21,7 @@ async function ispCustomerUpdateDetailsGeneratedByMaximumSetRule() { } async function main() { - ispCustomerUpdateDetailsGeneratedByMaximumSetRule(); + await ispCustomerUpdateDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/operationsListSample.js b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/operationsListSample.js index 50ef1b417965..e334e633accc 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/operationsListSample.js @@ -8,14 +8,14 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json */ async function listTheOperationsForTheProviderGeneratedByMaximumSetRule() { const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function listTheOperationsForTheProviderGeneratedByMaximumSetRule() { } async function main() { - listTheOperationsForTheProviderGeneratedByMaximumSetRule(); + await listTheOperationsForTheProviderGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/package.json b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/package.json index 84977bb778ff..85844ecda25f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/package.json +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/javascript/package.json @@ -28,6 +28,9 @@ "dependencies": { "@azure/arm-connectedcache": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.13.0" + }, + "devDependencies": { + "cross-env": "latest" } } diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/README.md b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/README.md index 957ec1776052..3c5640038bf6 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/README.md +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/README.md @@ -4,44 +4,37 @@ These sample programs show how to use the TypeScript client libraries for @azure | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [cacheNodesOperationsCreateorUpdateSample.ts][cachenodesoperationscreateorupdatesample] | creates a cacheNodes with the specified create parameters x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json | -| [cacheNodesOperationsDeleteSample.ts][cachenodesoperationsdeletesample] | deletes an existing cache Node x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json | -| [cacheNodesOperationsGetSample.ts][cachenodesoperationsgetsample] | retrieves the properties of a cacheNodes x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json | -| [cacheNodesOperationsListByResourceGroupSample.ts][cachenodesoperationslistbyresourcegroupsample] | retrieves the properties of all ConnectedCache x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json | -| [cacheNodesOperationsListBySubscriptionSample.ts][cachenodesoperationslistbysubscriptionsample] | retrieves the properties of all ConnectedCaches x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json | -| [cacheNodesOperationsUpdateSample.ts][cachenodesoperationsupdatesample] | updates an existing Cache Node x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsCreateOrUpdateSample.ts][enterprisecustomeroperationscreateorupdatesample] | creates a cacheNodes with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsDeleteSample.ts][enterprisecustomeroperationsdeletesample] | deletes an existing customer Enterprise resource x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsGetSample.ts][enterprisecustomeroperationsgetsample] | retrieves the properties of a Enterprise customer x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsListByResourceGroupSample.ts][enterprisecustomeroperationslistbyresourcegroupsample] | retrieves the properties of all ConnectedCache enterpriseCustomers x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsListBySubscriptionSample.ts][enterprisecustomeroperationslistbysubscriptionsample] | retrieves the properties of all ConnectedCaches x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json | -| [enterpriseCustomerOperationsUpdateSample.ts][enterprisecustomeroperationsupdatesample] | updates an existing enterpriseCustomers x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts][enterprisemcccachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsDeleteSample.ts][enterprisemcccachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts][enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsGetSample.ts][enterprisemcccachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts][enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json | -| [enterpriseMccCacheNodesOperationsUpdateSample.ts][enterprisemcccachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json | -| [enterpriseMccCustomersCreateOrUpdateSample.ts][enterprisemcccustomerscreateorupdatesample] | this api creates an enterprise mcc customer with the specified create parameters x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json | -| [enterpriseMccCustomersDeleteSample.ts][enterprisemcccustomersdeletesample] | this api deletes an existing enterprise mcc customer resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json | -| [enterpriseMccCustomersGetSample.ts][enterprisemcccustomersgetsample] | gets the enterprise mcc customer resource information using this get call x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json | -| [enterpriseMccCustomersListByResourceGroupSample.ts][enterprisemcccustomerslistbyresourcegroupsample] | this api gets the information about all enterprise mcc customer resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json | -| [enterpriseMccCustomersListBySubscriptionSample.ts][enterprisemcccustomerslistbysubscriptionsample] | this api gets information about all enterpriseMccCustomer resources under the given subscription x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json | -| [enterpriseMccCustomersUpdateSample.ts][enterprisemcccustomersupdatesample] | this api updates an existing enterprise mcc customer resource x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json | -| [ispCacheNodesOperationsCreateOrUpdateSample.ts][ispcachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | -| [ispCacheNodesOperationsDeleteSample.ts][ispcachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetBgpCidrsSample.ts][ispcachenodesoperationsgetbgpcidrssample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts][ispcachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | -| [ispCacheNodesOperationsGetSample.ts][ispcachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json | -| [ispCacheNodesOperationsListByIspCustomerResourceSample.ts][ispcachenodesoperationslistbyispcustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json | -| [ispCacheNodesOperationsUpdateSample.ts][ispcachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json | -| [ispCustomersCreateOrUpdateSample.ts][ispcustomerscreateorupdatesample] | this api creates an ispCustomer with the specified create parameters x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json | -| [ispCustomersDeleteSample.ts][ispcustomersdeletesample] | this api deletes an existing ispCustomer resource x-ms-original-file: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json | -| [ispCustomersGetSample.ts][ispcustomersgetsample] | gets the ispCustomer resource information using this get call x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json | -| [ispCustomersListByResourceGroupSample.ts][ispcustomerslistbyresourcegroupsample] | this api gets the information about all ispCustomer resources under the given subscription and resource group x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json | -| [ispCustomersListBySubscriptionSample.ts][ispcustomerslistbysubscriptionsample] | this api gets information about all ispCustomer resources under the given subscription x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json | -| [ispCustomersUpdateSample.ts][ispcustomersupdatesample] | this api updates an existing ispCustomer resource x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts][enterprisemcccachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsDeleteSample.ts][enterprisemcccachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts][enterprisemcccachenodesoperationsgetcachenodeautoupdatehistorysample] | this api gets ispCacheNode resource auto update histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts][enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts][enterprisemcccachenodesoperationsgetcachenodemccissuedetailshistorysample] | this api gets ispCacheNode resource issues details histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts][enterprisemcccachenodesoperationsgetcachenodetlscertificatehistorysample] | this api gets ispCacheNode resource tls certificate histrory information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsGetSample.ts][enterprisemcccachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts][enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json | +| [enterpriseMccCacheNodesOperationsUpdateSample.ts][enterprisemcccachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json | +| [enterpriseMccCustomersCreateOrUpdateSample.ts][enterprisemcccustomerscreateorupdatesample] | this api creates an enterprise mcc customer with the specified create parameters x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json | +| [enterpriseMccCustomersDeleteSample.ts][enterprisemcccustomersdeletesample] | this api deletes an existing enterprise mcc customer resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json | +| [enterpriseMccCustomersGetSample.ts][enterprisemcccustomersgetsample] | gets the enterprise mcc customer resource information using this get call x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json | +| [enterpriseMccCustomersListByResourceGroupSample.ts][enterprisemcccustomerslistbyresourcegroupsample] | this api gets the information about all enterprise mcc customer resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json | +| [enterpriseMccCustomersListBySubscriptionSample.ts][enterprisemcccustomerslistbysubscriptionsample] | this api gets information about all enterpriseMccCustomer resources under the given subscription x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json | +| [enterpriseMccCustomersUpdateSample.ts][enterprisemcccustomersupdatesample] | this api updates an existing enterprise mcc customer resource x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json | +| [ispCacheNodesOperationsCreateOrUpdateSample.ts][ispcachenodesoperationscreateorupdatesample] | this api creates an ispCacheNode with the specified create parameters x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json | +| [ispCacheNodesOperationsDeleteSample.ts][ispcachenodesoperationsdeletesample] | this api deletes an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetBgpCidrsSample.ts][ispcachenodesoperationsgetbgpcidrssample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts][ispcachenodesoperationsgetcachenodeautoupdatehistorysample] | this api gets ispCacheNode resource auto update histrory information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts][ispcachenodesoperationsgetcachenodeinstalldetailssample] | this api gets secrets of the ispCacheNode resource install details x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts][ispcachenodesoperationsgetcachenodemccissuedetailshistorysample] | this api gets ispCacheNode resource issues details histrory information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json | +| [ispCacheNodesOperationsGetSample.ts][ispcachenodesoperationsgetsample] | this api gets ispCacheNode resource information x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json | +| [ispCacheNodesOperationsListByIspCustomerResourceSample.ts][ispcachenodesoperationslistbyispcustomerresourcesample] | this api retrieves information about all ispCacheNode resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json | +| [ispCacheNodesOperationsUpdateSample.ts][ispcachenodesoperationsupdatesample] | this api updates an existing ispCacheNode resource x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json | +| [ispCustomersCreateOrUpdateSample.ts][ispcustomerscreateorupdatesample] | this api creates an ispCustomer with the specified create parameters x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json | +| [ispCustomersDeleteSample.ts][ispcustomersdeletesample] | this api deletes an existing ispCustomer resource x-ms-original-file: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json | +| [ispCustomersGetSample.ts][ispcustomersgetsample] | gets the ispCustomer resource information using this get call x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json | +| [ispCustomersListByResourceGroupSample.ts][ispcustomerslistbyresourcegroupsample] | this api gets the information about all ispCustomer resources under the given subscription and resource group x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json | +| [ispCustomersListBySubscriptionSample.ts][ispcustomerslistbysubscriptionsample] | this api gets information about all ispCustomer resources under the given subscription x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json | +| [ispCustomersUpdateSample.ts][ispcustomersupdatesample] | this api updates an existing ispCustomer resource x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json | ## Prerequisites @@ -80,34 +73,25 @@ npm run build 4. Run whichever samples you like (note that some samples may require additional setup, see the table above): ```bash -node dist/cacheNodesOperationsCreateorUpdateSample.js +node dist/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.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): +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): ```bash -cross-env node dist/cacheNodesOperationsCreateorUpdateSample.js +node dist/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.js ``` ## Next Steps Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[cachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsCreateorUpdateSample.ts -[cachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsDeleteSample.ts -[cachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsGetSample.ts -[cachenodesoperationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListByResourceGroupSample.ts -[cachenodesoperationslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListBySubscriptionSample.ts -[cachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsUpdateSample.ts -[enterprisecustomeroperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsCreateOrUpdateSample.ts -[enterprisecustomeroperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsDeleteSample.ts -[enterprisecustomeroperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsGetSample.ts -[enterprisecustomeroperationslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListByResourceGroupSample.ts -[enterprisecustomeroperationslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListBySubscriptionSample.ts -[enterprisecustomeroperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsUpdateSample.ts [enterprisemcccachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts [enterprisemcccachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsDeleteSample.ts +[enterprisemcccachenodesoperationsgetcachenodeautoupdatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts [enterprisemcccachenodesoperationsgetcachenodeinstalldetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +[enterprisemcccachenodesoperationsgetcachenodemccissuedetailshistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts +[enterprisemcccachenodesoperationsgetcachenodetlscertificatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts [enterprisemcccachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetSample.ts [enterprisemcccachenodesoperationslistbyenterprisemcccustomerresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts [enterprisemcccachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsUpdateSample.ts @@ -120,7 +104,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [ispcachenodesoperationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsCreateOrUpdateSample.ts [ispcachenodesoperationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsDeleteSample.ts [ispcachenodesoperationsgetbgpcidrssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetBgpCidrsSample.ts +[ispcachenodesoperationsgetcachenodeautoupdatehistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts [ispcachenodesoperationsgetcachenodeinstalldetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +[ispcachenodesoperationsgetcachenodemccissuedetailshistorysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts [ispcachenodesoperationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetSample.ts [ispcachenodesoperationslistbyispcustomerresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsListByIspCustomerResourceSample.ts [ispcachenodesoperationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsUpdateSample.ts diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json index 182c518d3e3c..fc4d446891ad 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json @@ -32,11 +32,12 @@ "dependencies": { "@azure/arm-connectedcache": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.13.0" }, "devDependencies": { "@types/node": "^20.0.0", - "typescript": "~5.8.2", - "rimraf": "latest" + "cross-env": "latest", + "rimraf": "latest", + "typescript": "~5.9.3" } } diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsCreateorUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsCreateorUpdateSample.ts deleted file mode 100644 index 6023115861db..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsCreateorUpdateSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_CreateorUpdate_MaximumSet_Gen.json - */ -async function cacheNodesOperationsCreateorUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.createorUpdate( - "rgConnectedCache", - "lwrsyhvfpcfrwrim", - { - location: "westus", - properties: { - statusCode: "movtzupooyhdqk", - statusText: "bjnsrpzaofjntleoesjwammgbi", - statusDetails: "quuziibkwtgf", - error: {}, - }, - tags: { key8256: "oreqiywrjkmate" }, - }, - ); - console.log(result); -} - -async function main(): Promise { - cacheNodesOperationsCreateorUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsDeleteSample.ts deleted file mode 100644 index d83d465f516a..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsDeleteSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to deletes an existing cache Node - * - * @summary deletes an existing cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Delete_MaximumSet_Gen.json - */ -async function cacheNodesOperationsDelete(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.cacheNodesOperations.delete( - "rgConnectedCache", - "otvtvhmovthjwzjzbsqkbnmpcmmeianpqxmmaspvdczmrenquxigrtuarmlcmvsnaclhcbw", - ); -} - -async function main(): Promise { - cacheNodesOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsGetSample.ts deleted file mode 100644 index 510992111331..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of a cacheNodes - * - * @summary retrieves the properties of a cacheNodes - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Get_MaximumSet_Gen.json - */ -async function cacheNodesOperationsGet(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.get( - "rgConnectedCache", - "nqoxkgorhuzbhjwcegymzqbeydzjupemekt", - ); - console.log(result); -} - -async function main(): Promise { - cacheNodesOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListByResourceGroupSample.ts deleted file mode 100644 index 50b53142a895..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache - * - * @summary retrieves the properties of all ConnectedCache - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListByResourceGroup_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cacheNodesOperations.listByResourceGroup( - "rgConnectedCache", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - cacheNodesPrivatePreviewLegacyGetOperationListByResourceGroupGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListBySubscriptionSample.ts deleted file mode 100644 index bddd0e990484..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_ListBySubscription_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cacheNodesOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - cacheNodesPrivatePreviewLegacyResourceListBySubscriptionGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsUpdateSample.ts deleted file mode 100644 index 3b62e495fbd7..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/cacheNodesOperationsUpdateSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to updates an existing Cache Node - * - * @summary updates an existing Cache Node - * x-ms-original-file: 2023-05-01-preview/CacheNodesOperations_Update_MaximumSet_Gen.json - */ -async function cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.cacheNodesOperations.update( - "rgConnectedCache", - "wlrwpdbcv", - { tags: { key5032: "esiuyjbpcwkpqriqiqztxuocv" } }, - ); - console.log(result); -} - -async function main(): Promise { - cacheNodesPrivatePreviewLegacyUpdateOperationGeneratedByMaximumSetRule(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsCreateOrUpdateSample.ts deleted file mode 100644 index 3576d6487d40..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to creates a cacheNodes with the specified create parameters - * - * @summary creates a cacheNodes with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_CreateOrUpdate_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsCreateOrUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.createOrUpdate( - "rgConnectedCache", - "l", - { - properties: { - statusCode: "oldkroffqtkryqffpsi", - statusText: "bs", - statusDetails: "lhwvcz", - error: {}, - }, - tags: { key4215: "zjbszvlzf" }, - location: "zdzhhkjyogrqxwihkifnmeyhwpujbr", - }, - ); - console.log(result); -} - -async function main(): Promise { - enterpriseCustomerOperationsCreateOrUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsDeleteSample.ts deleted file mode 100644 index af9ac4760254..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsDeleteSample.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to deletes an existing customer Enterprise resource - * - * @summary deletes an existing customer Enterprise resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Delete_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsDelete(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - await client.enterpriseCustomerOperations.delete( - "rgConnectedCache", - "jeubxmhiaihcusgnahblvvckbdcetacvqgwbohlrqucodtlwuyefpejskvamgrdnwgucziodcfpjhqy", - ); -} - -async function main(): Promise { - enterpriseCustomerOperationsDelete(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsGetSample.ts deleted file mode 100644 index bbd93bb76544..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsGetSample.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of a Enterprise customer - * - * @summary retrieves the properties of a Enterprise customer - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Get_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsGet(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.get( - "rgConnectedCache", - "MCCTPTest2", - ); - console.log(result); -} - -async function main(): Promise { - enterpriseCustomerOperationsGet(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListByResourceGroupSample.ts deleted file mode 100644 index 26a64ce7533d..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCache enterpriseCustomers - * - * @summary retrieves the properties of all ConnectedCache enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListByResourceGroup_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsListByResourceGroup(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.enterpriseCustomerOperations.listByResourceGroup( - "rgConnectedCache", - )) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - enterpriseCustomerOperationsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListBySubscriptionSample.ts deleted file mode 100644 index c86c9c54d26c..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsListBySubscriptionSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to retrieves the properties of all ConnectedCaches - * - * @summary retrieves the properties of all ConnectedCaches - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_ListBySubscription_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsListBySubscription(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.enterpriseCustomerOperations.listBySubscription()) { - resArray.push(item); - } - - console.log(resArray); -} - -async function main(): Promise { - enterpriseCustomerOperationsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsUpdateSample.ts deleted file mode 100644 index ace2a4365529..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseCustomerOperationsUpdateSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to updates an existing enterpriseCustomers - * - * @summary updates an existing enterpriseCustomers - * x-ms-original-file: 2023-05-01-preview/EnterpriseCustomerOperations_Update_MaximumSet_Gen.json - */ -async function enterpriseCustomerOperationsUpdate(): Promise { - const credential = new DefaultAzureCredential(); - const subscriptionId = "12345678-1234-1234-1234-123456789098"; - const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseCustomerOperations.update( - "rgConnectedCache", - "MCCTPTest2", - { tags: { key1653: "nzjczrhclhkndesgy" } }, - ); - console.log(result); -} - -async function main(): Promise { - enterpriseCustomerOperationsUpdate(); -} - -main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts index 735253566bcb..a37430068b55 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -40,9 +40,7 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( statusText: "Success", statusDetails: "lgljxmyyoakw", additionalCacheNodeProperties: { - cacheNodePropertiesDetailsIssuesList: [ - "ennbzfpuszgalzpawmwicaofqcwcj", - ], + cacheNodePropertiesDetailsIssuesList: ["ennbzfpuszgalzpawmwicaofqcwcj"], driveConfiguration: [ { physicalPath: "pcbkezoofhamkycot", @@ -53,7 +51,6 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( ], bgpConfiguration: { asnToIpAddressMapping: "fjbggfvumrn" }, proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "ihkzxlzvpcywtzrogupqozkdud", optionalProperty1: "ph", optionalProperty2: "soqqgpgcbhb", optionalProperty3: "fpnycrbagptsujiotnjfuhlm", @@ -69,7 +66,7 @@ async function createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule( } async function main(): Promise { - createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(); + await createsAnEnterpriseMccCacheNodeResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsDeleteSample.ts index ce99b042c828..a82e0040e29a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Delete_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximu } async function main(): Promise { - enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(); + await enterpriseMccCacheNodesOperationsDeleteOperationGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts new file mode 100644 index 000000000000..5daafa6e2ceb --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts index e2a24e54992f..0c666defeae2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -8,23 +8,22 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ async function getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = - await client.enterpriseMccCacheNodesOperations.getCacheNodeInstallDetails( - "rgConnectedCache", - "fzwxcjmdpxxzayecabqqlh", - "ccexmqqttritxvtctivraso", - ); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeInstallDetails( + "rgConnectedCache", + "fzwxcjmdpxxzayecabqqlh", + "ccexmqqttritxvtctivraso", + ); console.log(result); } async function main(): Promise { - getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(); + await getsRequiredPropertiesForEnterpriseMccCacheNodeResourceInstallKeyDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts new file mode 100644 index 000000000000..7471630304bf --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts new file mode 100644 index 000000000000..50208ba04d77 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource tls certificate histrory information + * + * @summary this api gets ispCacheNode resource tls certificate histrory information + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_GetCacheNodeTlsCertificateHistory_MaximumSet_Gen.json + */ +async function enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.enterpriseMccCacheNodesOperations.getCacheNodeTlsCertificateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetSample.ts index 0d151102bdf1..e292b2831339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Get_MaximumSet_Gen.json */ async function getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCus } async function main(): Promise { - getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(); + await getsEnterpriseMccCacheNodeResourceInformationOfAnEnterpriseMccCustomerParentResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts index b9ed8c25ec10..9780aad2c7ff 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts @@ -8,14 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_ListByEnterpriseMccCustomerResource_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource( + for await (const item of client.enterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource( "rgConnectedCache", "syjjjzk", )) { @@ -26,7 +26,7 @@ async function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResou } async function main(): Promise { - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(); + await enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsUpdateSample.ts index d850f17c8d76..51862151564b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCacheNodesOperationsUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCacheNodesOperations_Update_MaximumSet_Gen.json */ async function enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -24,7 +24,7 @@ async function enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule( } async function main(): Promise { - enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(); + await enterpriseMccCacheNodesOperationsUpdateGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersCreateOrUpdateSample.ts index e6e645ea901c..c053a0620be2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api creates an enterprise mcc customer with the specified create parameters * * @summary this api creates an enterprise mcc customer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_CreateOrUpdate_MaximumSet_Gen.json */ async function enterpriseMccCustomersCreateOrUpdate(): Promise { const credential = new DefaultAzureCredential(); @@ -37,6 +37,7 @@ async function enterpriseMccCustomersCreateOrUpdate(): Promise { additionalCustomerProperties: { customerEmail: "zdjgibsidydyzm", customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", + customerTransitState: "voblixkxfejbmhxilb", customerAsn: "hgrelgnrtdkleisnepfolu", customerEntitlementSkuId: "b", customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", @@ -58,7 +59,7 @@ async function enterpriseMccCustomersCreateOrUpdate(): Promise { } async function main(): Promise { - enterpriseMccCustomersCreateOrUpdate(); + await enterpriseMccCustomersCreateOrUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersDeleteSample.ts index 7685f853c102..a279d567ca45 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api deletes an existing enterprise mcc customer resource * * @summary this api deletes an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Delete_MaximumSet_Gen.json */ async function enterpriseMccCustomersDelete(): Promise { const credential = new DefaultAzureCredential(); @@ -18,7 +18,7 @@ async function enterpriseMccCustomersDelete(): Promise { } async function main(): Promise { - enterpriseMccCustomersDelete(); + await enterpriseMccCustomersDelete(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersGetSample.ts index e6a3ec1116bd..22b9c75e3e14 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets the enterprise mcc customer resource information using this get call * * @summary gets the enterprise mcc customer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Get_MaximumSet_Gen.json */ async function enterpriseMccCustomersGet(): Promise { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function enterpriseMccCustomersGet(): Promise { } async function main(): Promise { - enterpriseMccCustomersGet(); + await enterpriseMccCustomersGet(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListByResourceGroupSample.ts index 0f332dd65aa6..89edb8855339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListByResourceGroupSample.ts @@ -8,16 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets the information about all enterprise mcc customer resources under the given subscription and resource group * * @summary this api gets the information about all enterprise mcc customer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListByResourceGroup_MaximumSet_Gen.json */ async function enterpriseMccCustomersListByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCustomers.listByResourceGroup( - "rgConnectedCache", - )) { + for await (const item of client.enterpriseMccCustomers.listByResourceGroup("rgConnectedCache")) { resArray.push(item); } @@ -25,7 +23,7 @@ async function enterpriseMccCustomersListByResourceGroup(): Promise { } async function main(): Promise { - enterpriseMccCustomersListByResourceGroup(); + await enterpriseMccCustomersListByResourceGroup(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListBySubscriptionSample.ts index 13d0e5a34123..36460eb3428e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersListBySubscriptionSample.ts @@ -8,14 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets information about all enterpriseMccCustomer resources under the given subscription * * @summary this api gets information about all enterpriseMccCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_ListBySubscription_MaximumSet_Gen.json */ async function enterpriseMccCustomersListBySubscription(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.enterpriseMccCustomers.listBySubscription()) { + for await (const item of client.enterpriseMccCustomers.listBySubscription()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function enterpriseMccCustomersListBySubscription(): Promise { } async function main(): Promise { - enterpriseMccCustomersListBySubscription(); + await enterpriseMccCustomersListBySubscription(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersUpdateSample.ts index 15074675b6bf..c90b375ae35f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/enterpriseMccCustomersUpdateSample.ts @@ -8,22 +8,20 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api updates an existing enterprise mcc customer resource * * @summary this api updates an existing enterprise mcc customer resource - * x-ms-original-file: 2023-05-01-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/EnterpriseMccCustomers_Update_MaximumSet_Gen.json */ async function enterpriseMccCustomersUpdate(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.enterpriseMccCustomers.update( - "rgConnectedCache", - "MccRPTest1", - { tags: { key1878: "warz" } }, - ); + const result = await client.enterpriseMccCustomers.update("rgConnectedCache", "MccRPTest1", { + tags: { key1878: "warz" }, + }); console.log(result); } async function main(): Promise { - enterpriseMccCustomersUpdate(); + await enterpriseMccCustomersUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsCreateOrUpdateSample.ts index a60696f6dcb6..52c2830a022a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api creates an ispCacheNode with the specified create parameters * * @summary this api creates an ispCacheNode with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_CreateOrUpdate_MaximumSet_Gen.json */ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { const credential = new DefaultAzureCredential(); @@ -38,17 +38,11 @@ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { }, additionalCacheNodeProperties: { driveConfiguration: [ - { - physicalPath: "/mcc", - sizeInGb: 500, - cacheNumber: 1, - nginxMapping: "lijygenjq", - }, + { physicalPath: "/mcc", sizeInGb: 500, cacheNumber: 1, nginxMapping: "lijygenjq" }, ], bgpConfiguration: { asnToIpAddressMapping: "pafcimhoog" }, cacheNodePropertiesDetailsIssuesList: ["ex"], proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "qhux", optionalProperty1: "hvpmt", optionalProperty2: "talanelmsgxvksrzoeeontqkjzbpv", optionalProperty3: "bxkoxq", @@ -67,7 +61,7 @@ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { } async function main(): Promise { - ispCacheNodesOperationsCreateOrUpdate(); + await ispCacheNodesOperationsCreateOrUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsDeleteSample.ts index 9d359ee4ec9b..3997fba0b6fc 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api deletes an existing ispCacheNode resource * * @summary this api deletes an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Delete_MaximumSet_Gen.json */ async function ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -22,7 +22,7 @@ async function ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(): Promise< } async function main(): Promise { - ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(); + await ispCacheNodesDeleteOperationGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetBgpCidrsSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetBgpCidrsSample.ts index 877ad54d83d8..c6d7f9598580 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetBgpCidrsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetBgpCidrsSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetBgpCidrs_MaximumSet_Gen.json */ async function ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(): } async function main(): Promise { - ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(); + await ispCacheNodesResourceBgpCidrsDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts new file mode 100644 index 000000000000..e5ed2f1bb152 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource auto update histrory information + * + * @summary this api gets ispCacheNode resource auto update histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeAutoUpdateHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeAutoUpdateHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts index 62539923bed8..b97777a1b132 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -8,23 +8,22 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets secrets of the ispCacheNode resource install details * * @summary this api gets secrets of the ispCacheNode resource install details - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeInstallDetails_MaximumSet_Gen.json */ async function ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = - await client.ispCacheNodesOperations.getCacheNodeInstallDetails( - "rgConnectedCache", - "MccRPTest1", - "MCCCachenode1", - ); + const result = await client.ispCacheNodesOperations.getCacheNodeInstallDetails( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); console.log(result); } async function main(): Promise { - ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(); + await ispCacheNodeResourceGetInstallDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts new file mode 100644 index 000000000000..04568b330ce1 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheClient } from "@azure/arm-connectedcache"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this api gets ispCacheNode resource issues details histrory information + * + * @summary this api gets ispCacheNode resource issues details histrory information + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_GetCacheNodeMccIssueDetailsHistory_MaximumSet_Gen.json + */ +async function ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "12345678-1234-1234-1234-123456789098"; + const client = new ConnectedCacheClient(credential, subscriptionId); + const result = await client.ispCacheNodesOperations.getCacheNodeMccIssueDetailsHistory( + "rgConnectedCache", + "MccRPTest1", + "MCCCachenode1", + ); + console.log(result); +} + +async function main(): Promise { + await ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryMaximumSet(); +} + +main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetSample.ts index b88b5c6e2074..c8b4a39c8a2e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets ispCacheNode resource information * * @summary this api gets ispCacheNode resource information - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Get_MaximumSet_Gen.json */ async function ispCacheNodesGetResourceGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -23,7 +23,7 @@ async function ispCacheNodesGetResourceGeneratedByMaximumSetRule(): Promise { - ispCacheNodesGetResourceGeneratedByMaximumSetRule(); + await ispCacheNodesGetResourceGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsListByIspCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsListByIspCustomerResourceSample.ts index b0cb3419fd91..8f44bf5e9b7b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsListByIspCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsListByIspCustomerResourceSample.ts @@ -8,14 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api retrieves information about all ispCacheNode resources under the given subscription and resource group * * @summary this api retrieves information about all ispCacheNode resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_ListByIspCustomerResource_MaximumSet_Gen.json */ async function ispCacheNodesOperationsListByIspCustomerResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCacheNodesOperations.listByIspCustomerResource( + for await (const item of client.ispCacheNodesOperations.listByIspCustomerResource( "rgConnectedCache", "MccRPTest1", )) { @@ -26,7 +26,7 @@ async function ispCacheNodesOperationsListByIspCustomerResource(): Promise } async function main(): Promise { - ispCacheNodesOperationsListByIspCustomerResource(); + await ispCacheNodesOperationsListByIspCustomerResource(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsUpdateSample.ts index 136030fa8079..44885b5c7b48 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCacheNodesOperationsUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api updates an existing ispCacheNode resource * * @summary this api updates an existing ispCacheNode resource - * x-ms-original-file: 2023-05-01-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCacheNodesOperations_Update_MaximumSet_Gen.json */ async function ispCacheNodesOperationsUpdate(): Promise { const credential = new DefaultAzureCredential(); @@ -24,7 +24,7 @@ async function ispCacheNodesOperationsUpdate(): Promise { } async function main(): Promise { - ispCacheNodesOperationsUpdate(); + await ispCacheNodesOperationsUpdate(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersCreateOrUpdateSample.ts index a6905d8855a6..984d4867b254 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersCreateOrUpdateSample.ts @@ -8,57 +8,54 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api creates an ispCustomer with the specified create parameters * * @summary this api creates an ispCustomer with the specified create parameters - * x-ms-original-file: 2023-05-01-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_CreateOrUpdate_MaximumSet_Gen.json */ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.ispCustomers.createOrUpdate( - "rgConnectedCache", - "MccRPTest2", - { - location: "westus", - properties: { - customer: { - fullyQualifiedResourceId: "uqsbtgae", - customerName: "mkpzynfqihnjfdbaqbqwyhd", - contactEmail: "xquos", - contactPhone: "vue", - contactName: "wxyqjoyoscmvimgwhpitxky", - isEntitled: true, - releaseVersion: 20, - clientTenantId: "fproidkpgvpdnac", - isEnterpriseManaged: true, - shouldMigrate: true, - resendSignupCode: true, - verifySignupCode: true, - verifySignupPhrase: "tprjvttkgmrqlsyicnidhm", - }, - additionalCustomerProperties: { - customerEmail: "zdjgibsidydyzm", - customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", - customerAsn: "hgrelgnrtdkleisnepfolu", - customerEntitlementSkuId: "b", - customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", - customerEntitlementSkuName: "waaqfijr", - customerEntitlementExpiration: new Date("2024-01-30T00:54:04.773Z"), - optionalProperty1: "qhmwxza", - optionalProperty2: "l", - optionalProperty3: "mblwwvbie", - optionalProperty4: "vzuek", - optionalProperty5: "fzjodscdfcdr", - }, - error: {}, + const result = await client.ispCustomers.createOrUpdate("rgConnectedCache", "MccRPTest2", { + location: "westus", + properties: { + customer: { + fullyQualifiedResourceId: "uqsbtgae", + customerName: "mkpzynfqihnjfdbaqbqwyhd", + contactEmail: "xquos", + contactPhone: "vue", + contactName: "wxyqjoyoscmvimgwhpitxky", + isEntitled: true, + releaseVersion: 20, + clientTenantId: "fproidkpgvpdnac", + isEnterpriseManaged: true, + shouldMigrate: true, + resendSignupCode: true, + verifySignupCode: true, + verifySignupPhrase: "tprjvttkgmrqlsyicnidhm", }, - tags: { key1878: "warz" }, + additionalCustomerProperties: { + customerEmail: "zdjgibsidydyzm", + customerTransitAsn: "habgklnxqzmozqpazoyejwiphezpi", + customerTransitState: "voblixkxfejbmhxilb", + customerAsn: "hgrelgnrtdkleisnepfolu", + customerEntitlementSkuId: "b", + customerEntitlementSkuGuid: "rvzmdpxyflgqetvpwupnfaxsweiiz", + customerEntitlementSkuName: "waaqfijr", + customerEntitlementExpiration: new Date("2024-01-30T00:54:04.773Z"), + optionalProperty1: "qhmwxza", + optionalProperty2: "l", + optionalProperty3: "mblwwvbie", + optionalProperty4: "vzuek", + optionalProperty5: "fzjodscdfcdr", + }, + error: {}, }, - ); + tags: { key1878: "warz" }, + }); console.log(result); } async function main(): Promise { - ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(); + await ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersDeleteSample.ts index d430503afd05..8c5704e00bf6 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api deletes an existing ispCustomer resource * * @summary this api deletes an existing ispCustomer resource - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Delete_MaximumSet_Gen.json */ async function ispCustomersDeleteGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); @@ -21,7 +21,7 @@ async function ispCustomersDeleteGeneratedByMaximumSetRule(): Promise { } async function main(): Promise { - ispCustomersDeleteGeneratedByMaximumSetRule(); + await ispCustomersDeleteGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersGetSample.ts index 16dad44dbf70..d4c6e7160d9f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersGetSample.ts @@ -8,21 +8,18 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets the ispCustomer resource information using this get call * * @summary gets the ispCustomer resource information using this get call - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Get_MaximumSet_Gen.json */ async function ispCustomersGetGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.ispCustomers.get( - "rgConnectedCache", - "cmcjfueweicolcjkwmsuvcj", - ); + const result = await client.ispCustomers.get("rgConnectedCache", "cmcjfueweicolcjkwmsuvcj"); console.log(result); } async function main(): Promise { - ispCustomersGetGeneratedByMaximumSetRule(); + await ispCustomersGetGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListByResourceGroupSample.ts index 8bf3bde613fe..bfa31b3f32bf 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListByResourceGroupSample.ts @@ -8,16 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets the information about all ispCustomer resources under the given subscription and resource group * * @summary this api gets the information about all ispCustomer resources under the given subscription and resource group - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListByResourceGroup_MaximumSet_Gen.json */ async function ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCustomers.listByResourceGroup( - "rgConnectedCache", - )) { + for await (const item of client.ispCustomers.listByResourceGroup("rgConnectedCache")) { resArray.push(item); } @@ -25,7 +23,7 @@ async function ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule( } async function main(): Promise { - ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(); + await ispCustomersResourceListByResourceGroupGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListBySubscriptionSample.ts index 5923d2136c7d..9b342c59e0af 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersListBySubscriptionSample.ts @@ -8,14 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api gets information about all ispCustomer resources under the given subscription * * @summary this api gets information about all ispCustomer resources under the given subscription - * x-ms-original-file: 2023-05-01-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_ListBySubscription_MaximumSet_Gen.json */ async function ispCustomerListBySubscriptionGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.ispCustomers.listBySubscription()) { + for await (const item of client.ispCustomers.listBySubscription()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function ispCustomerListBySubscriptionGeneratedByMaximumSetRule(): Promise } async function main(): Promise { - ispCustomerListBySubscriptionGeneratedByMaximumSetRule(); + await ispCustomerListBySubscriptionGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersUpdateSample.ts index a1f2f543524b..84b483d512e8 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/ispCustomersUpdateSample.ts @@ -8,22 +8,20 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to this api updates an existing ispCustomer resource * * @summary this api updates an existing ispCustomer resource - * x-ms-original-file: 2023-05-01-preview/IspCustomers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/IspCustomers_Update_MaximumSet_Gen.json */ async function ispCustomerUpdateDetailsGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "12345678-1234-1234-1234-123456789098"; const client = new ConnectedCacheClient(credential, subscriptionId); - const result = await client.ispCustomers.update( - "rgConnectedCache", - "MccRPTest2", - { tags: { key1653: "nzjczrhclhkndesgy" } }, - ); + const result = await client.ispCustomers.update("rgConnectedCache", "MccRPTest2", { + tags: { key1653: "nzjczrhclhkndesgy" }, + }); console.log(result); } async function main(): Promise { - ispCustomerUpdateDetailsGeneratedByMaximumSetRule(); + await ispCustomerUpdateDetailsGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/operationsListSample.ts index 5bc64a1a6daa..da038e6af138 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/src/operationsListSample.ts @@ -8,14 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2023-05-01-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2024-11-30-preview/Operations_List_MaximumSet_Gen.json */ async function listTheOperationsForTheProviderGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); - const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ConnectedCacheClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } @@ -23,7 +23,7 @@ async function listTheOperationsForTheProviderGeneratedByMaximumSetRule(): Promi } async function main(): Promise { - listTheOperationsForTheProviderGeneratedByMaximumSetRule(); + await listTheOperationsForTheProviderGeneratedByMaximumSetRule(); } main().catch(console.error); diff --git a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/tsconfig.json b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/tsconfig.json index 984eed535aa8..400db87cf648 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/tsconfig.json +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/tsconfig.json @@ -1,17 +1,20 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2023", "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + "lib": [], + "importHelpers": true, "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "moduleResolution": "node10", + "esModuleInterop": true, + "outDir": "./dist", + "resolveJsonModule": true }, "include": [ - "src/**/*.ts" + "./src" ] } diff --git a/sdk/connectedcache/arm-connectedcache/src/api/cacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/cacheNodesOperations/index.ts deleted file mode 100644 index 4453d0fff8a1..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/api/cacheNodesOperations/index.ts +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - CacheNodesOperationsCreateorUpdateOptionalParams, - CacheNodesOperationsDeleteOptionalParams, - CacheNodesOperationsGetOptionalParams, - CacheNodesOperationsListByResourceGroupOptionalParams, - CacheNodesOperationsListBySubscriptionOptionalParams, - CacheNodesOperationsUpdateOptionalParams, - ConnectedCacheContext as Client, -} from "../index.js"; -import { - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - CacheNodePreviewResource, - cacheNodePreviewResourceSerializer, - cacheNodePreviewResourceDeserializer, - _CacheNodePreviewResourceListResult, - _cacheNodePreviewResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _cacheNodesOperationsGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: CacheNodesOperationsGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _cacheNodesOperationsGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return cacheNodePreviewResourceDeserializer(result.body); -} - -/** Retrieves the properties of a cacheNodes */ -export async function cacheNodesOperationsGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: CacheNodesOperationsGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _cacheNodesOperationsGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _cacheNodesOperationsGetDeserialize(result); -} - -export function _cacheNodesOperationsCreateorUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: CacheNodePreviewResource, - options: CacheNodesOperationsCreateorUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: cacheNodePreviewResourceSerializer(resource), - }); -} - -export async function _cacheNodesOperationsCreateorUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return cacheNodePreviewResourceDeserializer(result.body); -} - -/** Creates a cacheNodes with the specified create parameters */ -export function cacheNodesOperationsCreateorUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: CacheNodePreviewResource, - options: CacheNodesOperationsCreateorUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, CacheNodePreviewResource> { - return getLongRunningPoller( - context, - _cacheNodesOperationsCreateorUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _cacheNodesOperationsCreateorUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, CacheNodePreviewResource>; -} - -export function _cacheNodesOperationsDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: CacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _cacheNodesOperationsDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "204"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Deletes an existing cache Node */ -export async function cacheNodesOperationsDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: CacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _cacheNodesOperationsDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _cacheNodesOperationsDeleteDeserialize(result); -} - -export function _cacheNodesOperationsUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: CacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _cacheNodesOperationsUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return cacheNodePreviewResourceDeserializer(result.body); -} - -/** updates an existing Cache Node */ -export async function cacheNodesOperationsUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: CacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _cacheNodesOperationsUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ); - return _cacheNodesOperationsUpdateDeserialize(result); -} - -export function _cacheNodesOperationsListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: CacheNodesOperationsListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes", - subscriptionId, - resourceGroupName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _cacheNodesOperationsListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_CacheNodePreviewResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _cacheNodePreviewResourceListResultDeserializer(result.body); -} - -/** Retrieves the properties of all ConnectedCache */ -export function cacheNodesOperationsListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: CacheNodesOperationsListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _cacheNodesOperationsListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - options, - ), - _cacheNodesOperationsListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _cacheNodesOperationsListBySubscriptionSend( - context: Client, - subscriptionId: string, - options: CacheNodesOperationsListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/cacheNodes", - subscriptionId, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _cacheNodesOperationsListBySubscriptionDeserialize( - result: PathUncheckedResponse, -): Promise<_CacheNodePreviewResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _cacheNodePreviewResourceListResultDeserializer(result.body); -} - -/** Retrieves the properties of all ConnectedCaches */ -export function cacheNodesOperationsListBySubscription( - context: Client, - subscriptionId: string, - options: CacheNodesOperationsListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _cacheNodesOperationsListBySubscriptionSend(context, subscriptionId, options), - _cacheNodesOperationsListBySubscriptionDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts b/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts index 3d6d62350f66..4a5c60c4eee6 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts @@ -3,27 +3,40 @@ 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"; +import type { AzureSupportedClouds } from "../static-helpers/cloudSettingHelpers.js"; +import { getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import type { Client, ClientOptions } from "@azure-rest/core-client"; +import { getClient } from "@azure-rest/core-client"; +import type { TokenCredential } from "@azure/core-auth"; /** Microsoft Connected Cache Rest Api version 2023-05-01-preview */ -export interface ConnectedCacheContext extends Client {} +export interface ConnectedCacheContext 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 ConnectedCacheClientOptionalParams extends ClientOptions { /** The API version to use for this operation. */ /** Known values of {@link KnownVersions} that the service accepts. */ apiVersion?: string; + /** Specifies the Azure cloud environment for the client. */ + cloudSetting?: AzureSupportedClouds; } /** Microsoft Connected Cache Rest Api version 2023-05-01-preview */ export function createConnectedCache( credential: TokenCredential, + subscriptionId: string, options: ConnectedCacheClientOptionalParams = {}, ): ConnectedCacheContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`; + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentInfo = `azsdk-js-arm-connectedcache/1.0.0-beta.1`; + const userAgentInfo = `azsdk-js-arm-connectedcache/1.0.0-beta.2`; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`; @@ -31,13 +44,11 @@ export function createConnectedCache( ...options, userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, - credentials: { - scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], - }, + credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] }, }; const clientContext = getClient(endpointUrl, credential, updatedOptions); clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2023-05-01-preview"; + const apiVersion = options.apiVersion ?? "2024-11-30-preview"; clientContext.pipeline.addPolicy({ name: "ClientApiVersionPolicy", sendRequest: (req, next) => { @@ -53,5 +64,5 @@ export function createConnectedCache( return next(req); }, }); - return clientContext; + return { ...clientContext, apiVersion, subscriptionId } as ConnectedCacheContext; } diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseCustomerOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseCustomerOperations/index.ts deleted file mode 100644 index 55b4206fe53f..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseCustomerOperations/index.ts +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { - ConnectedCacheContext as Client, - EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - EnterpriseCustomerOperationsDeleteOptionalParams, - EnterpriseCustomerOperationsGetOptionalParams, - EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - EnterpriseCustomerOperationsListBySubscriptionOptionalParams, - EnterpriseCustomerOperationsUpdateOptionalParams, -} from "../index.js"; -import { - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - EnterprisePreviewResource, - enterprisePreviewResourceSerializer, - enterprisePreviewResourceDeserializer, - _EnterprisePreviewResourceListResult, - _enterprisePreviewResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _enterpriseCustomerOperationsGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseCustomerOperationsGetOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseCustomerOperationsGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterprisePreviewResourceDeserializer(result.body); -} - -/** Retrieves the properties of a Enterprise customer */ -export async function enterpriseCustomerOperationsGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseCustomerOperationsGetOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseCustomerOperationsGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _enterpriseCustomerOperationsGetDeserialize(result); -} - -export function _enterpriseCustomerOperationsCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: EnterprisePreviewResource, - options: EnterpriseCustomerOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: enterprisePreviewResourceSerializer(resource), - }); -} - -export async function _enterpriseCustomerOperationsCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterprisePreviewResourceDeserializer(result.body); -} - -/** Creates a cacheNodes with the specified create parameters */ -export function enterpriseCustomerOperationsCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: EnterprisePreviewResource, - options: EnterpriseCustomerOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, EnterprisePreviewResource> { - return getLongRunningPoller( - context, - _enterpriseCustomerOperationsCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _enterpriseCustomerOperationsCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, EnterprisePreviewResource>; -} - -export function _enterpriseCustomerOperationsUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseCustomerOperationsUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _enterpriseCustomerOperationsUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterprisePreviewResourceDeserializer(result.body); -} - -/** updates an existing enterpriseCustomers */ -export async function enterpriseCustomerOperationsUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseCustomerOperationsUpdateOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseCustomerOperationsUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ); - return _enterpriseCustomerOperationsUpdateDeserialize(result); -} - -export function _enterpriseCustomerOperationsDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseCustomerOperationsDeleteOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseCustomerOperationsDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "204"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** Deletes an existing customer Enterprise resource */ -export async function enterpriseCustomerOperationsDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseCustomerOperationsDeleteOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseCustomerOperationsDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _enterpriseCustomerOperationsDeleteDeserialize(result); -} - -export function _enterpriseCustomerOperationsListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: EnterpriseCustomerOperationsListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers", - subscriptionId, - resourceGroupName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseCustomerOperationsListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_EnterprisePreviewResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _enterprisePreviewResourceListResultDeserializer(result.body); -} - -/** Retrieves the properties of all ConnectedCache enterpriseCustomers */ -export function enterpriseCustomerOperationsListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: EnterpriseCustomerOperationsListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _enterpriseCustomerOperationsListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - options, - ), - _enterpriseCustomerOperationsListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _enterpriseCustomerOperationsListBySubscriptionSend( - context: Client, - subscriptionId: string, - options: EnterpriseCustomerOperationsListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseCustomers", - subscriptionId, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseCustomerOperationsListBySubscriptionDeserialize( - result: PathUncheckedResponse, -): Promise<_EnterprisePreviewResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _enterprisePreviewResourceListResultDeserializer(result.body); -} - -/** Retrieves the properties of all ConnectedCaches */ -export function enterpriseCustomerOperationsListBySubscription( - context: Client, - subscriptionId: string, - options: EnterpriseCustomerOperationsListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _enterpriseCustomerOperationsListBySubscriptionSend(context, subscriptionId, options), - _enterpriseCustomerOperationsListBySubscriptionDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/index.ts index 578a622ca5e5..4128c1900110 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/index.ts @@ -1,393 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - ConnectedCacheContext as Client, - EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsDeleteOptionalParams, +export { + getCacheNodeTlsCertificateHistory, + getCacheNodeMccIssueDetailsHistory, + getCacheNodeAutoUpdateHistory, + getCacheNodeInstallDetails, + listByEnterpriseMccCustomerResource, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export { + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - EnterpriseMccCacheNodesOperationsGetOptionalParams, EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, EnterpriseMccCacheNodesOperationsUpdateOptionalParams, -} from "../index.js"; -import { - EnterpriseMccCacheNodeResource, - enterpriseMccCacheNodeResourceSerializer, - enterpriseMccCacheNodeResourceDeserializer, - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - _EnterpriseMccCacheNodeResourceListResult, - _enterpriseMccCacheNodeResourceListResultDeserializer, - MccCacheNodeInstallDetails, - mccCacheNodeInstallDetailsDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _enterpriseMccCacheNodesOperationsGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsGetOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCacheNodesOperationsGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCacheNodeResourceDeserializer(result.body); -} - -/** This api gets ispCacheNode resource information */ -export async function enterpriseMccCacheNodesOperationsGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsGetOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseMccCacheNodesOperationsGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ); - return _enterpriseMccCacheNodesOperationsGetDeserialize(result); -} - -export function _enterpriseMccCacheNodesOperationsCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - resource: EnterpriseMccCacheNodeResource, - options: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: enterpriseMccCacheNodeResourceSerializer(resource), - }); -} - -export async function _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCacheNodeResourceDeserializer(result.body); -} - -/** This api creates an ispCacheNode with the specified create parameters */ -export function enterpriseMccCacheNodesOperationsCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - resource: EnterpriseMccCacheNodeResource, - options: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, EnterpriseMccCacheNodeResource> { - return getLongRunningPoller( - context, - _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _enterpriseMccCacheNodesOperationsCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, EnterpriseMccCacheNodeResource>; -} - -export function _enterpriseMccCacheNodesOperationsUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseMccCacheNodesOperationsUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _enterpriseMccCacheNodesOperationsUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCacheNodeResourceDeserializer(result.body); -} - -/** This api updates an existing ispCacheNode resource */ -export async function enterpriseMccCacheNodesOperationsUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseMccCacheNodesOperationsUpdateOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseMccCacheNodesOperationsUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - properties, - options, - ); - return _enterpriseMccCacheNodesOperationsUpdateDeserialize(result); -} - -export function _enterpriseMccCacheNodesOperationsDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsDeleteOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCacheNodesOperationsDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** This api deletes an existing ispCacheNode resource */ -export function enterpriseMccCacheNodesOperationsDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsDeleteOptionalParams = { - requestOptions: {}, - }, -): PollerLike, void> { - return getLongRunningPoller( - context, - _enterpriseMccCacheNodesOperationsDeleteDeserialize, - ["202", "204", "200"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _enterpriseMccCacheNodesOperationsDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ), - resourceLocationConfig: "location", - }, - ) as PollerLike, void>; -} - -export function _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceDeserialize( - result: PathUncheckedResponse, -): Promise<_EnterpriseMccCacheNodeResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _enterpriseMccCacheNodeResourceListResultDeserializer(result.body); -} - -/** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ -export function enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .post({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return mccCacheNodeInstallDetailsDeserializer(result.body); -} - -/** This api gets secrets of the ispCacheNode resource install details */ -export async function enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ); - return _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize(result); -} + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/operations.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/operations.ts new file mode 100644 index 000000000000..ebdfde173140 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/operations.ts @@ -0,0 +1,597 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ConnectedCacheContext as Client } from "../index.js"; +import type { + ConnectedCachePatchResource, + MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, + EnterpriseMccCacheNodeResource, + _EnterpriseMccCacheNodeResourceListResult, + MccCacheNodeTlsCertificateHistory, +} from "../../models/models.js"; +import { + errorResponseDeserializer, + connectedCachePatchResourceSerializer, + mccCacheNodeInstallDetailsDeserializer, + mccCacheNodeAutoUpdateHistoryDeserializer, + mccCacheNodeIssueHistoryDeserializer, + enterpriseMccCacheNodeResourceSerializer, + enterpriseMccCacheNodeResourceDeserializer, + _enterpriseMccCacheNodeResourceListResultDeserializer, + mccCacheNodeTlsCertificateHistoryDeserializer, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getCacheNodeTlsCertificateHistorySend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeTlsCertificateHistory{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeTlsCertificateHistoryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeTlsCertificateHistoryDeserializer(result.body); +} + +/** This api gets ispCacheNode resource tls certificate histrory information */ +export async function getCacheNodeTlsCertificateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeTlsCertificateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeTlsCertificateHistoryDeserialize(result); +} + +export function _getCacheNodeMccIssueDetailsHistorySend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeMccIssueDetailsHistoryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeIssueHistoryDeserializer(result.body); +} + +/** This api gets ispCacheNode resource issues details histrory information */ +export async function getCacheNodeMccIssueDetailsHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeMccIssueDetailsHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeMccIssueDetailsHistoryDeserialize(result); +} + +export function _getCacheNodeAutoUpdateHistorySend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeAutoUpdateHistoryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeAutoUpdateHistoryDeserializer(result.body); +} + +/** This api gets ispCacheNode resource auto update histrory information */ +export async function getCacheNodeAutoUpdateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeAutoUpdateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeAutoUpdateHistoryDeserialize(result); +} + +export function _getCacheNodeInstallDetailsSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeInstallDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeInstallDetailsDeserializer(result.body); +} + +/** This api gets secrets of the ispCacheNode resource install details */ +export async function getCacheNodeInstallDetails( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeInstallDetailsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeInstallDetailsDeserialize(result); +} + +export function _listByEnterpriseMccCustomerResourceSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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 _listByEnterpriseMccCustomerResourceDeserialize( + result: PathUncheckedResponse, +): Promise<_EnterpriseMccCacheNodeResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _enterpriseMccCacheNodeResourceListResultDeserializer(result.body); +} + +/** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ +export function listByEnterpriseMccCustomerResource( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByEnterpriseMccCustomerResourceSend( + context, + resourceGroupName, + customerResourceName, + options, + ), + _listByEnterpriseMccCustomerResourceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCacheNode resource */ +/** + * @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, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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: connectedCachePatchResourceSerializer(properties), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return enterpriseMccCacheNodeResourceDeserializer(result.body); +} + +/** This api updates an existing ispCacheNode resource */ +export async function update( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: EnterpriseMccCacheNodeResource, + options: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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: enterpriseMccCacheNodeResourceSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return enterpriseMccCacheNodeResourceDeserializer(result.body); +} + +/** This api creates an ispCacheNode with the specified create parameters */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: EnterpriseMccCacheNodeResource, + options: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, EnterpriseMccCacheNodeResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, EnterpriseMccCacheNodeResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 enterpriseMccCacheNodeResourceDeserializer(result.body); +} + +/** This api gets ispCacheNode resource information */ +export async function get( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/options.ts new file mode 100644 index 000000000000..58dff76ceda7 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface EnterpriseMccCacheNodesOperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/index.ts index 5e494147eaff..da0596ed51ce 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/index.ts @@ -1,348 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - ConnectedCacheContext as Client, - EnterpriseMccCustomersCreateOrUpdateOptionalParams, - EnterpriseMccCustomersDeleteOptionalParams, - EnterpriseMccCustomersGetOptionalParams, - EnterpriseMccCustomersListByResourceGroupOptionalParams, +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export { EnterpriseMccCustomersListBySubscriptionOptionalParams, + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, EnterpriseMccCustomersUpdateOptionalParams, -} from "../index.js"; -import { - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - EnterpriseMccCustomerResource, - enterpriseMccCustomerResourceSerializer, - enterpriseMccCustomerResourceDeserializer, - _EnterpriseMccCustomerResourceListResult, - _enterpriseMccCustomerResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _enterpriseMccCustomersGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCustomersGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCustomersGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCustomerResourceDeserializer(result.body); -} - -/** Gets the enterprise mcc customer resource information using this get call */ -export async function enterpriseMccCustomersGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCustomersGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _enterpriseMccCustomersGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _enterpriseMccCustomersGetDeserialize(result); -} - -export function _enterpriseMccCustomersCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: EnterpriseMccCustomerResource, - options: EnterpriseMccCustomersCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: enterpriseMccCustomerResourceSerializer(resource), - }); -} - -export async function _enterpriseMccCustomersCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCustomerResourceDeserializer(result.body); -} - -/** This api creates an enterprise mcc customer with the specified create parameters */ -export function enterpriseMccCustomersCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: EnterpriseMccCustomerResource, - options: EnterpriseMccCustomersCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, EnterpriseMccCustomerResource> { - return getLongRunningPoller( - context, - _enterpriseMccCustomersCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _enterpriseMccCustomersCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, EnterpriseMccCustomerResource>; -} - -export function _enterpriseMccCustomersUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseMccCustomersUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _enterpriseMccCustomersUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return enterpriseMccCustomerResourceDeserializer(result.body); -} - -/** This api updates an existing enterprise mcc customer resource */ -export async function enterpriseMccCustomersUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: EnterpriseMccCustomersUpdateOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _enterpriseMccCustomersUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ); - return _enterpriseMccCustomersUpdateDeserialize(result); -} - -export function _enterpriseMccCustomersDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCustomersDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCustomersDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** This api deletes an existing enterprise mcc customer resource */ -export function enterpriseMccCustomersDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: EnterpriseMccCustomersDeleteOptionalParams = { requestOptions: {} }, -): PollerLike, void> { - return getLongRunningPoller( - context, - _enterpriseMccCustomersDeleteDeserialize, - ["202", "204", "200"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _enterpriseMccCustomersDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - resourceLocationConfig: "location", - }, - ) as PollerLike, void>; -} - -export function _enterpriseMccCustomersListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: EnterpriseMccCustomersListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers", - subscriptionId, - resourceGroupName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCustomersListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_EnterpriseMccCustomerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _enterpriseMccCustomerResourceListResultDeserializer(result.body); -} - -/** This api gets the information about all enterprise mcc customer resources under the given subscription and resource group */ -export function enterpriseMccCustomersListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: EnterpriseMccCustomersListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _enterpriseMccCustomersListByResourceGroupSend( - context, - subscriptionId, - resourceGroupName, - options, - ), - _enterpriseMccCustomersListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _enterpriseMccCustomersListBySubscriptionSend( - context: Client, - subscriptionId: string, - options: EnterpriseMccCustomersListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers", - subscriptionId, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _enterpriseMccCustomersListBySubscriptionDeserialize( - result: PathUncheckedResponse, -): Promise<_EnterpriseMccCustomerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _enterpriseMccCustomerResourceListResultDeserializer(result.body); -} - -/** This api gets information about all enterpriseMccCustomer resources under the given subscription */ -export function enterpriseMccCustomersListBySubscription( - context: Client, - subscriptionId: string, - options: EnterpriseMccCustomersListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _enterpriseMccCustomersListBySubscriptionSend(context, subscriptionId, options), - _enterpriseMccCustomersListBySubscriptionDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/operations.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/operations.ts new file mode 100644 index 000000000000..97b4d786c674 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ConnectedCacheContext as Client } from "../index.js"; +import type { + ConnectedCachePatchResource, + EnterpriseMccCustomerResource, + _EnterpriseMccCustomerResourceListResult, +} from "../../models/models.js"; +import { + errorResponseDeserializer, + connectedCachePatchResourceSerializer, + enterpriseMccCustomerResourceSerializer, + enterpriseMccCustomerResourceDeserializer, + _enterpriseMccCustomerResourceListResultDeserializer, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { + EnterpriseMccCustomersListBySubscriptionOptionalParams, + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, + EnterpriseMccCustomersUpdateOptionalParams, + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: EnterpriseMccCustomersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers{?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 _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_EnterpriseMccCustomerResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _enterpriseMccCustomerResourceListResultDeserializer(result.body); +} + +/** This api gets information about all enterpriseMccCustomer resources under the given subscription */ +export function listBySubscription( + context: Client, + options: EnterpriseMccCustomersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: EnterpriseMccCustomersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers{?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 _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_EnterpriseMccCustomerResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _enterpriseMccCustomerResourceListResultDeserializer(result.body); +} + +/** This api gets the information about all enterprise mcc customer resources under the given subscription and resource group */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: EnterpriseMccCustomersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCustomersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing enterprise mcc customer resource */ +/** + * @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, + customerResourceName: string, + options: EnterpriseMccCustomersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, customerResourceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCustomersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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: connectedCachePatchResourceSerializer(properties), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return enterpriseMccCustomerResourceDeserializer(result.body); +} + +/** This api updates an existing enterprise mcc customer resource */ +export async function update( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCustomersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + customerResourceName, + properties, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + resource: EnterpriseMccCustomerResource, + options: EnterpriseMccCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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: enterpriseMccCustomerResourceSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return enterpriseMccCustomerResourceDeserializer(result.body); +} + +/** This api creates an enterprise mcc customer with the specified create parameters */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + resource: EnterpriseMccCustomerResource, + options: EnterpriseMccCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, EnterpriseMccCustomerResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, customerResourceName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, EnterpriseMccCustomerResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCustomersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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 enterpriseMccCustomerResourceDeserializer(result.body); +} + +/** Gets the enterprise mcc customer resource information using this get call */ +export async function get( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCustomersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, customerResourceName, options); + return _getDeserialize(result); +} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/options.ts new file mode 100644 index 000000000000..10e8635359bd --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface EnterpriseMccCustomersListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCustomersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCustomersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface EnterpriseMccCustomersUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EnterpriseMccCustomersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface EnterpriseMccCustomersGetOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/index.ts index 7d8d4b81309c..154670458733 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/index.ts @@ -6,93 +6,3 @@ export { ConnectedCacheContext, ConnectedCacheClientOptionalParams, } from "./connectedCacheContext.js"; -export { - OperationsListOptionalParams, - EnterpriseCustomerOperationsGetOptionalParams, - EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - EnterpriseCustomerOperationsUpdateOptionalParams, - EnterpriseCustomerOperationsDeleteOptionalParams, - EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - EnterpriseCustomerOperationsListBySubscriptionOptionalParams, - CacheNodesOperationsGetOptionalParams, - CacheNodesOperationsCreateorUpdateOptionalParams, - CacheNodesOperationsDeleteOptionalParams, - CacheNodesOperationsUpdateOptionalParams, - CacheNodesOperationsListByResourceGroupOptionalParams, - CacheNodesOperationsListBySubscriptionOptionalParams, - IspCustomersGetOptionalParams, - IspCustomersCreateOrUpdateOptionalParams, - IspCustomersUpdateOptionalParams, - IspCustomersDeleteOptionalParams, - IspCustomersListByResourceGroupOptionalParams, - IspCustomersListBySubscriptionOptionalParams, - IspCacheNodesOperationsGetOptionalParams, - IspCacheNodesOperationsCreateOrUpdateOptionalParams, - IspCacheNodesOperationsUpdateOptionalParams, - IspCacheNodesOperationsDeleteOptionalParams, - IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, - IspCacheNodesOperationsGetBgpCidrsOptionalParams, - IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - EnterpriseMccCustomersGetOptionalParams, - EnterpriseMccCustomersCreateOrUpdateOptionalParams, - EnterpriseMccCustomersUpdateOptionalParams, - EnterpriseMccCustomersDeleteOptionalParams, - EnterpriseMccCustomersListByResourceGroupOptionalParams, - EnterpriseMccCustomersListBySubscriptionOptionalParams, - EnterpriseMccCacheNodesOperationsGetOptionalParams, - EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsDeleteOptionalParams, - EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, - EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "./options.js"; -export { - cacheNodesOperationsGet, - cacheNodesOperationsCreateorUpdate, - cacheNodesOperationsDelete, - cacheNodesOperationsUpdate, - cacheNodesOperationsListByResourceGroup, - cacheNodesOperationsListBySubscription, -} from "./cacheNodesOperations/index.js"; -export { - enterpriseCustomerOperationsGet, - enterpriseCustomerOperationsCreateOrUpdate, - enterpriseCustomerOperationsUpdate, - enterpriseCustomerOperationsDelete, - enterpriseCustomerOperationsListByResourceGroup, - enterpriseCustomerOperationsListBySubscription, -} from "./enterpriseCustomerOperations/index.js"; -export { - enterpriseMccCacheNodesOperationsGet, - enterpriseMccCacheNodesOperationsCreateOrUpdate, - enterpriseMccCacheNodesOperationsUpdate, - enterpriseMccCacheNodesOperationsDelete, - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource, - enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails, -} from "./enterpriseMccCacheNodesOperations/index.js"; -export { - enterpriseMccCustomersGet, - enterpriseMccCustomersCreateOrUpdate, - enterpriseMccCustomersUpdate, - enterpriseMccCustomersDelete, - enterpriseMccCustomersListByResourceGroup, - enterpriseMccCustomersListBySubscription, -} from "./enterpriseMccCustomers/index.js"; -export { - ispCacheNodesOperationsGet, - ispCacheNodesOperationsCreateOrUpdate, - ispCacheNodesOperationsUpdate, - ispCacheNodesOperationsDelete, - ispCacheNodesOperationsListByIspCustomerResource, - ispCacheNodesOperationsGetBgpCidrs, - ispCacheNodesOperationsGetCacheNodeInstallDetails, -} from "./ispCacheNodesOperations/index.js"; -export { - ispCustomersGet, - ispCustomersCreateOrUpdate, - ispCustomersUpdate, - ispCustomersDelete, - ispCustomersListByResourceGroup, - ispCustomersListBySubscription, -} from "./ispCustomers/index.js"; -export { operationsList } from "./operations/index.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/index.ts index 743f9586907b..8fe849d85b5f 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/index.ts @@ -1,438 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - ConnectedCacheContext as Client, - IspCacheNodesOperationsCreateOrUpdateOptionalParams, - IspCacheNodesOperationsDeleteOptionalParams, - IspCacheNodesOperationsGetBgpCidrsOptionalParams, +export { + getCacheNodeMccIssueDetailsHistory, + getCacheNodeAutoUpdateHistory, + getCacheNodeInstallDetails, + getBgpCidrs, + listByIspCustomerResource, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - IspCacheNodesOperationsGetOptionalParams, + IspCacheNodesOperationsGetBgpCidrsOptionalParams, IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, IspCacheNodesOperationsUpdateOptionalParams, -} from "../index.js"; -import { - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - MccCacheNodeInstallDetails, - mccCacheNodeInstallDetailsDeserializer, - IspCacheNodeResource, - ispCacheNodeResourceSerializer, - ispCacheNodeResourceDeserializer, - _IspCacheNodeResourceListResult, - _ispCacheNodeResourceListResultDeserializer, - MccCacheNodeBgpCidrDetails, - mccCacheNodeBgpCidrDetailsDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _ispCacheNodesOperationsGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCacheNodesOperationsGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCacheNodeResourceDeserializer(result.body); -} - -/** This api gets ispCacheNode resource information */ -export async function ispCacheNodesOperationsGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _ispCacheNodesOperationsGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ); - return _ispCacheNodesOperationsGetDeserialize(result); -} - -export function _ispCacheNodesOperationsCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - resource: IspCacheNodeResource, - options: IspCacheNodesOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: ispCacheNodeResourceSerializer(resource), - }); -} - -export async function _ispCacheNodesOperationsCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCacheNodeResourceDeserializer(result.body); -} - -/** This api creates an ispCacheNode with the specified create parameters */ -export function ispCacheNodesOperationsCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - resource: IspCacheNodeResource, - options: IspCacheNodesOperationsCreateOrUpdateOptionalParams = { - requestOptions: {}, - }, -): PollerLike, IspCacheNodeResource> { - return getLongRunningPoller( - context, - _ispCacheNodesOperationsCreateOrUpdateDeserialize, - ["200", "201"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _ispCacheNodesOperationsCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }, - ) as PollerLike, IspCacheNodeResource>; -} - -export function _ispCacheNodesOperationsUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options: IspCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _ispCacheNodesOperationsUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCacheNodeResourceDeserializer(result.body); -} - -/** This api updates an existing ispCacheNode resource */ -export async function ispCacheNodesOperationsUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options: IspCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _ispCacheNodesOperationsUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - properties, - options, - ); - return _ispCacheNodesOperationsUpdateDeserialize(result); -} - -export function _ispCacheNodesOperationsDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCacheNodesOperationsDeleteDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** This api deletes an existing ispCacheNode resource */ -export function ispCacheNodesOperationsDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, -): PollerLike, void> { - return getLongRunningPoller( - context, - _ispCacheNodesOperationsDeleteDeserialize, - ["202", "204", "200"], - { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _ispCacheNodesOperationsDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ), - resourceLocationConfig: "location", - }, - ) as PollerLike, void>; -} - -export function _ispCacheNodesOperationsListByIspCustomerResourceSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCacheNodesOperationsListByIspCustomerResourceDeserialize( - result: PathUncheckedResponse, -): Promise<_IspCacheNodeResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _ispCacheNodeResourceListResultDeserializer(result.body); -} - -/** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ -export function ispCacheNodesOperationsListByIspCustomerResource( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => - _ispCacheNodesOperationsListByIspCustomerResourceSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - _ispCacheNodesOperationsListByIspCustomerResourceDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _ispCacheNodesOperationsGetBgpCidrsSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetBgpCidrsOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .post({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCacheNodesOperationsGetBgpCidrsDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return mccCacheNodeBgpCidrDetailsDeserializer(result.body); -} - -/** This api gets ispCacheNode resource information */ -export async function ispCacheNodesOperationsGetBgpCidrs( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetBgpCidrsOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _ispCacheNodesOperationsGetBgpCidrsSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ); - return _ispCacheNodesOperationsGetBgpCidrsDeserialize(result); -} - -export function _ispCacheNodesOperationsGetCacheNodeInstallDetailsSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails", - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - ) - .post({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return mccCacheNodeInstallDetailsDeserializer(result.body); -} - -/** This api gets secrets of the ispCacheNode resource install details */ -export async function ispCacheNodesOperationsGetCacheNodeInstallDetails( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - cacheNodeResourceName: string, - options: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { - requestOptions: {}, - }, -): Promise { - const result = await _ispCacheNodesOperationsGetCacheNodeInstallDetailsSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ); - return _ispCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize(result); -} + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/operations.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/operations.ts new file mode 100644 index 000000000000..50d625928ea5 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/operations.ts @@ -0,0 +1,579 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ConnectedCacheContext as Client } from "../index.js"; +import type { + ConnectedCachePatchResource, + IspCacheNodeResource, + _IspCacheNodeResourceListResult, + MccCacheNodeBgpCidrDetails, + MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, +} from "../../models/models.js"; +import { + errorResponseDeserializer, + connectedCachePatchResourceSerializer, + ispCacheNodeResourceSerializer, + ispCacheNodeResourceDeserializer, + _ispCacheNodeResourceListResultDeserializer, + mccCacheNodeBgpCidrDetailsDeserializer, + mccCacheNodeInstallDetailsDeserializer, + mccCacheNodeAutoUpdateHistoryDeserializer, + mccCacheNodeIssueHistoryDeserializer, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + IspCacheNodesOperationsGetBgpCidrsOptionalParams, + IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, + IspCacheNodesOperationsUpdateOptionalParams, + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getCacheNodeMccIssueDetailsHistorySend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeMccIssueDetailsHistory{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeMccIssueDetailsHistoryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeIssueHistoryDeserializer(result.body); +} + +/** This api gets ispCacheNode resource issues details histrory information */ +export async function getCacheNodeMccIssueDetailsHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeMccIssueDetailsHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeMccIssueDetailsHistoryDeserialize(result); +} + +export function _getCacheNodeAutoUpdateHistorySend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeAutoUpdateHistory{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeAutoUpdateHistoryDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeAutoUpdateHistoryDeserializer(result.body); +} + +/** This api gets ispCacheNode resource auto update histrory information */ +export async function getCacheNodeAutoUpdateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getCacheNodeAutoUpdateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeAutoUpdateHistoryDeserialize(result); +} + +export function _getCacheNodeInstallDetailsSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getCacheNodeInstallDetailsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeInstallDetailsDeserializer(result.body); +} + +/** This api gets secrets of the ispCacheNode resource install details */ +export async function getCacheNodeInstallDetails( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getCacheNodeInstallDetailsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getCacheNodeInstallDetailsDeserialize(result); +} + +export function _getBgpCidrsSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetBgpCidrsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 _getBgpCidrsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return mccCacheNodeBgpCidrDetailsDeserializer(result.body); +} + +/** This api gets ispCacheNode resource information */ +export async function getBgpCidrs( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetBgpCidrsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getBgpCidrsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getBgpCidrsDeserialize(result); +} + +export function _listByIspCustomerResourceSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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 _listByIspCustomerResourceDeserialize( + result: PathUncheckedResponse, +): Promise<_IspCacheNodeResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _ispCacheNodeResourceListResultDeserializer(result.body); +} + +/** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ +export function listByIspCustomerResource( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByIspCustomerResourceSend(context, resourceGroupName, customerResourceName, options), + _listByIspCustomerResourceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCacheNode resource */ +/** + * @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, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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: connectedCachePatchResourceSerializer(properties), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return ispCacheNodeResourceDeserializer(result.body); +} + +/** This api updates an existing ispCacheNode resource */ +export async function update( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: IspCacheNodeResource, + options: IspCacheNodesOperationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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: ispCacheNodeResourceSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return ispCacheNodeResourceDeserializer(result.body); +} + +/** This api creates an ispCacheNode with the specified create parameters */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: IspCacheNodeResource, + options: IspCacheNodesOperationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IspCacheNodeResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, IspCacheNodeResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + cacheNodeResourceName: cacheNodeResourceName, + "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 ispCacheNodeResourceDeserializer(result.body); +} + +/** This api gets ispCacheNode resource information */ +export async function get( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/options.ts new file mode 100644 index 000000000000..b0298e8299dd --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsGetBgpCidrsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsListByIspCustomerResourceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IspCacheNodesOperationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/index.ts index d1d69d3c6a16..55aa809b558f 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/index.ts @@ -1,326 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - ConnectedCacheContext as Client, - IspCustomersCreateOrUpdateOptionalParams, - IspCustomersDeleteOptionalParams, - IspCustomersGetOptionalParams, - IspCustomersListByResourceGroupOptionalParams, +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export { IspCustomersListBySubscriptionOptionalParams, + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, IspCustomersUpdateOptionalParams, -} from "../index.js"; -import { - ConnectedCachePatchResource, - connectedCachePatchResourceSerializer, - IspCustomerResource, - ispCustomerResourceSerializer, - ispCustomerResourceDeserializer, - _IspCustomerResourceListResult, - _ispCustomerResourceListResultDeserializer, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -export function _ispCustomersGetSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCustomersGetOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCustomersGetDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCustomerResourceDeserializer(result.body); -} - -/** Gets the ispCustomer resource information using this get call */ -export async function ispCustomersGet( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCustomersGetOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _ispCustomersGetSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ); - return _ispCustomersGetDeserialize(result); -} - -export function _ispCustomersCreateOrUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: IspCustomerResource, - options: IspCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .put({ - ...operationOptionsToRequestParameters(options), - body: ispCustomerResourceSerializer(resource), - }); -} - -export async function _ispCustomersCreateOrUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200", "201"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCustomerResourceDeserializer(result.body); -} - -/** This api creates an ispCustomer with the specified create parameters */ -export function ispCustomersCreateOrUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - resource: IspCustomerResource, - options: IspCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, -): PollerLike, IspCustomerResource> { - return getLongRunningPoller(context, _ispCustomersCreateOrUpdateDeserialize, ["200", "201"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _ispCustomersCreateOrUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - resourceLocationConfig: "azure-async-operation", - }) as PollerLike, IspCustomerResource>; -} - -export function _ispCustomersUpdateSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: IspCustomersUpdateOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .patch({ - ...operationOptionsToRequestParameters(options), - body: connectedCachePatchResourceSerializer(properties), - }); -} - -export async function _ispCustomersUpdateDeserialize( - result: PathUncheckedResponse, -): Promise { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return ispCustomerResourceDeserializer(result.body); -} - -/** This api updates an existing ispCustomer resource */ -export async function ispCustomersUpdate( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options: IspCustomersUpdateOptionalParams = { requestOptions: {} }, -): Promise { - const result = await _ispCustomersUpdateSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ); - return _ispCustomersUpdateDeserialize(result); -} - -export function _ispCustomersDeleteSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCustomersDeleteOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}", - subscriptionId, - resourceGroupName, - customerResourceName, - ) - .delete({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCustomersDeleteDeserialize(result: PathUncheckedResponse): Promise { - const expectedStatuses = ["202", "204", "200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return; -} - -/** This api deletes an existing ispCustomer resource */ -export function ispCustomersDelete( - context: Client, - subscriptionId: string, - resourceGroupName: string, - customerResourceName: string, - options: IspCustomersDeleteOptionalParams = { requestOptions: {} }, -): PollerLike, void> { - return getLongRunningPoller(context, _ispCustomersDeleteDeserialize, ["202", "204", "200"], { - updateIntervalInMs: options?.updateIntervalInMs, - abortSignal: options?.abortSignal, - getInitialResponse: () => - _ispCustomersDeleteSend( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - resourceLocationConfig: "location", - }) as PollerLike, void>; -} - -export function _ispCustomersListByResourceGroupSend( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: IspCustomersListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers", - subscriptionId, - resourceGroupName, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCustomersListByResourceGroupDeserialize( - result: PathUncheckedResponse, -): Promise<_IspCustomerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _ispCustomerResourceListResultDeserializer(result.body); -} - -/** This api gets the information about all ispCustomer resources under the given subscription and resource group */ -export function ispCustomersListByResourceGroup( - context: Client, - subscriptionId: string, - resourceGroupName: string, - options: IspCustomersListByResourceGroupOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _ispCustomersListByResourceGroupSend(context, subscriptionId, resourceGroupName, options), - _ispCustomersListByResourceGroupDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} - -export function _ispCustomersListBySubscriptionSend( - context: Client, - subscriptionId: string, - options: IspCustomersListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): StreamableMethod { - return context - .path( - "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/ispCustomers", - subscriptionId, - ) - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _ispCustomersListBySubscriptionDeserialize( - result: PathUncheckedResponse, -): Promise<_IspCustomerResourceListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _ispCustomerResourceListResultDeserializer(result.body); -} - -/** This api gets information about all ispCustomer resources under the given subscription */ -export function ispCustomersListBySubscription( - context: Client, - subscriptionId: string, - options: IspCustomersListBySubscriptionOptionalParams = { - requestOptions: {}, - }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _ispCustomersListBySubscriptionSend(context, subscriptionId, options), - _ispCustomersListBySubscriptionDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/operations.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/operations.ts new file mode 100644 index 000000000000..cd98a17deb3f --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/operations.ts @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ConnectedCacheContext as Client } from "../index.js"; +import type { + IspCustomerResource, + ConnectedCachePatchResource, + _IspCustomerResourceListResult, +} from "../../models/models.js"; +import { + errorResponseDeserializer, + ispCustomerResourceSerializer, + ispCustomerResourceDeserializer, + connectedCachePatchResourceSerializer, + _ispCustomerResourceListResultDeserializer, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { + IspCustomersListBySubscriptionOptionalParams, + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, + IspCustomersUpdateOptionalParams, + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: IspCustomersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedCache/ispCustomers{?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 _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_IspCustomerResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _ispCustomerResourceListResultDeserializer(result.body); +} + +/** This api gets information about all ispCustomer resources under the given subscription */ +export function listBySubscription( + context: Client, + options: IspCustomersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: IspCustomersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers{?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 _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_IspCustomerResourceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _ispCustomerResourceListResultDeserializer(result.body); +} + +/** This api gets the information about all ispCustomer resources under the given subscription and resource group */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: IspCustomersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCustomersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCustomer resource */ +/** + * @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, + customerResourceName: string, + options: IspCustomersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, customerResourceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCustomersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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: connectedCachePatchResourceSerializer(properties), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return ispCustomerResourceDeserializer(result.body); +} + +/** This api updates an existing ispCustomer resource */ +export async function update( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCustomersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + customerResourceName, + properties, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + resource: IspCustomerResource, + options: IspCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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: ispCustomerResourceSerializer(resource), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return ispCustomerResourceDeserializer(result.body); +} + +/** This api creates an ispCustomer with the specified create parameters */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + resource: IspCustomerResource, + options: IspCustomersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, IspCustomerResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, customerResourceName, resource, options), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, IspCustomerResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCustomersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + customerResourceName: customerResourceName, + "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 ispCustomerResourceDeserializer(result.body); +} + +/** Gets the ispCustomer resource information using this get call */ +export async function get( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCustomersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, customerResourceName, options); + return _getDeserialize(result); +} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/options.ts new file mode 100644 index 000000000000..2993e6280fc9 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IspCustomersListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCustomersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCustomersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IspCustomersUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IspCustomersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface IspCustomersGetOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/operations/index.ts b/sdk/connectedcache/arm-connectedcache/src/api/operations/index.ts index 5236d030b19a..24a804d14fcf 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/operations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/operations/index.ts @@ -1,53 +1,5 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext as Client, OperationsListOptionalParams } from "../index.js"; -import { - _OperationListResult, - _operationListResultDeserializer, - Operation, -} from "../../models/models.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; - -export function _operationsListSend( - context: Client, - options: OperationsListOptionalParams = { requestOptions: {} }, -): StreamableMethod { - return context - .path("/providers/Microsoft.ConnectedCache/operations") - .get({ ...operationOptionsToRequestParameters(options) }); -} - -export async function _operationsListDeserialize( - result: PathUncheckedResponse, -): Promise<_OperationListResult> { - const expectedStatuses = ["200"]; - if (!expectedStatuses.includes(result.status)) { - throw createRestError(result); - } - - return _operationListResultDeserializer(result.body); -} - -/** List the operations for the provider */ -export function operationsList( - context: Client, - options: OperationsListOptionalParams = { requestOptions: {} }, -): PagedAsyncIterableIterator { - return buildPagedAsyncIterator( - context, - () => _operationsListSend(context, options), - _operationsListDeserialize, - ["200"], - { itemName: "value", nextLinkName: "nextLink" }, - ); -} +export { list } from "./operations.js"; +export { OperationsListOptionalParams } from "./options.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/api/operations/operations.ts b/sdk/connectedcache/arm-connectedcache/src/api/operations/operations.ts new file mode 100644 index 000000000000..a4f20430be40 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/operations/operations.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { ConnectedCacheContext as Client } from "../index.js"; +import type { _OperationListResult, Operation } from "../../models/models.js"; +import { + _operationListResultDeserializer, + errorResponseDeserializer, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { OperationsListOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.ConnectedCache/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/connectedcache/arm-connectedcache/src/api/operations/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/operations/options.ts new file mode 100644 index 000000000000..b9a3fd9758a3 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/operations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/api/options.ts b/sdk/connectedcache/arm-connectedcache/src/api/options.ts deleted file mode 100644 index db5f4be07928..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/api/options.ts +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { OperationOptions } from "@azure-rest/core-client"; - -/** Optional parameters. */ -export interface OperationsListOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsDeleteOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseCustomerOperationsListBySubscriptionOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface CacheNodesOperationsGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface CacheNodesOperationsCreateorUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface CacheNodesOperationsDeleteOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface CacheNodesOperationsUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface CacheNodesOperationsListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface CacheNodesOperationsListBySubscriptionOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCustomersGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCustomersCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface IspCustomersUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCustomersDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface IspCustomersListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCustomersListBySubscriptionOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsListByIspCustomerResourceOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsGetBgpCidrsOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersListByResourceGroupOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCustomersListBySubscriptionOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsGetOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsUpdateOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; -} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams extends OperationOptions {} - -/** Optional parameters. */ -export interface EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams extends OperationOptions {} diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/cacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/cacheNodesOperations/index.ts deleted file mode 100644 index c67f07f6161c..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/classic/cacheNodesOperations/index.ts +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; -import { - cacheNodesOperationsGet, - cacheNodesOperationsCreateorUpdate, - cacheNodesOperationsDelete, - cacheNodesOperationsUpdate, - cacheNodesOperationsListByResourceGroup, - cacheNodesOperationsListBySubscription, -} from "../../api/cacheNodesOperations/index.js"; -import { ConnectedCachePatchResource, CacheNodePreviewResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; -import { - CacheNodesOperationsGetOptionalParams, - CacheNodesOperationsCreateorUpdateOptionalParams, - CacheNodesOperationsDeleteOptionalParams, - CacheNodesOperationsUpdateOptionalParams, - CacheNodesOperationsListByResourceGroupOptionalParams, - CacheNodesOperationsListBySubscriptionOptionalParams, -} from "../../api/options.js"; - -/** Interface representing a CacheNodesOperations operations. */ -export interface CacheNodesOperationsOperations { - /** Retrieves the properties of a cacheNodes */ - get: ( - resourceGroupName: string, - customerResourceName: string, - options?: CacheNodesOperationsGetOptionalParams, - ) => Promise; - /** Creates a cacheNodes with the specified create parameters */ - createorUpdate: ( - resourceGroupName: string, - customerResourceName: string, - resource: CacheNodePreviewResource, - options?: CacheNodesOperationsCreateorUpdateOptionalParams, - ) => PollerLike, CacheNodePreviewResource>; - /** Deletes an existing cache Node */ - delete: ( - resourceGroupName: string, - customerResourceName: string, - options?: CacheNodesOperationsDeleteOptionalParams, - ) => Promise; - /** updates an existing Cache Node */ - update: ( - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options?: CacheNodesOperationsUpdateOptionalParams, - ) => Promise; - /** Retrieves the properties of all ConnectedCache */ - listByResourceGroup: ( - resourceGroupName: string, - options?: CacheNodesOperationsListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; - /** Retrieves the properties of all ConnectedCaches */ - listBySubscription: ( - options?: CacheNodesOperationsListBySubscriptionOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getCacheNodesOperations(context: ConnectedCacheContext, subscriptionId: string) { - return { - get: ( - resourceGroupName: string, - customerResourceName: string, - options?: CacheNodesOperationsGetOptionalParams, - ) => - cacheNodesOperationsGet( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - createorUpdate: ( - resourceGroupName: string, - customerResourceName: string, - resource: CacheNodePreviewResource, - options?: CacheNodesOperationsCreateorUpdateOptionalParams, - ) => - cacheNodesOperationsCreateorUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - delete: ( - resourceGroupName: string, - customerResourceName: string, - options?: CacheNodesOperationsDeleteOptionalParams, - ) => - cacheNodesOperationsDelete( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - update: ( - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options?: CacheNodesOperationsUpdateOptionalParams, - ) => - cacheNodesOperationsUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - options?: CacheNodesOperationsListByResourceGroupOptionalParams, - ) => - cacheNodesOperationsListByResourceGroup(context, subscriptionId, resourceGroupName, options), - listBySubscription: (options?: CacheNodesOperationsListBySubscriptionOptionalParams) => - cacheNodesOperationsListBySubscription(context, subscriptionId, options), - }; -} - -export function getCacheNodesOperationsOperations( - context: ConnectedCacheContext, - subscriptionId: string, -): CacheNodesOperationsOperations { - return { - ...getCacheNodesOperations(context, subscriptionId), - }; -} diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseCustomerOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseCustomerOperations/index.ts deleted file mode 100644 index 66d6c8928917..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseCustomerOperations/index.ts +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; -import { - enterpriseCustomerOperationsGet, - enterpriseCustomerOperationsCreateOrUpdate, - enterpriseCustomerOperationsUpdate, - enterpriseCustomerOperationsDelete, - enterpriseCustomerOperationsListByResourceGroup, - enterpriseCustomerOperationsListBySubscription, -} from "../../api/enterpriseCustomerOperations/index.js"; -import { - EnterpriseCustomerOperationsGetOptionalParams, - EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - EnterpriseCustomerOperationsUpdateOptionalParams, - EnterpriseCustomerOperationsDeleteOptionalParams, - EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - EnterpriseCustomerOperationsListBySubscriptionOptionalParams, -} from "../../api/options.js"; -import { ConnectedCachePatchResource, EnterprisePreviewResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; - -/** Interface representing a EnterpriseCustomerOperations operations. */ -export interface EnterpriseCustomerOperationsOperations { - /** Retrieves the properties of a Enterprise customer */ - get: ( - resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseCustomerOperationsGetOptionalParams, - ) => Promise; - /** Creates a cacheNodes with the specified create parameters */ - createOrUpdate: ( - resourceGroupName: string, - customerResourceName: string, - resource: EnterprisePreviewResource, - options?: EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - ) => PollerLike, EnterprisePreviewResource>; - /** updates an existing enterpriseCustomers */ - update: ( - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options?: EnterpriseCustomerOperationsUpdateOptionalParams, - ) => Promise; - /** Deletes an existing customer Enterprise resource */ - delete: ( - resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseCustomerOperationsDeleteOptionalParams, - ) => Promise; - /** Retrieves the properties of all ConnectedCache enterpriseCustomers */ - listByResourceGroup: ( - resourceGroupName: string, - options?: EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; - /** Retrieves the properties of all ConnectedCaches */ - listBySubscription: ( - options?: EnterpriseCustomerOperationsListBySubscriptionOptionalParams, - ) => PagedAsyncIterableIterator; -} - -export function getEnterpriseCustomerOperations( - context: ConnectedCacheContext, - subscriptionId: string, -) { - return { - get: ( - resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseCustomerOperationsGetOptionalParams, - ) => - enterpriseCustomerOperationsGet( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - createOrUpdate: ( - resourceGroupName: string, - customerResourceName: string, - resource: EnterprisePreviewResource, - options?: EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - ) => - enterpriseCustomerOperationsCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), - update: ( - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options?: EnterpriseCustomerOperationsUpdateOptionalParams, - ) => - enterpriseCustomerOperationsUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ), - delete: ( - resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseCustomerOperationsDeleteOptionalParams, - ) => - enterpriseCustomerOperationsDelete( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - listByResourceGroup: ( - resourceGroupName: string, - options?: EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - ) => - enterpriseCustomerOperationsListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - options, - ), - listBySubscription: (options?: EnterpriseCustomerOperationsListBySubscriptionOptionalParams) => - enterpriseCustomerOperationsListBySubscription(context, subscriptionId, options), - }; -} - -export function getEnterpriseCustomerOperationsOperations( - context: ConnectedCacheContext, - subscriptionId: string, -): EnterpriseCustomerOperationsOperations { - return { - ...getEnterpriseCustomerOperations(context, subscriptionId), - }; -} diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts index f148cf69edf9..f738c81b03a4 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts @@ -1,138 +1,162 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import type { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; import { - enterpriseMccCacheNodesOperationsGet, - enterpriseMccCacheNodesOperationsCreateOrUpdate, - enterpriseMccCacheNodesOperationsUpdate, - enterpriseMccCacheNodesOperationsDelete, - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource, - enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails, -} from "../../api/enterpriseMccCacheNodesOperations/index.js"; -import { - EnterpriseMccCacheNodesOperationsGetOptionalParams, - EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsDeleteOptionalParams, - EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + getCacheNodeTlsCertificateHistory, + getCacheNodeMccIssueDetailsHistory, + getCacheNodeAutoUpdateHistory, + getCacheNodeInstallDetails, + listByEnterpriseMccCustomerResource, + $delete, + update, + createOrUpdate, + get, +} from "../../api/enterpriseMccCacheNodesOperations/operations.js"; +import type { + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "../../api/options.js"; -import { - EnterpriseMccCacheNodeResource, + EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "../../api/enterpriseMccCacheNodesOperations/options.js"; +import type { ConnectedCachePatchResource, MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, + EnterpriseMccCacheNodeResource, + MccCacheNodeTlsCertificateHistory, } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a EnterpriseMccCacheNodesOperations operations. */ export interface EnterpriseMccCacheNodesOperationsOperations { - /** This api gets ispCacheNode resource information */ - get: ( + /** This api gets ispCacheNode resource tls certificate histrory information */ + getCacheNodeTlsCertificateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsGetOptionalParams, - ) => Promise; - /** This api creates an ispCacheNode with the specified create parameters */ - createOrUpdate: ( + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + ) => Promise; + /** This api gets ispCacheNode resource issues details histrory information */ + getCacheNodeMccIssueDetailsHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: EnterpriseMccCacheNodeResource, - options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - ) => PollerLike, EnterpriseMccCacheNodeResource>; - /** This api updates an existing ispCacheNode resource */ - update: ( + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + ) => Promise; + /** This api gets ispCacheNode resource auto update histrory information */ + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, - ) => Promise; - /** This api deletes an existing ispCacheNode resource */ - delete: ( + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + ) => Promise; + /** This api gets secrets of the ispCacheNode resource install details */ + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, - ) => PollerLike, void>; + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + ) => Promise; /** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ listByEnterpriseMccCustomerResource: ( resourceGroupName: string, customerResourceName: string, options?: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, ) => PagedAsyncIterableIterator; - /** This api gets secrets of the ispCacheNode resource install details */ - getCacheNodeInstallDetails: ( + /** This api deletes an existing ispCacheNode resource */ + /** + * @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, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - ) => Promise; + options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + ) => PollerLike, void>; + /** This api updates an existing ispCacheNode resource */ + update: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + ) => Promise; + /** This api creates an ispCacheNode with the specified create parameters */ + createOrUpdate: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: EnterpriseMccCacheNodeResource, + options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + ) => PollerLike, EnterpriseMccCacheNodeResource>; + /** This api gets ispCacheNode resource information */ + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: EnterpriseMccCacheNodesOperationsGetOptionalParams, + ) => Promise; } -export function getEnterpriseMccCacheNodesOperations( - context: ConnectedCacheContext, - subscriptionId: string, -) { +function _getEnterpriseMccCacheNodesOperations(context: ConnectedCacheContext) { return { - get: ( + getCacheNodeTlsCertificateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsGetOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, ) => - enterpriseMccCacheNodesOperationsGet( + getCacheNodeTlsCertificateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, options, ), - createOrUpdate: ( + getCacheNodeMccIssueDetailsHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: EnterpriseMccCacheNodeResource, - options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, ) => - enterpriseMccCacheNodesOperationsCreateOrUpdate( + getCacheNodeMccIssueDetailsHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - resource, options, ), - update: ( + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, ) => - enterpriseMccCacheNodesOperationsUpdate( + getCacheNodeAutoUpdateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - properties, options, ), - delete: ( + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, ) => - enterpriseMccCacheNodesOperationsDelete( + getCacheNodeInstallDetails( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, @@ -143,35 +167,61 @@ export function getEnterpriseMccCacheNodesOperations( customerResourceName: string, options?: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, ) => - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource( + listByEnterpriseMccCustomerResource( context, - subscriptionId, resourceGroupName, customerResourceName, options, ), - getCacheNodeInstallDetails: ( + delete: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, customerResourceName, cacheNodeResourceName, options), + update: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: EnterpriseMccCacheNodeResource, + options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, ) => - enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails( + createOrUpdate( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, + resource, options, ), + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: EnterpriseMccCacheNodesOperationsGetOptionalParams, + ) => get(context, resourceGroupName, customerResourceName, cacheNodeResourceName, options), }; } -export function getEnterpriseMccCacheNodesOperationsOperations( +export function _getEnterpriseMccCacheNodesOperationsOperations( context: ConnectedCacheContext, - subscriptionId: string, ): EnterpriseMccCacheNodesOperationsOperations { return { - ...getEnterpriseMccCacheNodesOperations(context, subscriptionId), + ..._getEnterpriseMccCacheNodesOperations(context), }; } diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts index dca70f70e1d6..06183eb24022 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts @@ -1,42 +1,52 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import type { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; import { - enterpriseMccCustomersGet, - enterpriseMccCustomersCreateOrUpdate, - enterpriseMccCustomersUpdate, - enterpriseMccCustomersDelete, - enterpriseMccCustomersListByResourceGroup, - enterpriseMccCustomersListBySubscription, -} from "../../api/enterpriseMccCustomers/index.js"; -import { - EnterpriseMccCustomersGetOptionalParams, - EnterpriseMccCustomersCreateOrUpdateOptionalParams, - EnterpriseMccCustomersUpdateOptionalParams, - EnterpriseMccCustomersDeleteOptionalParams, - EnterpriseMccCustomersListByResourceGroupOptionalParams, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/enterpriseMccCustomers/operations.js"; +import type { EnterpriseMccCustomersListBySubscriptionOptionalParams, -} from "../../api/options.js"; -import { ConnectedCachePatchResource, EnterpriseMccCustomerResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, + EnterpriseMccCustomersUpdateOptionalParams, + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "../../api/enterpriseMccCustomers/options.js"; +import type { + ConnectedCachePatchResource, + EnterpriseMccCustomerResource, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a EnterpriseMccCustomers operations. */ export interface EnterpriseMccCustomersOperations { - /** Gets the enterprise mcc customer resource information using this get call */ - get: ( + /** This api gets information about all enterpriseMccCustomer resources under the given subscription */ + listBySubscription: ( + options?: EnterpriseMccCustomersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** This api gets the information about all enterprise mcc customer resources under the given subscription and resource group */ + listByResourceGroup: ( resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseMccCustomersGetOptionalParams, - ) => Promise; - /** This api creates an enterprise mcc customer with the specified create parameters */ - createOrUpdate: ( + options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** This api deletes an existing enterprise mcc customer resource */ + /** + * @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, customerResourceName: string, - resource: EnterpriseMccCustomerResource, - options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, - ) => PollerLike, EnterpriseMccCustomerResource>; + options?: EnterpriseMccCustomersDeleteOptionalParams, + ) => PollerLike, void>; /** This api updates an existing enterprise mcc customer resource */ update: ( resourceGroupName: string, @@ -44,97 +54,58 @@ export interface EnterpriseMccCustomersOperations { properties: ConnectedCachePatchResource, options?: EnterpriseMccCustomersUpdateOptionalParams, ) => Promise; - /** This api deletes an existing enterprise mcc customer resource */ - delete: ( + /** This api creates an enterprise mcc customer with the specified create parameters */ + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, - options?: EnterpriseMccCustomersDeleteOptionalParams, - ) => PollerLike, void>; - /** This api gets the information about all enterprise mcc customer resources under the given subscription and resource group */ - listByResourceGroup: ( + resource: EnterpriseMccCustomerResource, + options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, + ) => PollerLike, EnterpriseMccCustomerResource>; + /** Gets the enterprise mcc customer resource information using this get call */ + get: ( resourceGroupName: string, - options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; - /** This api gets information about all enterpriseMccCustomer resources under the given subscription */ - listBySubscription: ( - options?: EnterpriseMccCustomersListBySubscriptionOptionalParams, - ) => PagedAsyncIterableIterator; + customerResourceName: string, + options?: EnterpriseMccCustomersGetOptionalParams, + ) => Promise; } -export function getEnterpriseMccCustomers(context: ConnectedCacheContext, subscriptionId: string) { +function _getEnterpriseMccCustomers(context: ConnectedCacheContext) { return { - get: ( + listBySubscription: (options?: EnterpriseMccCustomersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseMccCustomersGetOptionalParams, - ) => - enterpriseMccCustomersGet( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - createOrUpdate: ( + options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( resourceGroupName: string, customerResourceName: string, - resource: EnterpriseMccCustomerResource, - options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, - ) => - enterpriseMccCustomersCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), + options?: EnterpriseMccCustomersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, customerResourceName, options), update: ( resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: EnterpriseMccCustomersUpdateOptionalParams, - ) => - enterpriseMccCustomersUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ), - delete: ( + ) => update(context, resourceGroupName, customerResourceName, properties, options), + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, - options?: EnterpriseMccCustomersDeleteOptionalParams, - ) => - enterpriseMccCustomersDelete( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - listByResourceGroup: ( + resource: EnterpriseMccCustomerResource, + options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, customerResourceName, resource, options), + get: ( resourceGroupName: string, - options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, - ) => - enterpriseMccCustomersListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - options, - ), - listBySubscription: (options?: EnterpriseMccCustomersListBySubscriptionOptionalParams) => - enterpriseMccCustomersListBySubscription(context, subscriptionId, options), + customerResourceName: string, + options?: EnterpriseMccCustomersGetOptionalParams, + ) => get(context, resourceGroupName, customerResourceName, options), }; } -export function getEnterpriseMccCustomersOperations( +export function _getEnterpriseMccCustomersOperations( context: ConnectedCacheContext, - subscriptionId: string, ): EnterpriseMccCustomersOperations { return { - ...getEnterpriseMccCustomers(context, subscriptionId), + ..._getEnterpriseMccCustomers(context), }; } diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/index.ts index 3b57ed341145..69ff2baa3e66 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/index.ts @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -export { CacheNodesOperationsOperations } from "./cacheNodesOperations/index.js"; -export { EnterpriseCustomerOperationsOperations } from "./enterpriseCustomerOperations/index.js"; export { EnterpriseMccCacheNodesOperationsOperations } from "./enterpriseMccCacheNodesOperations/index.js"; export { EnterpriseMccCustomersOperations } from "./enterpriseMccCustomers/index.js"; export { IspCacheNodesOperationsOperations } from "./ispCacheNodesOperations/index.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts index 99cc2cb6742d..b028cc14b7c7 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts @@ -1,198 +1,215 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import type { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; import { - ispCacheNodesOperationsGet, - ispCacheNodesOperationsCreateOrUpdate, - ispCacheNodesOperationsUpdate, - ispCacheNodesOperationsDelete, - ispCacheNodesOperationsListByIspCustomerResource, - ispCacheNodesOperationsGetBgpCidrs, - ispCacheNodesOperationsGetCacheNodeInstallDetails, -} from "../../api/ispCacheNodesOperations/index.js"; -import { - IspCacheNodesOperationsGetOptionalParams, - IspCacheNodesOperationsCreateOrUpdateOptionalParams, - IspCacheNodesOperationsUpdateOptionalParams, - IspCacheNodesOperationsDeleteOptionalParams, - IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, - IspCacheNodesOperationsGetBgpCidrsOptionalParams, + getCacheNodeMccIssueDetailsHistory, + getCacheNodeAutoUpdateHistory, + getCacheNodeInstallDetails, + getBgpCidrs, + listByIspCustomerResource, + $delete, + update, + createOrUpdate, + get, +} from "../../api/ispCacheNodesOperations/operations.js"; +import type { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "../../api/options.js"; -import { + IspCacheNodesOperationsGetBgpCidrsOptionalParams, + IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, + IspCacheNodesOperationsUpdateOptionalParams, + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "../../api/ispCacheNodesOperations/options.js"; +import type { ConnectedCachePatchResource, - MccCacheNodeInstallDetails, IspCacheNodeResource, MccCacheNodeBgpCidrDetails, + MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a IspCacheNodesOperations operations. */ export interface IspCacheNodesOperationsOperations { - /** This api gets ispCacheNode resource information */ - get: ( + /** This api gets ispCacheNode resource issues details histrory information */ + getCacheNodeMccIssueDetailsHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetOptionalParams, - ) => Promise; - /** This api creates an ispCacheNode with the specified create parameters */ - createOrUpdate: ( + options?: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + ) => Promise; + /** This api gets ispCacheNode resource auto update histrory information */ + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: IspCacheNodeResource, - options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, - ) => PollerLike, IspCacheNodeResource>; - /** This api updates an existing ispCacheNode resource */ - update: ( + options?: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + ) => Promise; + /** This api gets secrets of the ispCacheNode resource install details */ + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: IspCacheNodesOperationsUpdateOptionalParams, - ) => Promise; - /** This api deletes an existing ispCacheNode resource */ - delete: ( + options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + ) => Promise; + /** This api gets ispCacheNode resource information */ + getBgpCidrs: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsDeleteOptionalParams, - ) => PollerLike, void>; + options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, + ) => Promise; /** This api retrieves information about all ispCacheNode resources under the given subscription and resource group */ listByIspCustomerResource: ( resourceGroupName: string, customerResourceName: string, options?: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, ) => PagedAsyncIterableIterator; - /** This api gets ispCacheNode resource information */ - getBgpCidrs: ( + /** This api deletes an existing ispCacheNode resource */ + /** + * @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, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, - ) => Promise; - /** This api gets secrets of the ispCacheNode resource install details */ - getCacheNodeInstallDetails: ( + options?: IspCacheNodesOperationsDeleteOptionalParams, + ) => PollerLike, void>; + /** This api updates an existing ispCacheNode resource */ + update: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - ) => Promise; + properties: ConnectedCachePatchResource, + options?: IspCacheNodesOperationsUpdateOptionalParams, + ) => Promise; + /** This api creates an ispCacheNode with the specified create parameters */ + createOrUpdate: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: IspCacheNodeResource, + options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, + ) => PollerLike, IspCacheNodeResource>; + /** This api gets ispCacheNode resource information */ + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: IspCacheNodesOperationsGetOptionalParams, + ) => Promise; } -export function getIspCacheNodesOperations(context: ConnectedCacheContext, subscriptionId: string) { +function _getIspCacheNodesOperations(context: ConnectedCacheContext) { return { - get: ( + getCacheNodeMccIssueDetailsHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetOptionalParams, + options?: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, ) => - ispCacheNodesOperationsGet( + getCacheNodeMccIssueDetailsHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, options, ), - createOrUpdate: ( + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: IspCacheNodeResource, - options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, + options?: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, ) => - ispCacheNodesOperationsCreateOrUpdate( + getCacheNodeAutoUpdateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - resource, options, ), - update: ( + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: IspCacheNodesOperationsUpdateOptionalParams, + options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, ) => - ispCacheNodesOperationsUpdate( + getCacheNodeInstallDetails( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - properties, options, ), - delete: ( + getBgpCidrs: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsDeleteOptionalParams, + options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, ) => - ispCacheNodesOperationsDelete( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - cacheNodeResourceName, - options, - ), + getBgpCidrs(context, resourceGroupName, customerResourceName, cacheNodeResourceName, options), listByIspCustomerResource: ( resourceGroupName: string, customerResourceName: string, options?: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, - ) => - ispCacheNodesOperationsListByIspCustomerResource( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - getBgpCidrs: ( + ) => listByIspCustomerResource(context, resourceGroupName, customerResourceName, options), + delete: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, + options?: IspCacheNodesOperationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, customerResourceName, cacheNodeResourceName, options), + update: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options?: IspCacheNodesOperationsUpdateOptionalParams, ) => - ispCacheNodesOperationsGetBgpCidrs( + update( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, + properties, options, ), - getCacheNodeInstallDetails: ( + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + resource: IspCacheNodeResource, + options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, ) => - ispCacheNodesOperationsGetCacheNodeInstallDetails( + createOrUpdate( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, + resource, options, ), + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: IspCacheNodesOperationsGetOptionalParams, + ) => get(context, resourceGroupName, customerResourceName, cacheNodeResourceName, options), }; } -export function getIspCacheNodesOperationsOperations( +export function _getIspCacheNodesOperationsOperations( context: ConnectedCacheContext, - subscriptionId: string, ): IspCacheNodesOperationsOperations { return { - ...getIspCacheNodesOperations(context, subscriptionId), + ..._getIspCacheNodesOperations(context), }; } diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts index 65943d9a8317..41ade42ee269 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts @@ -1,42 +1,49 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import type { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; import { - ispCustomersGet, - ispCustomersCreateOrUpdate, - ispCustomersUpdate, - ispCustomersDelete, - ispCustomersListByResourceGroup, - ispCustomersListBySubscription, -} from "../../api/ispCustomers/index.js"; -import { - IspCustomersGetOptionalParams, - IspCustomersCreateOrUpdateOptionalParams, - IspCustomersUpdateOptionalParams, - IspCustomersDeleteOptionalParams, - IspCustomersListByResourceGroupOptionalParams, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/ispCustomers/operations.js"; +import type { IspCustomersListBySubscriptionOptionalParams, -} from "../../api/options.js"; -import { ConnectedCachePatchResource, IspCustomerResource } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, + IspCustomersUpdateOptionalParams, + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "../../api/ispCustomers/options.js"; +import type { IspCustomerResource, ConnectedCachePatchResource } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a IspCustomers operations. */ export interface IspCustomersOperations { - /** Gets the ispCustomer resource information using this get call */ - get: ( + /** This api gets information about all ispCustomer resources under the given subscription */ + listBySubscription: ( + options?: IspCustomersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** This api gets the information about all ispCustomer resources under the given subscription and resource group */ + listByResourceGroup: ( resourceGroupName: string, - customerResourceName: string, - options?: IspCustomersGetOptionalParams, - ) => Promise; - /** This api creates an ispCustomer with the specified create parameters */ - createOrUpdate: ( + options?: IspCustomersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** This api deletes an existing ispCustomer resource */ + /** + * @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, customerResourceName: string, - resource: IspCustomerResource, - options?: IspCustomersCreateOrUpdateOptionalParams, - ) => PollerLike, IspCustomerResource>; + options?: IspCustomersDeleteOptionalParams, + ) => PollerLike, void>; /** This api updates an existing ispCustomer resource */ update: ( resourceGroupName: string, @@ -44,78 +51,56 @@ export interface IspCustomersOperations { properties: ConnectedCachePatchResource, options?: IspCustomersUpdateOptionalParams, ) => Promise; - /** This api deletes an existing ispCustomer resource */ - delete: ( + /** This api creates an ispCustomer with the specified create parameters */ + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, - options?: IspCustomersDeleteOptionalParams, - ) => PollerLike, void>; - /** This api gets the information about all ispCustomer resources under the given subscription and resource group */ - listByResourceGroup: ( + resource: IspCustomerResource, + options?: IspCustomersCreateOrUpdateOptionalParams, + ) => PollerLike, IspCustomerResource>; + /** Gets the ispCustomer resource information using this get call */ + get: ( resourceGroupName: string, - options?: IspCustomersListByResourceGroupOptionalParams, - ) => PagedAsyncIterableIterator; - /** This api gets information about all ispCustomer resources under the given subscription */ - listBySubscription: ( - options?: IspCustomersListBySubscriptionOptionalParams, - ) => PagedAsyncIterableIterator; + customerResourceName: string, + options?: IspCustomersGetOptionalParams, + ) => Promise; } -export function getIspCustomers(context: ConnectedCacheContext, subscriptionId: string) { +function _getIspCustomers(context: ConnectedCacheContext) { return { - get: ( + listBySubscription: (options?: IspCustomersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( resourceGroupName: string, - customerResourceName: string, - options?: IspCustomersGetOptionalParams, - ) => ispCustomersGet(context, subscriptionId, resourceGroupName, customerResourceName, options), - createOrUpdate: ( + options?: IspCustomersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( resourceGroupName: string, customerResourceName: string, - resource: IspCustomerResource, - options?: IspCustomersCreateOrUpdateOptionalParams, - ) => - ispCustomersCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), + options?: IspCustomersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, customerResourceName, options), update: ( resourceGroupName: string, customerResourceName: string, properties: ConnectedCachePatchResource, options?: IspCustomersUpdateOptionalParams, - ) => - ispCustomersUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ), - delete: ( + ) => update(context, resourceGroupName, customerResourceName, properties, options), + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, - options?: IspCustomersDeleteOptionalParams, - ) => - ispCustomersDelete(context, subscriptionId, resourceGroupName, customerResourceName, options), - listByResourceGroup: ( + resource: IspCustomerResource, + options?: IspCustomersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, customerResourceName, resource, options), + get: ( resourceGroupName: string, - options?: IspCustomersListByResourceGroupOptionalParams, - ) => ispCustomersListByResourceGroup(context, subscriptionId, resourceGroupName, options), - listBySubscription: (options?: IspCustomersListBySubscriptionOptionalParams) => - ispCustomersListBySubscription(context, subscriptionId, options), + customerResourceName: string, + options?: IspCustomersGetOptionalParams, + ) => get(context, resourceGroupName, customerResourceName, options), }; } -export function getIspCustomersOperations( - context: ConnectedCacheContext, - subscriptionId: string, -): IspCustomersOperations { +export function _getIspCustomersOperations(context: ConnectedCacheContext): IspCustomersOperations { return { - ...getIspCustomers(context, subscriptionId), + ..._getIspCustomers(context), }; } diff --git a/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts b/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts index 386932db432f..a5ef58b8c41a 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; -import { operationsList } from "../../api/operations/index.js"; -import { OperationsListOptionalParams } from "../../api/options.js"; -import { Operation } from "../../models/models.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import { list } from "../../api/operations/operations.js"; +import type { OperationsListOptionalParams } from "../../api/operations/options.js"; +import type { Operation } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a Operations operations. */ export interface OperationsOperations { @@ -13,14 +13,14 @@ export interface OperationsOperations { list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } -export function getOperations(context: ConnectedCacheContext) { +function _getOperations(context: ConnectedCacheContext) { return { - list: (options?: OperationsListOptionalParams) => operationsList(context, options), + list: (options?: OperationsListOptionalParams) => list(context, options), }; } -export function getOperationsOperations(context: ConnectedCacheContext): OperationsOperations { +export function _getOperationsOperations(context: ConnectedCacheContext): OperationsOperations { return { - ...getOperations(context), + ..._getOperations(context), }; } diff --git a/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts b/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts index e83c6f97a7b2..8884d0cb0440 100644 --- a/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts +++ b/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; -import { - getEnterpriseCustomerOperationsOperations, - EnterpriseCustomerOperationsOperations, -} from "./classic/enterpriseCustomerOperations/index.js"; -import { - getCacheNodesOperationsOperations, - CacheNodesOperationsOperations, -} from "./classic/cacheNodesOperations/index.js"; -import { getIspCustomersOperations, IspCustomersOperations } from "./classic/ispCustomers/index.js"; -import { - getIspCacheNodesOperationsOperations, - IspCacheNodesOperationsOperations, -} from "./classic/ispCacheNodesOperations/index.js"; -import { - getEnterpriseMccCustomersOperations, - EnterpriseMccCustomersOperations, -} from "./classic/enterpriseMccCustomers/index.js"; -import { - getEnterpriseMccCacheNodesOperationsOperations, - EnterpriseMccCacheNodesOperationsOperations, -} from "./classic/enterpriseMccCacheNodesOperations/index.js"; -import { - createConnectedCache, - ConnectedCacheContext, - ConnectedCacheClientOptionalParams, -} from "./api/index.js"; -import { Pipeline } from "@azure/core-rest-pipeline"; -import { TokenCredential } from "@azure/core-auth"; +import type { ConnectedCacheContext, ConnectedCacheClientOptionalParams } from "./api/index.js"; +import { createConnectedCache } from "./api/index.js"; +import type { EnterpriseMccCacheNodesOperationsOperations } from "./classic/enterpriseMccCacheNodesOperations/index.js"; +import { _getEnterpriseMccCacheNodesOperationsOperations } from "./classic/enterpriseMccCacheNodesOperations/index.js"; +import type { EnterpriseMccCustomersOperations } from "./classic/enterpriseMccCustomers/index.js"; +import { _getEnterpriseMccCustomersOperations } from "./classic/enterpriseMccCustomers/index.js"; +import type { IspCacheNodesOperationsOperations } from "./classic/ispCacheNodesOperations/index.js"; +import { _getIspCacheNodesOperationsOperations } from "./classic/ispCacheNodesOperations/index.js"; +import type { IspCustomersOperations } from "./classic/ispCustomers/index.js"; +import { _getIspCustomersOperations } from "./classic/ispCustomers/index.js"; +import type { OperationsOperations } from "./classic/operations/index.js"; +import { _getOperationsOperations } from "./classic/operations/index.js"; +import type { TokenCredential } from "@azure/core-auth"; +import type { Pipeline } from "@azure/core-rest-pipeline"; export { ConnectedCacheClientOptionalParams } from "./api/connectedCacheContext.js"; @@ -48,41 +33,28 @@ export class ConnectedCacheClient { const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` : `azsdk-js-client`; - this._client = createConnectedCache(credential, { + this._client = createConnectedCache(credential, subscriptionId, { ...options, userAgentOptions: { userAgentPrefix }, }); this.pipeline = this._client.pipeline; - this.operations = getOperationsOperations(this._client); - this.enterpriseCustomerOperations = getEnterpriseCustomerOperationsOperations( + this.enterpriseMccCacheNodesOperations = _getEnterpriseMccCacheNodesOperationsOperations( this._client, - subscriptionId, - ); - this.cacheNodesOperations = getCacheNodesOperationsOperations(this._client, subscriptionId); - this.ispCustomers = getIspCustomersOperations(this._client, subscriptionId); - this.ispCacheNodesOperations = getIspCacheNodesOperationsOperations( - this._client, - subscriptionId, - ); - this.enterpriseMccCustomers = getEnterpriseMccCustomersOperations(this._client, subscriptionId); - this.enterpriseMccCacheNodesOperations = getEnterpriseMccCacheNodesOperationsOperations( - this._client, - subscriptionId, ); + this.enterpriseMccCustomers = _getEnterpriseMccCustomersOperations(this._client); + this.ispCacheNodesOperations = _getIspCacheNodesOperationsOperations(this._client); + this.ispCustomers = _getIspCustomersOperations(this._client); + this.operations = _getOperationsOperations(this._client); } - /** The operation groups for Operations */ - public readonly operations: OperationsOperations; - /** The operation groups for EnterpriseCustomerOperations */ - public readonly enterpriseCustomerOperations: EnterpriseCustomerOperationsOperations; - /** The operation groups for CacheNodesOperations */ - public readonly cacheNodesOperations: CacheNodesOperationsOperations; - /** The operation groups for IspCustomers */ - public readonly ispCustomers: IspCustomersOperations; - /** The operation groups for IspCacheNodesOperations */ - public readonly ispCacheNodesOperations: IspCacheNodesOperationsOperations; - /** The operation groups for EnterpriseMccCustomers */ - public readonly enterpriseMccCustomers: EnterpriseMccCustomersOperations; - /** The operation groups for EnterpriseMccCacheNodesOperations */ + /** The operation groups for enterpriseMccCacheNodesOperations */ public readonly enterpriseMccCacheNodesOperations: EnterpriseMccCacheNodesOperationsOperations; + /** The operation groups for enterpriseMccCustomers */ + public readonly enterpriseMccCustomers: EnterpriseMccCustomersOperations; + /** The operation groups for ispCacheNodesOperations */ + public readonly ispCacheNodesOperations: IspCacheNodesOperationsOperations; + /** The operation groups for ispCustomers */ + public readonly ispCustomers: IspCustomersOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; } diff --git a/sdk/connectedcache/arm-connectedcache/src/helpers/serializerHelpers.ts b/sdk/connectedcache/arm-connectedcache/src/helpers/serializerHelpers.ts deleted file mode 100644 index 7518a16c2ee9..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/helpers/serializerHelpers.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export function serializeRecord( - item: Record, -): Record; -export function serializeRecord( - item: Record, - serializer: (item: T) => R, -): Record; -export function serializeRecord( - item: Record, - serializer?: (item: T) => R, -): Record { - return Object.keys(item).reduce( - (acc, key) => { - if (isSupportedRecordType(item[key])) { - acc[key] = item[key] as any; - } else if (serializer) { - const value = item[key]; - if (value !== undefined) { - acc[key] = serializer(value); - } - } else { - console.warn(`Don't know how to serialize ${item[key]}`); - acc[key] = item[key] as any; - } - return acc; - }, - {} as Record, - ); -} - -function isSupportedRecordType(t: any) { - return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; -} diff --git a/sdk/connectedcache/arm-connectedcache/src/index.ts b/sdk/connectedcache/arm-connectedcache/src/index.ts index b62ace21ec12..4169d9aa8483 100644 --- a/sdk/connectedcache/arm-connectedcache/src/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; import { PageSettings, ContinuablePage, @@ -10,10 +11,31 @@ import { export { ConnectedCacheClient } from "./connectedCacheClient.js"; export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; export { - EnterpriseMccCacheNodeResource, - CacheNodeProperty, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + IspCustomerResource, + CustomerProperty, KnownProvisioningState, ProvisioningState, + CustomerEntity, + AdditionalCustomerProperties, + KnownCustomerTransitState, + CustomerTransitState, + TrackedResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ConnectedCachePatchResource, + IspCacheNodeResource, + CacheNodeProperty, CacheNodeEntity, KnownBgpReviewStateEnum, BgpReviewStateEnum, @@ -22,6 +44,8 @@ export { KnownAutoUpdateRingType, AutoUpdateRingType, AdditionalCacheNodeProperties, + MccCacheNodeTlsCertificate, + MccCacheNodeAutoUpdateInfo, CacheNodeDriveConfiguration, BgpConfiguration, ProxyUrlConfiguration, @@ -29,83 +53,62 @@ export { ProxyRequired, KnownOsType, OsType, - KnownCycleType, - CycleType, - ErrorDetail, - ErrorAdditionalInfo, - TrackedResource, - Resource, - SystemData, - KnownCreatedByType, - CreatedByType, - ConnectedCachePatchResource, + MccCacheNodeBgpCidrDetails, + BgpCidrsConfiguration, MccCacheNodeInstallDetails, CacheNodeInstallProperties, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeAutoUpdateHistoryProperties, + MccCacheNodeIssueHistory, + MccCacheNodeIssueHistoryProperties, + MccIssue, EnterpriseMccCustomerResource, - CustomerProperty, - CustomerEntity, - AdditionalCustomerProperties, - KnownCustomerTransitState, - CustomerTransitState, - IspCacheNodeResource, - MccCacheNodeBgpCidrDetails, - BgpCidrsConfiguration, - IspCustomerResource, - CacheNodePreviewResource, - CacheNodeOldResponse, - EnterprisePreviewResource, - Operation, - OperationDisplay, - KnownOrigin, - Origin, - KnownActionType, - ActionType, + EnterpriseMccCacheNodeResource, + MccCacheNodeTlsCertificateHistory, + MccCacheNodeTlsCertificateProperties, KnownVersions, } from "./models/index.js"; +export { ConnectedCacheClientOptionalParams } from "./api/index.js"; export { - ConnectedCacheClientOptionalParams, - OperationsListOptionalParams, - EnterpriseCustomerOperationsGetOptionalParams, - EnterpriseCustomerOperationsCreateOrUpdateOptionalParams, - EnterpriseCustomerOperationsUpdateOptionalParams, - EnterpriseCustomerOperationsDeleteOptionalParams, - EnterpriseCustomerOperationsListByResourceGroupOptionalParams, - EnterpriseCustomerOperationsListBySubscriptionOptionalParams, - CacheNodesOperationsGetOptionalParams, - CacheNodesOperationsCreateorUpdateOptionalParams, - CacheNodesOperationsDeleteOptionalParams, - CacheNodesOperationsUpdateOptionalParams, - CacheNodesOperationsListByResourceGroupOptionalParams, - CacheNodesOperationsListBySubscriptionOptionalParams, - IspCustomersGetOptionalParams, - IspCustomersCreateOrUpdateOptionalParams, - IspCustomersUpdateOptionalParams, - IspCustomersDeleteOptionalParams, - IspCustomersListByResourceGroupOptionalParams, - IspCustomersListBySubscriptionOptionalParams, - IspCacheNodesOperationsGetOptionalParams, - IspCacheNodesOperationsCreateOrUpdateOptionalParams, - IspCacheNodesOperationsUpdateOptionalParams, - IspCacheNodesOperationsDeleteOptionalParams, - IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, - IspCacheNodesOperationsGetBgpCidrsOptionalParams, - IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, - EnterpriseMccCustomersGetOptionalParams, - EnterpriseMccCustomersCreateOrUpdateOptionalParams, - EnterpriseMccCustomersUpdateOptionalParams, - EnterpriseMccCustomersDeleteOptionalParams, - EnterpriseMccCustomersListByResourceGroupOptionalParams, - EnterpriseMccCustomersListBySubscriptionOptionalParams, - EnterpriseMccCacheNodesOperationsGetOptionalParams, - EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsDeleteOptionalParams, - EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "./api/index.js"; + EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "./api/enterpriseMccCacheNodesOperations/index.js"; +export { + EnterpriseMccCustomersListBySubscriptionOptionalParams, + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, + EnterpriseMccCustomersUpdateOptionalParams, + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "./api/enterpriseMccCustomers/index.js"; +export { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + IspCacheNodesOperationsGetBgpCidrsOptionalParams, + IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, + IspCacheNodesOperationsUpdateOptionalParams, + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "./api/ispCacheNodesOperations/index.js"; +export { + IspCustomersListBySubscriptionOptionalParams, + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, + IspCustomersUpdateOptionalParams, + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "./api/ispCustomers/index.js"; +export { OperationsListOptionalParams } from "./api/operations/index.js"; export { - CacheNodesOperationsOperations, - EnterpriseCustomerOperationsOperations, EnterpriseMccCacheNodesOperationsOperations, EnterpriseMccCustomersOperations, IspCacheNodesOperationsOperations, @@ -113,3 +116,4 @@ export { OperationsOperations, } from "./classic/index.js"; export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds, AzureSupportedClouds }; diff --git a/sdk/connectedcache/arm-connectedcache/src/models/index.ts b/sdk/connectedcache/arm-connectedcache/src/models/index.ts index 33010303a2ad..5afc157ebf22 100644 --- a/sdk/connectedcache/arm-connectedcache/src/models/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/models/index.ts @@ -2,10 +2,31 @@ // Licensed under the MIT License. export { - EnterpriseMccCacheNodeResource, - CacheNodeProperty, + Operation, + OperationDisplay, + KnownOrigin, + Origin, + KnownActionType, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + IspCustomerResource, + CustomerProperty, KnownProvisioningState, ProvisioningState, + CustomerEntity, + AdditionalCustomerProperties, + KnownCustomerTransitState, + CustomerTransitState, + TrackedResource, + Resource, + SystemData, + KnownCreatedByType, + CreatedByType, + ConnectedCachePatchResource, + IspCacheNodeResource, + CacheNodeProperty, CacheNodeEntity, KnownBgpReviewStateEnum, BgpReviewStateEnum, @@ -14,6 +35,8 @@ export { KnownAutoUpdateRingType, AutoUpdateRingType, AdditionalCacheNodeProperties, + MccCacheNodeTlsCertificate, + MccCacheNodeAutoUpdateInfo, CacheNodeDriveConfiguration, BgpConfiguration, ProxyUrlConfiguration, @@ -21,36 +44,18 @@ export { ProxyRequired, KnownOsType, OsType, - KnownCycleType, - CycleType, - ErrorDetail, - ErrorAdditionalInfo, - TrackedResource, - Resource, - SystemData, - KnownCreatedByType, - CreatedByType, - ConnectedCachePatchResource, + MccCacheNodeBgpCidrDetails, + BgpCidrsConfiguration, MccCacheNodeInstallDetails, CacheNodeInstallProperties, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeAutoUpdateHistoryProperties, + MccCacheNodeIssueHistory, + MccCacheNodeIssueHistoryProperties, + MccIssue, EnterpriseMccCustomerResource, - CustomerProperty, - CustomerEntity, - AdditionalCustomerProperties, - KnownCustomerTransitState, - CustomerTransitState, - IspCacheNodeResource, - MccCacheNodeBgpCidrDetails, - BgpCidrsConfiguration, - IspCustomerResource, - CacheNodePreviewResource, - CacheNodeOldResponse, - EnterprisePreviewResource, - Operation, - OperationDisplay, - KnownOrigin, - Origin, - KnownActionType, - ActionType, + EnterpriseMccCacheNodeResource, + MccCacheNodeTlsCertificateHistory, + MccCacheNodeTlsCertificateProperties, KnownVersions, } from "./models.js"; diff --git a/sdk/connectedcache/arm-connectedcache/src/models/models.ts b/sdk/connectedcache/arm-connectedcache/src/models/models.ts index fe5b88b1cd94..85a0ccaacc64 100644 --- a/sdk/connectedcache/arm-connectedcache/src/models/models.ts +++ b/sdk/connectedcache/arm-connectedcache/src/models/models.ts @@ -1,29 +1,210 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** Represents the high level Nodes needed to provision cache node resources */ -export interface EnterpriseMccCacheNodeResource extends TrackedResource { +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + readonly actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for 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 errorDetailSerializer(item: ErrorDetail): any { + return item; +} + +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 errorDetailArraySerializer(result: Array): any[] { + return result.map((item) => { + return errorDetailSerializer(item); + }); +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: any; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: item["info"], + }; +} + +/** Represents the high level Nodes needed to provision isp customer resources */ +export interface IspCustomerResource extends TrackedResource { /** The resource-specific properties for this resource. */ - properties?: CacheNodeProperty; + properties?: CustomerProperty; } -export function enterpriseMccCacheNodeResourceSerializer( - item: EnterpriseMccCacheNodeResource, -): any { +export function ispCustomerResourceSerializer(item: IspCustomerResource): any { return { tags: item["tags"], location: item["location"], properties: !item["properties"] ? item["properties"] - : cacheNodePropertySerializer(item["properties"]), + : customerPropertySerializer(item["properties"]), }; } -export function enterpriseMccCacheNodeResourceDeserializer( - item: any, -): EnterpriseMccCacheNodeResource { +export function ispCustomerResourceDeserializer(item: any): IspCustomerResource { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -33,54 +214,46 @@ export function enterpriseMccCacheNodeResourceDeserializer( : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodePropertyDeserializer(item["properties"]), + : customerPropertyDeserializer(item["properties"]), }; } -/** Model representing an Mcc cache node connectedCache resource */ -export interface CacheNodeProperty { +/** Model representing customer for connectedCache resource */ +export interface CustomerProperty { /** The provisioned state of the resource */ readonly provisioningState?: ProvisioningState; - /** Mcc cache node resource (cache node entity). */ - cacheNode?: CacheNodeEntity; - /** Mcc cache node resource additional properties. */ - additionalCacheNodeProperties?: AdditionalCacheNodeProperties; + /** Mcc customer resource (customer entity). */ + customer?: CustomerEntity; + /** Mcc customer resource additional properties. */ + additionalCustomerProperties?: AdditionalCustomerProperties; /** Mcc response status code. */ - statusCode?: string; + readonly statusCode?: string; /** Mcc response status text as string for retrieving status details. */ - statusText?: string; + readonly statusText?: string; /** Mcc response status details for retrieving response inner details. */ - statusDetails?: string; + readonly statusDetails?: string; /** HTTP error status code. */ readonly status?: string; /** Mcc response error details. */ - error?: ErrorDetail; + readonly error?: ErrorDetail; } -export function cacheNodePropertySerializer(item: CacheNodeProperty): any { +export function customerPropertySerializer(item: CustomerProperty): any { return { - cacheNode: !item["cacheNode"] - ? item["cacheNode"] - : cacheNodeEntitySerializer(item["cacheNode"]), - additionalCacheNodeProperties: !item["additionalCacheNodeProperties"] - ? item["additionalCacheNodeProperties"] - : additionalCacheNodePropertiesSerializer(item["additionalCacheNodeProperties"]), - statusCode: item["statusCode"], - statusText: item["statusText"], - statusDetails: item["statusDetails"], - error: !item["error"] ? item["error"] : errorDetailSerializer(item["error"]), + customer: !item["customer"] ? item["customer"] : customerEntitySerializer(item["customer"]), + additionalCustomerProperties: !item["additionalCustomerProperties"] + ? item["additionalCustomerProperties"] + : additionalCustomerPropertiesSerializer(item["additionalCustomerProperties"]), }; } -export function cacheNodePropertyDeserializer(item: any): CacheNodeProperty { +export function customerPropertyDeserializer(item: any): CustomerProperty { return { provisioningState: item["provisioningState"], - cacheNode: !item["cacheNode"] - ? item["cacheNode"] - : cacheNodeEntityDeserializer(item["cacheNode"]), - additionalCacheNodeProperties: !item["additionalCacheNodeProperties"] - ? item["additionalCacheNodeProperties"] - : additionalCacheNodePropertiesDeserializer(item["additionalCacheNodeProperties"]), + customer: !item["customer"] ? item["customer"] : customerEntityDeserializer(item["customer"]), + additionalCustomerProperties: !item["additionalCustomerProperties"] + ? item["additionalCustomerProperties"] + : additionalCustomerPropertiesDeserializer(item["additionalCustomerProperties"]), statusCode: item["statusCode"], statusText: item["statusText"], statusDetails: item["statusDetails"], @@ -122,366 +295,165 @@ export enum KnownProvisioningState { */ export type ProvisioningState = string; -/** Model representing Cache Node for ConnectedCache resource */ -export interface CacheNodeEntity { - /** Cache node resource Azure fully qualified resource Id. */ +/** Model representing Customer resource for ConnectedCache resource */ +export interface CustomerEntity { + /** Customer resource Azure fully qualified resource Id. */ fullyQualifiedResourceId?: string; - /** Cache node resource customer resource GUID Id. */ + /** Customer resource Guid Id. */ readonly customerId?: string; - /** Cache node resource customer resource name. */ + /** Customer resource name. */ customerName?: string; - /** Cache node resource Ip address. */ - ipAddress?: string; - /** Cache node resource customer index as string. */ - customerIndex?: string; - /** Cache node resource identifier of the cache node */ - cacheNodeId?: string; - /** Cache node resource name. */ - cacheNodeName?: string; - /** Cache node resource customer resource Asn (autonomous system number) */ - customerAsn?: number; - /** Cache node resource flag for indicating if cache node is enabled. */ - isEnabled?: boolean; - /** Cache node resource maximum allowed egress in Mbps. */ - maxAllowableEgressInMbps?: number; - /** Cache node resource maximum allowed probability of egress. */ - readonly maxAllowableProbability?: number; - /** Cache node resource Azure XCid. */ - readonly xCid?: string; - /** Cache node resource flag for determining if managed by enterprise as boolean. */ - isEnterpriseManaged?: boolean; - /** Cache node resource create async operation Id. */ + /** Customer resource contact email. */ + contactEmail?: string; + /** Customer resource contact phone. */ + contactPhone?: string; + /** Customer resource contact full name. */ + contactName?: string; + /** Customer resource entitlement flag as boolean. */ + isEntitled?: boolean; + /** Customer resource Mcc release version. */ + releaseVersion?: number; + /** Customer resource create async operation Id. */ readonly createAsyncOperationId?: string; - /** Cache node resource deletion async operation Id. */ + /** Customer resource deletion async operation Id. */ readonly deleteAsyncOperationId?: string; - /** Cache node resource customer resource client tenant Id of subscription. */ - readonly clientTenantId?: string; - /** Cache node resource category. */ - readonly category?: string; - /** Cache node resource release version. */ - readonly releaseVersion?: number; - /** Cache node resource last sync timestamp. */ - readonly lastSyncWithAzureTimestamp?: Date; - /** Cache node resource last backend updated timestamp. */ - readonly lastUpdatedTimestamp?: Date; - /** Cache node resource attempts to sync with Azure. */ + /** Customer resource client tenant Id of subscription. */ + clientTenantId?: string; + /** Customer resource sync attempts. */ readonly synchWithAzureAttemptsCount?: number; - /** Cache node resource container configuration details. */ - readonly containerConfigurations?: string; - /** Cache node resource comma separated values of Cidrs. */ - cidrCsv?: string[]; - /** Cache node resource last Cidr Csv update timestamp */ - readonly cidrCsvLastUpdateTime?: Date; - /** Cache node resource last Bgp Cidr Csv update timestamp */ - readonly bgpCidrCsvLastUpdateTime?: Date; - /** Cache node resource last Bgp report timestamp. */ - readonly bgpLastReportedTime?: Date; - /** Cache node resource Bgp review state string text in detail. */ - readonly bgpReviewStateText?: string; - /** Cache node resource Bgp review state string text. */ - readonly bgpReviewState?: BgpReviewStateEnum; - /** Cache node resource Bgp review feedback text. */ - readonly bgpReviewFeedback?: string; - /** Cache node resource Bgp update count. */ - readonly bgpNumberOfTimesUpdated?: number; - /** Cache node resource Bgp record count. */ - readonly bgpNumberOfRecords?: number; - /** Cache node resource Bgp block count. */ - readonly bgpCidrBlocksCount?: number; - /** Cache node resource total addressable space defined by Bgp and Cidr Csv blocks. */ - readonly bgpAddressSpace?: number; - /** Cache node resource flag for determining if customer will be migrated. */ + /** Customer resource last Azure sync timestamp. */ + readonly lastSyncWithAzureTimestamp?: Date; + /** Customer resource flag for enterprise management as boolean. */ + isEnterpriseManaged?: boolean; + /** Customer resource flag for migration. */ shouldMigrate?: boolean; - /** Cache node resource bytes truncated from Bgp output file. */ - readonly bgpFileBytesTruncated?: number; - /** Cache node resource current Cidr range precedence selection type. */ - cidrSelectionType?: number; - /** Cache node resource flag for indicating the cache node resource is frozen (not selectable, not editable in UI). */ - readonly isFrozen?: boolean; - /** Cache node resource review process state as integer */ - readonly reviewState?: number; - /** Cache node resource review state text. */ - readonly reviewStateText?: string; - /** Cache node resource review feedback text. */ - readonly reviewFeedback?: string; - /** Cache node resource configuration state. */ - readonly configurationState?: ConfigurationState; - /** Cache node resource configuration state text. */ - readonly configurationStateText?: string; - /** Cache node resource total addressable space defined by the Cidr Csv block. */ - readonly addressSpace?: number; - /** Cache node resource Mcc container deployment worker connection count. */ - readonly workerConnections?: number; - /** Cache node resource last updated Mcc container deployment worker connection count timestamp. */ - readonly workerConnectionsLastUpdatedDateTime?: Date; - /** Cache node resource Mcc container configuration details re-sync trigger. */ - readonly containerResyncTrigger?: number; - /** Cache node resource Mcc Container Id Uri. */ - readonly imageUri?: string; - /** FQDN(fully qualified domain name) value of the mcc cache node */ - fullyQualifiedDomainName?: string; - /** Auto Update Ring Type which is slow or fast etc. */ - autoUpdateRingType?: AutoUpdateRingType; - /** Customer requested week of month for mcc install of auto update cycle */ - autoUpdateRequestedWeek?: number; - /** Customer requested day of week for mcc install of auto update cycle */ - autoUpdateRequestedDay?: number; - /** Customer requested time of the day for mcc install of auto update cycle, should be hh:mm */ - autoUpdateRequestedTime?: string; + /** Customer resource flag for resending signup code as boolean. */ + resendSignupCode?: boolean; + /** Customer resource flag for requiring verification of signup code as boolean. */ + verifySignupCode?: boolean; + /** Customer resource phrase for verifying signup. */ + verifySignupPhrase?: string; } -export function cacheNodeEntitySerializer(item: CacheNodeEntity): any { +export function customerEntitySerializer(item: CustomerEntity): any { return { fullyQualifiedResourceId: item["fullyQualifiedResourceId"], customerName: item["customerName"], - ipAddress: item["ipAddress"], - customerIndex: item["customerIndex"], - cacheNodeId: item["cacheNodeId"], - cacheNodeName: item["cacheNodeName"], - customerAsn: item["customerAsn"], - isEnabled: item["isEnabled"], - maxAllowableEgressInMbps: item["maxAllowableEgressInMbps"], + contactEmail: item["contactEmail"], + contactPhone: item["contactPhone"], + contactName: item["contactName"], + isEntitled: item["isEntitled"], + releaseVersion: item["releaseVersion"], + clientTenantId: item["clientTenantId"], isEnterpriseManaged: item["isEnterpriseManaged"], - cidrCsv: !item["cidrCsv"] - ? item["cidrCsv"] - : item["cidrCsv"].map((p: any) => { - return p; - }), shouldMigrate: item["shouldMigrate"], - cidrSelectionType: item["cidrSelectionType"], - fullyQualifiedDomainName: item["fullyQualifiedDomainName"], - autoUpdateRingType: item["autoUpdateRingType"], - autoUpdateRequestedWeek: item["autoUpdateRequestedWeek"], - autoUpdateRequestedDay: item["autoUpdateRequestedDay"], - autoUpdateRequestedTime: item["autoUpdateRequestedTime"], + resendSignupCode: item["resendSignupCode"], + verifySignupCode: item["verifySignupCode"], + verifySignupPhrase: item["verifySignupPhrase"], }; } -export function cacheNodeEntityDeserializer(item: any): CacheNodeEntity { +export function customerEntityDeserializer(item: any): CustomerEntity { return { fullyQualifiedResourceId: item["fullyQualifiedResourceId"], customerId: item["customerId"], customerName: item["customerName"], - ipAddress: item["ipAddress"], - customerIndex: item["customerIndex"], - cacheNodeId: item["cacheNodeId"], - cacheNodeName: item["cacheNodeName"], - customerAsn: item["customerAsn"], - isEnabled: item["isEnabled"], - maxAllowableEgressInMbps: item["maxAllowableEgressInMbps"], - maxAllowableProbability: item["maxAllowableProbability"], - xCid: item["xCid"], - isEnterpriseManaged: item["isEnterpriseManaged"], + contactEmail: item["contactEmail"], + contactPhone: item["contactPhone"], + contactName: item["contactName"], + isEntitled: item["isEntitled"], + releaseVersion: item["releaseVersion"], createAsyncOperationId: item["createAsyncOperationId"], deleteAsyncOperationId: item["deleteAsyncOperationId"], clientTenantId: item["clientTenantId"], - category: item["category"], - releaseVersion: item["releaseVersion"], + synchWithAzureAttemptsCount: item["synchWithAzureAttemptsCount"], lastSyncWithAzureTimestamp: !item["lastSyncWithAzureTimestamp"] ? item["lastSyncWithAzureTimestamp"] : new Date(item["lastSyncWithAzureTimestamp"]), - lastUpdatedTimestamp: !item["lastUpdatedTimestamp"] - ? item["lastUpdatedTimestamp"] - : new Date(item["lastUpdatedTimestamp"]), - synchWithAzureAttemptsCount: item["synchWithAzureAttemptsCount"], - containerConfigurations: item["containerConfigurations"], - cidrCsv: !item["cidrCsv"] - ? item["cidrCsv"] - : item["cidrCsv"].map((p: any) => { - return p; - }), - cidrCsvLastUpdateTime: !item["cidrCsvLastUpdateTime"] - ? item["cidrCsvLastUpdateTime"] - : new Date(item["cidrCsvLastUpdateTime"]), - bgpCidrCsvLastUpdateTime: !item["bgpCidrCsvLastUpdateTime"] - ? item["bgpCidrCsvLastUpdateTime"] - : new Date(item["bgpCidrCsvLastUpdateTime"]), - bgpLastReportedTime: !item["bgpLastReportedTime"] - ? item["bgpLastReportedTime"] - : new Date(item["bgpLastReportedTime"]), - bgpReviewStateText: item["bgpReviewStateText"], - bgpReviewState: item["bgpReviewState"], - bgpReviewFeedback: item["bgpReviewFeedback"], - bgpNumberOfTimesUpdated: item["bgpNumberOfTimesUpdated"], - bgpNumberOfRecords: item["bgpNumberOfRecords"], - bgpCidrBlocksCount: item["bgpCidrBlocksCount"], - bgpAddressSpace: item["bgpAddressSpace"], + isEnterpriseManaged: item["isEnterpriseManaged"], shouldMigrate: item["shouldMigrate"], - bgpFileBytesTruncated: item["bgpFileBytesTruncated"], - cidrSelectionType: item["cidrSelectionType"], - isFrozen: item["isFrozen"], - reviewState: item["reviewState"], - reviewStateText: item["reviewStateText"], - reviewFeedback: item["reviewFeedback"], - configurationState: item["configurationState"], - configurationStateText: item["configurationStateText"], - addressSpace: item["addressSpace"], - workerConnections: item["workerConnections"], - workerConnectionsLastUpdatedDateTime: !item["workerConnectionsLastUpdatedDateTime"] - ? item["workerConnectionsLastUpdatedDateTime"] - : new Date(item["workerConnectionsLastUpdatedDateTime"]), - containerResyncTrigger: item["containerResyncTrigger"], - imageUri: item["imageUri"], - fullyQualifiedDomainName: item["fullyQualifiedDomainName"], - autoUpdateRingType: item["autoUpdateRingType"], - autoUpdateRequestedWeek: item["autoUpdateRequestedWeek"], - autoUpdateRequestedDay: item["autoUpdateRequestedDay"], - autoUpdateRequestedTime: item["autoUpdateRequestedTime"], + resendSignupCode: item["resendSignupCode"], + verifySignupCode: item["verifySignupCode"], + verifySignupPhrase: item["verifySignupPhrase"], }; } -/** Cache node resource Bgp review state as integer */ -export enum KnownBgpReviewStateEnum { - /** bgp not configured */ - NotConfigured = "NotConfigured", - /** bgp is in review state */ - InReview = "InReview", - /** bgp is in Approved state */ - Approved = "Approved", - /** bgp is setup need an attention for more troubleshoot */ - AttentionRequired = "AttentionRequired", -} - -/** - * Cache node resource Bgp review state as integer \ - * {@link KnownBgpReviewStateEnum} can be used interchangeably with BgpReviewStateEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotConfigured**: bgp not configured \ - * **InReview**: bgp is in review state \ - * **Approved**: bgp is in Approved state \ - * **AttentionRequired**: bgp is setup need an attention for more troubleshoot - */ -export type BgpReviewStateEnum = string; - -/** Cache node configuration setup state */ -export enum KnownConfigurationState { - /** connected cache setup configured */ - Configured = "Configured", - /** connected cache setup not configured */ - NotConfigured_Ip = "NotConfigured_Ip", -} - -/** - * Cache node configuration setup state \ - * {@link KnownConfigurationState} can be used interchangeably with ConfigurationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Configured**: connected cache setup configured \ - * **NotConfigured_Ip**: connected cache setup not configured - */ -export type ConfigurationState = string; - -/** Auto update Ring type */ -export enum KnownAutoUpdateRingType { - /** customer selection of preview update install mcc on their physical vm */ - Preview = "Preview", - /** customer selection of slow update to install mcc on their physical vm */ - Slow = "Slow", - /** customer selection of fast / auto update to install mcc on their physical vm */ - Fast = "Fast", -} - -/** - * Auto update Ring type \ - * {@link KnownautoUpdateRingType} can be used interchangeably with autoUpdateRingType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preview**: customer selection of preview update install mcc on their physical vm \ - * **Slow**: customer selection of slow update to install mcc on their physical vm \ - * **Fast**: customer selection of fast \/ auto update to install mcc on their physical vm - */ -export type AutoUpdateRingType = string; - -/** Model representing cache node for connected cache resource */ -export interface AdditionalCacheNodeProperties { - /** issues list to return the issues as part of the additional cache node properties */ - cacheNodePropertiesDetailsIssuesList?: string[]; - /** Cache node resource aggregated status details. */ - readonly aggregatedStatusDetails?: string; - /** Cache node resource aggregated status text. */ - readonly aggregatedStatusText?: string; - /** Cache node resource aggregated status code. */ - readonly aggregatedStatusCode?: number; - /** Cache node resource Mcc product version. */ - readonly productVersion?: string; - /** Cache node resource flag indicating if cache node has been physically installed or provisioned on their physical lab. */ - readonly isProvisioned?: boolean; - /** Cache node resource detailed state text. */ - readonly cacheNodeStateDetailedText?: string; - /** Cache node resource short state text. */ - readonly cacheNodeStateShortText?: string; - /** Cache node resource state as integer. */ - readonly cacheNodeState?: number; - /** Cache node resource drive configurations. */ - driveConfiguration?: CacheNodeDriveConfiguration[]; - /** Cache node resource Bgp configuration. */ - bgpConfiguration?: BgpConfiguration; - /** proxyUrl configuration of the cache node */ - proxyUrlConfiguration?: ProxyUrlConfiguration; - /** Cache node resource Mcc proxy Url */ - proxyUrl?: string; - /** Cache node resource requires a proxy */ - isProxyRequired?: ProxyRequired; - /** Operating system of the cache node */ - osType?: OsType; - /** Update Cycle Type */ - updateCycleType?: CycleType; - /** Auto update or fast update version */ - autoUpdateVersion?: string; - /** Update related information details */ - updateInfoDetails?: string; - /** customer requested date time for mcc install of update cycle */ - updateRequestedDateTime?: Date; - /** Auto update version that is the Next available version to update on mcc cache node */ - readonly autoUpdateNextAvailableVersion?: string; - /** Auto update last applied date time of mcc install */ - readonly autoUpdateNextAvailableDateTime?: Date; - /** Auto update version that is the applied to update on mcc cache node */ - readonly autoUpdateAppliedVersion?: string; - /** Auto Update status details from the backend after applying the new version details */ - readonly autoUpdateLastAppliedDetails?: string; - /** Last applied auto update state for mcc install of auto update cycle */ - readonly autoUpdateLastAppliedState?: string; - /** Auto update last applied date time of mcc install */ - readonly autoUpdateLastAppliedDateTime?: Date; - /** Auto update last triggered date time of mcc install */ - readonly autoUpdateLastTriggeredDateTime?: Date; - /** Optional property #1 of Mcc response object */ +/** Model representing customer for connected cache resource */ +export interface AdditionalCustomerProperties { + /** Customer resource cache efficiency. */ + readonly customerPropertiesOverviewCacheEfficiency?: number; + /** Customer resource average egress in Mbps. */ + readonly customerPropertiesOverviewAverageEgressMbps?: number; + /** Customer resource average cache miss throughput in Mbps. */ + readonly customerPropertiesOverviewAverageMissMbps?: number; + /** Customer resource maximum egress in Mbps. */ + readonly customerPropertiesOverviewEgressMbpsMax?: number; + /** Customer resource peak egress timestamp. */ + readonly customerPropertiesOverviewEgressMbpsMaxDateTime?: Date; + /** Customer resource maximum cache miss throughput in Mbps. */ + readonly customerPropertiesOverviewMissMbpsMax?: number; + /** Customer resource peak cache miss throughput timestamp. */ + readonly customerPropertiesOverviewMissMbpsMaxDateTime?: Date; + /** Customer resource total healthy cache nodes. */ + readonly customerPropertiesOverviewCacheNodesHealthyCount?: number; + /** Customer resource total unhealthy cache nodes. */ + readonly customerPropertiesOverviewCacheNodesUnhealthyCount?: number; + /** Customer resource signup status as boolean. */ + readonly signupStatus?: boolean; + /** Customer resource signup status as integer code. */ + readonly signupStatusCode?: number; + /** Customer resource signup status as string text. */ + readonly signupStatusText?: string; + /** Customer resource signup phase status code as integer. */ + readonly signupPhaseStatusCode?: number; + /** Customer resource signup phase status as string text. */ + readonly signupPhaseStatusText?: string; + /** Customer resource last PeeringDB update timestamp. */ + readonly peeringDbLastUpdateDate?: Date; + /** Customer resource owner organization name. */ + readonly customerOrgName?: string; + /** Customer resource contact email. */ + customerEmail?: string; + /** Customer resource transit Asn (autonomous system number). */ + customerTransitAsn?: string; + /** Customer resource transit state. */ + customerTransitState?: CustomerTransitState; + /** Customer resource Asn (autonomous system number). */ + customerAsn?: string; + /** Customer resource estimated Asn peering peak in Gbps. */ + readonly customerAsnEstimatedEgressPeekGbps?: number; + /** Customer resource entitlement Sku Id. */ + customerEntitlementSkuId?: string; + /** Customer resource entitlement Sku Guid. */ + customerEntitlementSkuGuid?: string; + /** Customer resource entitlement Sku name. */ + customerEntitlementSkuName?: string; + /** Customer resource entitlement expiration date string. */ + customerEntitlementExpiration?: Date; + /** Optional property #1 of Mcc response object. */ optionalProperty1?: string; - /** Optional property #2 of Mcc response object */ + /** Optional property #2 of Mcc response object. */ optionalProperty2?: string; - /** Optional property #3 of Mcc response object */ + /** Optional property #3 of Mcc response object. */ optionalProperty3?: string; - /** Optional property #4 of Mcc response object */ + /** Optional property #4 of Mcc response object. */ optionalProperty4?: string; - /** Optional property #5 of Mcc response object */ + /** Optional property #5 of Mcc response object. */ optionalProperty5?: string; } -export function additionalCacheNodePropertiesSerializer(item: AdditionalCacheNodeProperties): any { +export function additionalCustomerPropertiesSerializer(item: AdditionalCustomerProperties): any { return { - cacheNodePropertiesDetailsIssuesList: !item["cacheNodePropertiesDetailsIssuesList"] - ? item["cacheNodePropertiesDetailsIssuesList"] - : item["cacheNodePropertiesDetailsIssuesList"].map((p: any) => { - return p; - }), - driveConfiguration: !item["driveConfiguration"] - ? item["driveConfiguration"] - : cacheNodeDriveConfigurationArraySerializer(item["driveConfiguration"]), - bgpConfiguration: !item["bgpConfiguration"] - ? item["bgpConfiguration"] - : bgpConfigurationSerializer(item["bgpConfiguration"]), - proxyUrlConfiguration: !item["proxyUrlConfiguration"] - ? item["proxyUrlConfiguration"] - : proxyUrlConfigurationSerializer(item["proxyUrlConfiguration"]), - proxyUrl: item["proxyUrl"], - isProxyRequired: item["isProxyRequired"], - osType: item["osType"], - updateCycleType: item["updateCycleType"], - autoUpdateVersion: item["autoUpdateVersion"], - updateInfoDetails: item["updateInfoDetails"], - updateRequestedDateTime: item["updateRequestedDateTime"]?.toISOString(), + customerEmail: item["customerEmail"], + customerTransitAsn: item["customerTransitAsn"], + customerTransitState: item["customerTransitState"], + customerAsn: item["customerAsn"], + customerEntitlementSkuId: item["customerEntitlementSkuId"], + customerEntitlementSkuGuid: item["customerEntitlementSkuGuid"], + customerEntitlementSkuName: item["customerEntitlementSkuName"], + customerEntitlementExpiration: !item["customerEntitlementExpiration"] + ? item["customerEntitlementExpiration"] + : item["customerEntitlementExpiration"].toISOString(), optionalProperty1: item["optionalProperty1"], optionalProperty2: item["optionalProperty2"], optionalProperty3: item["optionalProperty3"], @@ -490,54 +462,48 @@ export function additionalCacheNodePropertiesSerializer(item: AdditionalCacheNod }; } -export function additionalCacheNodePropertiesDeserializer( - item: any, -): AdditionalCacheNodeProperties { +export function additionalCustomerPropertiesDeserializer(item: any): AdditionalCustomerProperties { return { - cacheNodePropertiesDetailsIssuesList: !item["cacheNodePropertiesDetailsIssuesList"] - ? item["cacheNodePropertiesDetailsIssuesList"] - : item["cacheNodePropertiesDetailsIssuesList"].map((p: any) => { - return p; - }), - aggregatedStatusDetails: item["aggregatedStatusDetails"], - aggregatedStatusText: item["aggregatedStatusText"], - aggregatedStatusCode: item["aggregatedStatusCode"], - productVersion: item["productVersion"], - isProvisioned: item["isProvisioned"], - cacheNodeStateDetailedText: item["cacheNodeStateDetailedText"], - cacheNodeStateShortText: item["cacheNodeStateShortText"], - cacheNodeState: item["cacheNodeState"], - driveConfiguration: !item["driveConfiguration"] - ? item["driveConfiguration"] - : cacheNodeDriveConfigurationArrayDeserializer(item["driveConfiguration"]), - bgpConfiguration: !item["bgpConfiguration"] - ? item["bgpConfiguration"] - : bgpConfigurationDeserializer(item["bgpConfiguration"]), - proxyUrlConfiguration: !item["proxyUrlConfiguration"] - ? item["proxyUrlConfiguration"] - : proxyUrlConfigurationDeserializer(item["proxyUrlConfiguration"]), - proxyUrl: item["proxyUrl"], - isProxyRequired: item["isProxyRequired"], - osType: item["osType"], - updateCycleType: item["updateCycleType"], - autoUpdateVersion: item["autoUpdateVersion"], - updateInfoDetails: item["updateInfoDetails"], - updateRequestedDateTime: !item["updateRequestedDateTime"] - ? item["updateRequestedDateTime"] - : new Date(item["updateRequestedDateTime"]), - autoUpdateNextAvailableVersion: item["autoUpdateNextAvailableVersion"], - autoUpdateNextAvailableDateTime: !item["autoUpdateNextAvailableDateTime"] - ? item["autoUpdateNextAvailableDateTime"] - : new Date(item["autoUpdateNextAvailableDateTime"]), - autoUpdateAppliedVersion: item["autoUpdateAppliedVersion"], - autoUpdateLastAppliedDetails: item["autoUpdateLastAppliedDetails"], - autoUpdateLastAppliedState: item["autoUpdateLastAppliedState"], - autoUpdateLastAppliedDateTime: !item["autoUpdateLastAppliedDateTime"] - ? item["autoUpdateLastAppliedDateTime"] - : new Date(item["autoUpdateLastAppliedDateTime"]), - autoUpdateLastTriggeredDateTime: !item["autoUpdateLastTriggeredDateTime"] - ? item["autoUpdateLastTriggeredDateTime"] - : new Date(item["autoUpdateLastTriggeredDateTime"]), + customerPropertiesOverviewCacheEfficiency: item["customerPropertiesOverviewCacheEfficiency"], + customerPropertiesOverviewAverageEgressMbps: + item["customerPropertiesOverviewAverageEgressMbps"], + customerPropertiesOverviewAverageMissMbps: item["customerPropertiesOverviewAverageMissMbps"], + customerPropertiesOverviewEgressMbpsMax: item["customerPropertiesOverviewEgressMbpsMax"], + customerPropertiesOverviewEgressMbpsMaxDateTime: !item[ + "customerPropertiesOverviewEgressMbpsMaxDateTime" + ] + ? item["customerPropertiesOverviewEgressMbpsMaxDateTime"] + : new Date(item["customerPropertiesOverviewEgressMbpsMaxDateTime"]), + customerPropertiesOverviewMissMbpsMax: item["customerPropertiesOverviewMissMbpsMax"], + customerPropertiesOverviewMissMbpsMaxDateTime: !item[ + "customerPropertiesOverviewMissMbpsMaxDateTime" + ] + ? item["customerPropertiesOverviewMissMbpsMaxDateTime"] + : new Date(item["customerPropertiesOverviewMissMbpsMaxDateTime"]), + customerPropertiesOverviewCacheNodesHealthyCount: + item["customerPropertiesOverviewCacheNodesHealthyCount"], + customerPropertiesOverviewCacheNodesUnhealthyCount: + item["customerPropertiesOverviewCacheNodesUnhealthyCount"], + signupStatus: item["signupStatus"], + signupStatusCode: item["signupStatusCode"], + signupStatusText: item["signupStatusText"], + signupPhaseStatusCode: item["signupPhaseStatusCode"], + signupPhaseStatusText: item["signupPhaseStatusText"], + peeringDbLastUpdateDate: !item["peeringDbLastUpdateDate"] + ? item["peeringDbLastUpdateDate"] + : new Date(item["peeringDbLastUpdateDate"]), + customerOrgName: item["customerOrgName"], + customerEmail: item["customerEmail"], + customerTransitAsn: item["customerTransitAsn"], + customerTransitState: item["customerTransitState"], + customerAsn: item["customerAsn"], + customerAsnEstimatedEgressPeekGbps: item["customerAsnEstimatedEgressPeekGbps"], + customerEntitlementSkuId: item["customerEntitlementSkuId"], + customerEntitlementSkuGuid: item["customerEntitlementSkuGuid"], + customerEntitlementSkuName: item["customerEntitlementSkuName"], + customerEntitlementExpiration: !item["customerEntitlementExpiration"] + ? item["customerEntitlementExpiration"] + : new Date(item["customerEntitlementExpiration"]), optionalProperty1: item["optionalProperty1"], optionalProperty2: item["optionalProperty2"], optionalProperty3: item["optionalProperty3"], @@ -546,213 +512,26 @@ export function additionalCacheNodePropertiesDeserializer( }; } -export function cacheNodeDriveConfigurationArraySerializer( - result: Array, -): any[] { - return result.map((item) => { - return cacheNodeDriveConfigurationSerializer(item); - }); -} - -export function cacheNodeDriveConfigurationArrayDeserializer( - result: Array, -): any[] { - return result.map((item) => { - return cacheNodeDriveConfigurationDeserializer(item); - }); -} - -/** Drive configuration for cache node */ -export interface CacheNodeDriveConfiguration { - /** physical path location of the folder used for caching content */ - physicalPath?: string; - /** physical size of the drive used for caching content */ - sizeInGb?: number; - /** corresponding nginx cache number. Valid cache numbers are 1 - 20 */ - cacheNumber?: number; - /** full binding for corresponding nginx cache drive */ - nginxMapping?: string; -} - -export function cacheNodeDriveConfigurationSerializer(item: CacheNodeDriveConfiguration): any { - return { - physicalPath: item["physicalPath"], - sizeInGb: item["sizeInGb"], - cacheNumber: item["cacheNumber"], - nginxMapping: item["nginxMapping"], - }; -} - -export function cacheNodeDriveConfigurationDeserializer(item: any): CacheNodeDriveConfiguration { - return { - physicalPath: item["physicalPath"], - sizeInGb: item["sizeInGb"], - cacheNumber: item["cacheNumber"], - nginxMapping: item["nginxMapping"], - }; -} - -/** Bgp configuration of cache node */ -export interface BgpConfiguration { - /** Asn to ip address mapping */ - asnToIpAddressMapping?: string; -} - -export function bgpConfigurationSerializer(item: BgpConfiguration): any { - return { asnToIpAddressMapping: item["asnToIpAddressMapping"] }; -} - -export function bgpConfigurationDeserializer(item: any): BgpConfiguration { - return { - asnToIpAddressMapping: item["asnToIpAddressMapping"], - }; -} - -/** ProxyUrl configuration of cache node */ -export interface ProxyUrlConfiguration { - /** Host Proxy Address configuration along with port number. This can be a proxy or ip address. ex: xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80 */ - proxyUrl?: string; -} - -export function proxyUrlConfigurationSerializer(item: ProxyUrlConfiguration): any { - return { proxyUrl: item["proxyUrl"] }; -} - -export function proxyUrlConfigurationDeserializer(item: any): ProxyUrlConfiguration { - return { - proxyUrl: item["proxyUrl"], - }; -} - -/** Proxy details enum */ -export enum KnownProxyRequired { - /** Proxy is not required in setup */ - None = "None", - /** proxy is required in setup */ - Required = "Required", -} - -/** - * Proxy details enum \ - * {@link KnownProxyRequired} can be used interchangeably with ProxyRequired, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: Proxy is not required in setup \ - * **Required**: proxy is required in setup - */ -export type ProxyRequired = string; - -/** Operating System of the cache node */ -export enum KnownOsType { - /** cache node installs on windows operating system */ - Windows = "Windows", - /** cache node installs on Linux Operating system */ - Linux = "Linux", - /** cache node installs on Azure Eflow */ - Eflow = "Eflow", -} - -/** - * Operating System of the cache node \ - * {@link KnownOsType} can be used interchangeably with OsType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows**: cache node installs on windows operating system \ - * **Linux**: cache node installs on Linux Operating system \ - * **Eflow**: cache node installs on Azure Eflow - */ -export type OsType = string; - -/** Update Cycle type */ -export enum KnownCycleType { - /** customer selection of preview update install mcc on their physical vm */ - Preview = "Preview", - /** customer selection of slow update to install mcc on their physical vm */ - Slow = "Slow", - /** customer selection of fast / auto update to install mcc on their physical vm */ - Fast = "Fast", +/** Customer resource transit states */ +export enum KnownCustomerTransitState { + /** do not have transit */ + NoTransit = "NoTransit", + /** transit provider and have own subscribers */ + CombinedTransit = "CombinedTransit", + /** pure transit provider or network service provider */ + TransitOnly = "TransitOnly", } /** - * Update Cycle type \ - * {@link KnownCycleType} can be used interchangeably with CycleType, + * Customer resource transit states \ + * {@link KnownCustomerTransitState} can be used interchangeably with CustomerTransitState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Preview**: customer selection of preview update install mcc on their physical vm \ - * **Slow**: customer selection of slow update to install mcc on their physical vm \ - * **Fast**: customer selection of fast \/ auto update to install mcc on their physical vm + * **NoTransit**: do not have transit \ + * **CombinedTransit**: transit provider and have own subscribers \ + * **TransitOnly**: pure transit provider or network service provider */ -export type CycleType = string; - -/** 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 errorDetailSerializer(item: ErrorDetail): any { - return item; -} - -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 errorDetailArraySerializer(result: Array): any[] { - return result.map((item) => { - return errorDetailSerializer(item); - }); -} - -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; -} +export type CustomerTransitState = 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 { @@ -774,7 +553,9 @@ export function trackedResourceDeserializer(item: any): TrackedResource { systemData: !item["systemData"] ? item["systemData"] : systemDataDeserializer(item["systemData"]), - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], }; } @@ -849,7 +630,7 @@ export enum KnownCreatedByType { /** * The kind of entity that created the resource. \ - * {@link KnowncreatedByType} can be used interchangeably with 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**: The entity was created by a user. \ @@ -869,49 +650,57 @@ export function connectedCachePatchResourceSerializer(item: ConnectedCachePatchR return { tags: item["tags"] }; } -/** The response of a EnterpriseMccCacheNodeResource list operation. */ -export interface _EnterpriseMccCacheNodeResourceListResult { - /** The EnterpriseMccCacheNodeResource items on this page */ - value: EnterpriseMccCacheNodeResource[]; +/** The response of a IspCustomerResource list operation. */ +export interface _IspCustomerResourceListResult { + /** The IspCustomerResource items on this page */ + value: IspCustomerResource[]; /** The link to the next page of items */ nextLink?: string; } -export function _enterpriseMccCacheNodeResourceListResultDeserializer( +export function _ispCustomerResourceListResultDeserializer( item: any, -): _EnterpriseMccCacheNodeResourceListResult { +): _IspCustomerResourceListResult { return { - value: enterpriseMccCacheNodeResourceArrayDeserializer(item["value"]), + value: ispCustomerResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function enterpriseMccCacheNodeResourceArraySerializer( - result: Array, -): any[] { +export function ispCustomerResourceArraySerializer(result: Array): any[] { return result.map((item) => { - return enterpriseMccCacheNodeResourceSerializer(item); + return ispCustomerResourceSerializer(item); }); } -export function enterpriseMccCacheNodeResourceArrayDeserializer( - result: Array, -): any[] { +export function ispCustomerResourceArrayDeserializer(result: Array): any[] { return result.map((item) => { - return enterpriseMccCacheNodeResourceDeserializer(item); + return ispCustomerResourceDeserializer(item); }); } -/** Mcc cache node resource all install details. */ -export interface MccCacheNodeInstallDetails extends TrackedResource { - /** Mcc cache node resource install script details. */ - properties?: CacheNodeInstallProperties; +/** Represents the high level Nodes needed to provision cache node resources */ +export interface IspCacheNodeResource extends TrackedResource { + /** The resource-specific properties for this resource. */ + properties?: CacheNodeProperty; } -export function mccCacheNodeInstallDetailsDeserializer(item: any): MccCacheNodeInstallDetails { +export function ispCacheNodeResourceSerializer(item: IspCacheNodeResource): any { return { tags: item["tags"], location: item["location"], + properties: !item["properties"] + ? item["properties"] + : cacheNodePropertySerializer(item["properties"]), + }; +} + +export function ispCacheNodeResourceDeserializer(item: any): IspCacheNodeResource { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], id: item["id"], name: item["name"], type: item["type"], @@ -920,104 +709,54 @@ export function mccCacheNodeInstallDetailsDeserializer(item: any): MccCacheNodeI : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodeInstallPropertiesDeserializer(item["properties"]), + : cacheNodePropertyDeserializer(item["properties"]), }; } -/** Mcc cache node resource install script properties. */ -export interface CacheNodeInstallProperties { - /** Mcc customer resource Id. */ - customerId?: string; - /** Mcc cache node resource Id. */ - cacheNodeId?: string; - /** Mcc primary account key. Internal to Mcc. */ - readonly primaryAccountKey?: string; - /** Mcc secondary account key. Internal to Mcc. */ - readonly secondaryAccountKey?: string; - /** Mcc Iot Central temporary device registration key, used once. */ - readonly registrationKey?: string; -} - -export function cacheNodeInstallPropertiesDeserializer(item: any): CacheNodeInstallProperties { - return { - customerId: item["customerId"], - cacheNodeId: item["cacheNodeId"], - primaryAccountKey: item["primaryAccountKey"], - secondaryAccountKey: item["secondaryAccountKey"], - registrationKey: item["registrationKey"], - }; -} - -/** Represents the high level Nodes needed to provision customer resources */ -export interface EnterpriseMccCustomerResource extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: CustomerProperty; -} - -export function enterpriseMccCustomerResourceSerializer(item: EnterpriseMccCustomerResource): any { - return { - tags: item["tags"], - location: item["location"], - properties: !item["properties"] - ? item["properties"] - : customerPropertySerializer(item["properties"]), - }; -} - -export function enterpriseMccCustomerResourceDeserializer( - item: any, -): EnterpriseMccCustomerResource { - 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"] - : customerPropertyDeserializer(item["properties"]), - }; -} - -/** Model representing customer for connectedCache resource */ -export interface CustomerProperty { +/** Model representing an Mcc cache node connectedCache resource */ +export interface CacheNodeProperty { /** The provisioned state of the resource */ readonly provisioningState?: ProvisioningState; - /** Mcc customer resource (customer entity). */ - customer?: CustomerEntity; - /** Mcc customer resource additional properties. */ - additionalCustomerProperties?: AdditionalCustomerProperties; + /** Mcc cache node resource (cache node entity). */ + cacheNode?: CacheNodeEntity; + /** Mcc cache node resource additional properties. */ + additionalCacheNodeProperties?: AdditionalCacheNodeProperties; /** Mcc response status code. */ - readonly statusCode?: string; + statusCode?: string; /** Mcc response status text as string for retrieving status details. */ - readonly statusText?: string; + statusText?: string; /** Mcc response status details for retrieving response inner details. */ - readonly statusDetails?: string; + statusDetails?: string; /** HTTP error status code. */ readonly status?: string; /** Mcc response error details. */ - readonly error?: ErrorDetail; + error?: ErrorDetail; } -export function customerPropertySerializer(item: CustomerProperty): any { +export function cacheNodePropertySerializer(item: CacheNodeProperty): any { return { - customer: !item["customer"] ? item["customer"] : customerEntitySerializer(item["customer"]), - additionalCustomerProperties: !item["additionalCustomerProperties"] - ? item["additionalCustomerProperties"] - : additionalCustomerPropertiesSerializer(item["additionalCustomerProperties"]), + cacheNode: !item["cacheNode"] + ? item["cacheNode"] + : cacheNodeEntitySerializer(item["cacheNode"]), + additionalCacheNodeProperties: !item["additionalCacheNodeProperties"] + ? item["additionalCacheNodeProperties"] + : additionalCacheNodePropertiesSerializer(item["additionalCacheNodeProperties"]), + statusCode: item["statusCode"], + statusText: item["statusText"], + statusDetails: item["statusDetails"], + error: !item["error"] ? item["error"] : errorDetailSerializer(item["error"]), }; } -export function customerPropertyDeserializer(item: any): CustomerProperty { +export function cacheNodePropertyDeserializer(item: any): CacheNodeProperty { return { provisioningState: item["provisioningState"], - customer: !item["customer"] ? item["customer"] : customerEntityDeserializer(item["customer"]), - additionalCustomerProperties: !item["additionalCustomerProperties"] - ? item["additionalCustomerProperties"] - : additionalCustomerPropertiesDeserializer(item["additionalCustomerProperties"]), + cacheNode: !item["cacheNode"] + ? item["cacheNode"] + : cacheNodeEntityDeserializer(item["cacheNode"]), + additionalCacheNodeProperties: !item["additionalCacheNodeProperties"] + ? item["additionalCacheNodeProperties"] + : additionalCacheNodePropertiesDeserializer(item["additionalCacheNodeProperties"]), statusCode: item["statusCode"], statusText: item["statusText"], statusDetails: item["statusDetails"], @@ -1026,299 +765,744 @@ export function customerPropertyDeserializer(item: any): CustomerProperty { }; } -/** Model representing Customer resource for ConnectedCache resource */ -export interface CustomerEntity { - /** Customer resource Azure fully qualified resource Id. */ +/** Model representing Cache Node for ConnectedCache resource */ +export interface CacheNodeEntity { + /** Cache node resource Azure fully qualified resource Id. */ fullyQualifiedResourceId?: string; - /** Customer resource Guid Id. */ + /** Cache node resource customer resource GUID Id. */ readonly customerId?: string; - /** Customer resource name. */ + /** Cache node resource customer resource name. */ customerName?: string; - /** Customer resource contact email. */ - contactEmail?: string; - /** Customer resource contact phone. */ - contactPhone?: string; - /** Customer resource contact full name. */ - contactName?: string; - /** Customer resource entitlement flag as boolean. */ - isEntitled?: boolean; - /** Customer resource Mcc release version. */ - releaseVersion?: number; - /** Customer resource create async operation Id. */ + /** Cache node resource Ip address. */ + ipAddress?: string; + /** Cache node resource customer index as string. */ + customerIndex?: string; + /** Cache node resource identifier of the cache node */ + cacheNodeId?: string; + /** Cache node resource name. */ + cacheNodeName?: string; + /** Cache node resource customer resource Asn (autonomous system number) */ + customerAsn?: number; + /** Cache node resource flag for indicating if cache node is enabled. */ + isEnabled?: boolean; + /** Cache node resource maximum allowed egress in Mbps. */ + maxAllowableEgressInMbps?: number; + /** Cache node resource maximum allowed probability of egress. */ + readonly maxAllowableProbability?: number; + /** Cache node resource Azure XCid. */ + readonly xCid?: string; + /** Cache node resource flag for determining if managed by enterprise as boolean. */ + isEnterpriseManaged?: boolean; + /** Cache node resource create async operation Id. */ readonly createAsyncOperationId?: string; - /** Customer resource deletion async operation Id. */ + /** Cache node resource deletion async operation Id. */ readonly deleteAsyncOperationId?: string; - /** Customer resource client tenant Id of subscription. */ - clientTenantId?: string; - /** Customer resource sync attempts. */ - readonly synchWithAzureAttemptsCount?: number; - /** Customer resource last Azure sync timestamp. */ + /** Cache node resource customer resource client tenant Id of subscription. */ + readonly clientTenantId?: string; + /** Cache node resource category. */ + readonly category?: string; + /** Cache node resource release version. */ + readonly releaseVersion?: number; + /** Cache node resource last sync timestamp. */ readonly lastSyncWithAzureTimestamp?: Date; - /** Customer resource flag for enterprise management as boolean. */ - isEnterpriseManaged?: boolean; - /** Customer resource flag for migration. */ + /** Cache node resource last backend updated timestamp. */ + readonly lastUpdatedTimestamp?: Date; + /** Cache node resource attempts to sync with Azure. */ + readonly synchWithAzureAttemptsCount?: number; + /** Cache node resource container configuration details. */ + readonly containerConfigurations?: string; + /** Cache node resource comma separated values of Cidrs. */ + cidrCsv?: string[]; + /** Cache node resource last Cidr Csv update timestamp */ + readonly cidrCsvLastUpdateTime?: Date; + /** Cache node resource last Bgp Cidr Csv update timestamp */ + readonly bgpCidrCsvLastUpdateTime?: Date; + /** Cache node resource last Bgp report timestamp. */ + readonly bgpLastReportedTime?: Date; + /** Cache node resource Bgp review state string text in detail. */ + readonly bgpReviewStateText?: string; + /** Cache node resource Bgp review state string text. */ + readonly bgpReviewState?: BgpReviewStateEnum; + /** Cache node resource Bgp review feedback text. */ + readonly bgpReviewFeedback?: string; + /** Cache node resource Bgp update count. */ + readonly bgpNumberOfTimesUpdated?: number; + /** Cache node resource Bgp record count. */ + readonly bgpNumberOfRecords?: number; + /** Cache node resource Bgp block count. */ + readonly bgpCidrBlocksCount?: number; + /** Cache node resource total addressable space defined by Bgp and Cidr Csv blocks. */ + readonly bgpAddressSpace?: number; + /** Cache node resource flag for determining if customer will be migrated. */ shouldMigrate?: boolean; - /** Customer resource flag for resending signup code as boolean. */ - resendSignupCode?: boolean; - /** Customer resource flag for requiring verification of signup code as boolean. */ - verifySignupCode?: boolean; - /** Customer resource phrase for verifying signup. */ - verifySignupPhrase?: string; + /** Cache node resource bytes truncated from Bgp output file. */ + readonly bgpFileBytesTruncated?: number; + /** Cache node resource current Cidr range precedence selection type. */ + cidrSelectionType?: number; + /** Cache node resource flag for indicating the cache node resource is frozen (not selectable, not editable in UI). */ + readonly isFrozen?: boolean; + /** Cache node resource review process state as integer */ + readonly reviewState?: number; + /** Cache node resource review state text. */ + readonly reviewStateText?: string; + /** Cache node resource review feedback text. */ + readonly reviewFeedback?: string; + /** Cache node resource configuration state. */ + readonly configurationState?: ConfigurationState; + /** Cache node resource configuration state text. */ + readonly configurationStateText?: string; + /** Cache node resource total addressable space defined by the Cidr Csv block. */ + readonly addressSpace?: number; + /** Cache node resource Mcc container deployment worker connection count. */ + readonly workerConnections?: number; + /** Cache node resource last updated Mcc container deployment worker connection count timestamp. */ + readonly workerConnectionsLastUpdatedDateTime?: Date; + /** Cache node resource Mcc container configuration details re-sync trigger. */ + readonly containerResyncTrigger?: number; + /** Cache node resource Mcc Container Id Uri. */ + readonly imageUri?: string; + /** FQDN(fully qualified domain name) value of the mcc cache node */ + fullyQualifiedDomainName?: string; + /** Auto Update Ring Type which is slow or fast etc. */ + autoUpdateRingType?: AutoUpdateRingType; + /** Customer requested week of month for mcc install of auto update cycle. 0 is default no selection. 1-5 are valid weeks of month, 1 is first week, 2 is second week, etc. */ + autoUpdateRequestedWeek?: number; + /** Customer requested day of week for mcc install of auto update cycle. 0 is default no selection. 1-7 are days of week, 1 is Sunday, 2 is Monday, etc. */ + autoUpdateRequestedDay?: number; + /** Customer requested time of the day for mcc install of auto update cycle, should be hh:mm */ + autoUpdateRequestedTime?: string; } -export function customerEntitySerializer(item: CustomerEntity): any { +export function cacheNodeEntitySerializer(item: CacheNodeEntity): any { return { fullyQualifiedResourceId: item["fullyQualifiedResourceId"], customerName: item["customerName"], - contactEmail: item["contactEmail"], - contactPhone: item["contactPhone"], - contactName: item["contactName"], - isEntitled: item["isEntitled"], - releaseVersion: item["releaseVersion"], - clientTenantId: item["clientTenantId"], + ipAddress: item["ipAddress"], + customerIndex: item["customerIndex"], + cacheNodeId: item["cacheNodeId"], + cacheNodeName: item["cacheNodeName"], + customerAsn: item["customerAsn"], + isEnabled: item["isEnabled"], + maxAllowableEgressInMbps: item["maxAllowableEgressInMbps"], isEnterpriseManaged: item["isEnterpriseManaged"], + cidrCsv: !item["cidrCsv"] + ? item["cidrCsv"] + : item["cidrCsv"].map((p: any) => { + return p; + }), shouldMigrate: item["shouldMigrate"], - resendSignupCode: item["resendSignupCode"], - verifySignupCode: item["verifySignupCode"], - verifySignupPhrase: item["verifySignupPhrase"], + cidrSelectionType: item["cidrSelectionType"], + fullyQualifiedDomainName: item["fullyQualifiedDomainName"], + autoUpdateRingType: item["autoUpdateRingType"], + autoUpdateRequestedWeek: item["autoUpdateRequestedWeek"], + autoUpdateRequestedDay: item["autoUpdateRequestedDay"], + autoUpdateRequestedTime: item["autoUpdateRequestedTime"], }; } -export function customerEntityDeserializer(item: any): CustomerEntity { +export function cacheNodeEntityDeserializer(item: any): CacheNodeEntity { return { fullyQualifiedResourceId: item["fullyQualifiedResourceId"], customerId: item["customerId"], customerName: item["customerName"], - contactEmail: item["contactEmail"], - contactPhone: item["contactPhone"], - contactName: item["contactName"], - isEntitled: item["isEntitled"], - releaseVersion: item["releaseVersion"], - createAsyncOperationId: item["createAsyncOperationId"], - deleteAsyncOperationId: item["deleteAsyncOperationId"], - clientTenantId: item["clientTenantId"], - synchWithAzureAttemptsCount: item["synchWithAzureAttemptsCount"], - lastSyncWithAzureTimestamp: !item["lastSyncWithAzureTimestamp"] - ? item["lastSyncWithAzureTimestamp"] - : new Date(item["lastSyncWithAzureTimestamp"]), - isEnterpriseManaged: item["isEnterpriseManaged"], + ipAddress: item["ipAddress"], + customerIndex: item["customerIndex"], + cacheNodeId: item["cacheNodeId"], + cacheNodeName: item["cacheNodeName"], + customerAsn: item["customerAsn"], + isEnabled: item["isEnabled"], + maxAllowableEgressInMbps: item["maxAllowableEgressInMbps"], + maxAllowableProbability: item["maxAllowableProbability"], + xCid: item["xCid"], + isEnterpriseManaged: item["isEnterpriseManaged"], + createAsyncOperationId: item["createAsyncOperationId"], + deleteAsyncOperationId: item["deleteAsyncOperationId"], + clientTenantId: item["clientTenantId"], + category: item["category"], + releaseVersion: item["releaseVersion"], + lastSyncWithAzureTimestamp: !item["lastSyncWithAzureTimestamp"] + ? item["lastSyncWithAzureTimestamp"] + : new Date(item["lastSyncWithAzureTimestamp"]), + lastUpdatedTimestamp: !item["lastUpdatedTimestamp"] + ? item["lastUpdatedTimestamp"] + : new Date(item["lastUpdatedTimestamp"]), + synchWithAzureAttemptsCount: item["synchWithAzureAttemptsCount"], + containerConfigurations: item["containerConfigurations"], + cidrCsv: !item["cidrCsv"] + ? item["cidrCsv"] + : item["cidrCsv"].map((p: any) => { + return p; + }), + cidrCsvLastUpdateTime: !item["cidrCsvLastUpdateTime"] + ? item["cidrCsvLastUpdateTime"] + : new Date(item["cidrCsvLastUpdateTime"]), + bgpCidrCsvLastUpdateTime: !item["bgpCidrCsvLastUpdateTime"] + ? item["bgpCidrCsvLastUpdateTime"] + : new Date(item["bgpCidrCsvLastUpdateTime"]), + bgpLastReportedTime: !item["bgpLastReportedTime"] + ? item["bgpLastReportedTime"] + : new Date(item["bgpLastReportedTime"]), + bgpReviewStateText: item["bgpReviewStateText"], + bgpReviewState: item["bgpReviewState"], + bgpReviewFeedback: item["bgpReviewFeedback"], + bgpNumberOfTimesUpdated: item["bgpNumberOfTimesUpdated"], + bgpNumberOfRecords: item["bgpNumberOfRecords"], + bgpCidrBlocksCount: item["bgpCidrBlocksCount"], + bgpAddressSpace: item["bgpAddressSpace"], shouldMigrate: item["shouldMigrate"], - resendSignupCode: item["resendSignupCode"], - verifySignupCode: item["verifySignupCode"], - verifySignupPhrase: item["verifySignupPhrase"], + bgpFileBytesTruncated: item["bgpFileBytesTruncated"], + cidrSelectionType: item["cidrSelectionType"], + isFrozen: item["isFrozen"], + reviewState: item["reviewState"], + reviewStateText: item["reviewStateText"], + reviewFeedback: item["reviewFeedback"], + configurationState: item["configurationState"], + configurationStateText: item["configurationStateText"], + addressSpace: item["addressSpace"], + workerConnections: item["workerConnections"], + workerConnectionsLastUpdatedDateTime: !item["workerConnectionsLastUpdatedDateTime"] + ? item["workerConnectionsLastUpdatedDateTime"] + : new Date(item["workerConnectionsLastUpdatedDateTime"]), + containerResyncTrigger: item["containerResyncTrigger"], + imageUri: item["imageUri"], + fullyQualifiedDomainName: item["fullyQualifiedDomainName"], + autoUpdateRingType: item["autoUpdateRingType"], + autoUpdateRequestedWeek: item["autoUpdateRequestedWeek"], + autoUpdateRequestedDay: item["autoUpdateRequestedDay"], + autoUpdateRequestedTime: item["autoUpdateRequestedTime"], }; } -/** Model representing customer for connected cache resource */ -export interface AdditionalCustomerProperties { - /** Customer resource last PeeringDB update timestamp. */ - readonly peeringDbLastUpdateTime?: Date; - /** Customer resource cache efficiency. */ - readonly customerPropertiesOverviewCacheEfficiency?: number; - /** Customer resource average egress in Mbps. */ - readonly customerPropertiesOverviewAverageEgressMbps?: number; - /** Customer resource average cache miss throughput in Mbps. */ - readonly customerPropertiesOverviewAverageMissMbps?: number; - /** Customer resource maximum egress in Mbps. */ - readonly customerPropertiesOverviewEgressMbpsMax?: number; - /** Customer resource peak egress timestamp. */ - readonly customerPropertiesOverviewEgressMbpsMaxDateTime?: Date; - /** Customer resource maximum cache miss throughput in Mbps. */ - readonly customerPropertiesOverviewMissMbpsMax?: number; - /** Customer resource peak cache miss throughput timestamp. */ - readonly customerPropertiesOverviewMissMbpsMaxDateTime?: Date; - /** Customer resource total healthy cache nodes. */ - readonly customerPropertiesOverviewCacheNodesHealthyCount?: number; - /** Customer resource total unhealthy cache nodes. */ - readonly customerPropertiesOverviewCacheNodesUnhealthyCount?: number; - /** Customer resource signup status as boolean. */ - readonly signupStatus?: boolean; - /** Customer resource signup status as integer code. */ - readonly signupStatusCode?: number; - /** Customer resource signup status as string text. */ - readonly signupStatusText?: string; - /** Customer resource signup phase status code as integer. */ - readonly signupPhaseStatusCode?: number; - /** Customer resource signup phase status as string text. */ - readonly signupPhaseStatusText?: string; - /** Customer resource last PeeringDB update timestamp. */ - readonly peeringDbLastUpdateDate?: Date; - /** Customer resource owner organization name. */ - readonly customerOrgName?: string; - /** Customer resource contact email. */ - customerEmail?: string; - /** Customer resource transit Asn (autonomous system number). */ - customerTransitAsn?: string; - /** Customer resource transit state. */ - customerTransitState?: CustomerTransitState; - /** Customer resource Asn (autonomous system number). */ - customerAsn?: string; - /** Customer resource estimated Asn peering peak in Gbps. */ - readonly customerAsnEstimatedEgressPeekGbps?: number; - /** Customer resource entitlement Sku Id. */ - customerEntitlementSkuId?: string; - /** Customer resource entitlement Sku Guid. */ - customerEntitlementSkuGuid?: string; - /** Customer resource entitlement Sku name. */ - customerEntitlementSkuName?: string; - /** Customer resource entitlement expiration date string. */ - customerEntitlementExpiration?: Date; - /** Optional property #1 of Mcc response object. */ +/** Cache node resource Bgp review state as integer */ +export enum KnownBgpReviewStateEnum { + /** bgp not configured */ + NotConfigured = "NotConfigured", + /** bgp is in review state */ + InReview = "InReview", + /** bgp is in Approved state */ + Approved = "Approved", + /** bgp is setup need an attention for more troubleshoot */ + AttentionRequired = "AttentionRequired", +} + +/** + * Cache node resource Bgp review state as integer \ + * {@link KnownBgpReviewStateEnum} can be used interchangeably with BgpReviewStateEnum, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotConfigured**: bgp not configured \ + * **InReview**: bgp is in review state \ + * **Approved**: bgp is in Approved state \ + * **AttentionRequired**: bgp is setup need an attention for more troubleshoot + */ +export type BgpReviewStateEnum = string; + +/** Cache node configuration setup state */ +export enum KnownConfigurationState { + /** connected cache setup configured */ + Configured = "Configured", + /** connected cache setup not configured */ + NotConfiguredIp = "NotConfigured_Ip", +} + +/** + * Cache node configuration setup state \ + * {@link KnownConfigurationState} can be used interchangeably with ConfigurationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Configured**: connected cache setup configured \ + * **NotConfigured_Ip**: connected cache setup not configured + */ +export type ConfigurationState = string; + +/** Auto update Ring type */ +export enum KnownAutoUpdateRingType { + /** customer selection of preview update install mcc on their physical vm */ + Preview = "Preview", + /** customer selection of slow update to install mcc on their physical vm */ + Slow = "Slow", + /** customer selection of fast / auto update to install mcc on their physical vm */ + Fast = "Fast", +} + +/** + * Auto update Ring type \ + * {@link KnownAutoUpdateRingType} can be used interchangeably with AutoUpdateRingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: customer selection of preview update install mcc on their physical vm \ + * **Slow**: customer selection of slow update to install mcc on their physical vm \ + * **Fast**: customer selection of fast \/ auto update to install mcc on their physical vm + */ +export type AutoUpdateRingType = string; + +/** Model representing cache node for connected cache resource */ +export interface AdditionalCacheNodeProperties { + /** issues list to return the issues as part of the additional cache node properties */ + cacheNodePropertiesDetailsIssuesList?: string[]; + /** current cache node issue list. */ + readonly issuesList?: string[]; + /** Number of cache node issues. */ + readonly issuesCount?: number; + /** cache node current tls certificate. */ + readonly currentTlsCertificate?: MccCacheNodeTlsCertificate; + /** cache node last auto update information. */ + readonly lastAutoUpdateInfo?: MccCacheNodeAutoUpdateInfo; + /** Cache node resource aggregated status details. */ + readonly aggregatedStatusDetails?: string; + /** Cache node resource aggregated status text. */ + readonly aggregatedStatusText?: string; + /** Cache node resource aggregated status code. */ + readonly aggregatedStatusCode?: number; + /** Cache node resource Mcc product version. */ + readonly productVersion?: string; + /** Cache node resource flag indicating if cache node has been physically installed or provisioned on their physical lab. */ + readonly isProvisioned?: boolean; + /** Cache node resource detailed state text. */ + readonly cacheNodeStateDetailedText?: string; + /** Cache node resource short state text. */ + readonly cacheNodeStateShortText?: string; + /** Cache node resource state as integer. */ + readonly cacheNodeState?: number; + /** Cache node resource drive configurations. */ + driveConfiguration?: CacheNodeDriveConfiguration[]; + /** Cache node resource Bgp configuration. */ + bgpConfiguration?: BgpConfiguration; + /** proxyUrl configuration of the cache node */ + proxyUrlConfiguration?: ProxyUrlConfiguration; + /** Cache node resource requires a proxy */ + isProxyRequired?: ProxyRequired; + /** Operating system of the cache node */ + osType?: OsType; + /** Auto update or fast update version */ + autoUpdateVersion?: string; + /** Update related information details */ + updateInfoDetails?: string; + /** customer requested date time for mcc install of update cycle */ + updateRequestedDateTime?: Date; + /** Auto update version that is the Next available version to update on mcc cache node */ + readonly autoUpdateNextAvailableVersion?: string; + /** Auto update last applied date time of mcc install */ + readonly autoUpdateNextAvailableDateTime?: Date; + /** Auto update version that is the applied to update on mcc cache node */ + readonly autoUpdateAppliedVersion?: string; + /** Auto Update status details from the backend after applying the new version details */ + readonly autoUpdateLastAppliedDetails?: string; + /** Last applied auto update state for mcc install of auto update cycle */ + readonly autoUpdateLastAppliedState?: string; + /** Auto update last applied date time of mcc install */ + readonly autoUpdateLastAppliedDateTime?: Date; + /** Auto update last triggered date time of mcc install */ + readonly autoUpdateLastTriggeredDateTime?: Date; + /** Resource creation method of mcc cache node resource, cli or portal */ + creationMethod?: number; + /** Cache node tls certificate status. */ + readonly tlsStatus?: string; + /** Optional property #1 of Mcc response object */ optionalProperty1?: string; - /** Optional property #2 of Mcc response object. */ + /** Optional property #2 of Mcc response object */ optionalProperty2?: string; - /** Optional property #3 of Mcc response object. */ + /** Optional property #3 of Mcc response object */ optionalProperty3?: string; - /** Optional property #4 of Mcc response object. */ + /** Optional property #4 of Mcc response object */ optionalProperty4?: string; - /** Optional property #5 of Mcc response object. */ + /** Optional property #5 of Mcc response object */ optionalProperty5?: string; } -export function additionalCustomerPropertiesSerializer(item: AdditionalCustomerProperties): any { +export function additionalCacheNodePropertiesSerializer(item: AdditionalCacheNodeProperties): any { + return { + cacheNodePropertiesDetailsIssuesList: !item["cacheNodePropertiesDetailsIssuesList"] + ? item["cacheNodePropertiesDetailsIssuesList"] + : item["cacheNodePropertiesDetailsIssuesList"].map((p: any) => { + return p; + }), + driveConfiguration: !item["driveConfiguration"] + ? item["driveConfiguration"] + : cacheNodeDriveConfigurationArraySerializer(item["driveConfiguration"]), + bgpConfiguration: !item["bgpConfiguration"] + ? item["bgpConfiguration"] + : bgpConfigurationSerializer(item["bgpConfiguration"]), + proxyUrlConfiguration: !item["proxyUrlConfiguration"] + ? item["proxyUrlConfiguration"] + : proxyUrlConfigurationSerializer(item["proxyUrlConfiguration"]), + isProxyRequired: item["isProxyRequired"], + osType: item["osType"], + autoUpdateVersion: item["autoUpdateVersion"], + updateInfoDetails: item["updateInfoDetails"], + updateRequestedDateTime: !item["updateRequestedDateTime"] + ? item["updateRequestedDateTime"] + : item["updateRequestedDateTime"].toISOString(), + creationMethod: item["creationMethod"], + optionalProperty1: item["optionalProperty1"], + optionalProperty2: item["optionalProperty2"], + optionalProperty3: item["optionalProperty3"], + optionalProperty4: item["optionalProperty4"], + optionalProperty5: item["optionalProperty5"], + }; +} + +export function additionalCacheNodePropertiesDeserializer( + item: any, +): AdditionalCacheNodeProperties { + return { + cacheNodePropertiesDetailsIssuesList: !item["cacheNodePropertiesDetailsIssuesList"] + ? item["cacheNodePropertiesDetailsIssuesList"] + : item["cacheNodePropertiesDetailsIssuesList"].map((p: any) => { + return p; + }), + issuesList: !item["issuesList"] + ? item["issuesList"] + : item["issuesList"].map((p: any) => { + return p; + }), + issuesCount: item["issuesCount"], + currentTlsCertificate: !item["currentTlsCertificate"] + ? item["currentTlsCertificate"] + : mccCacheNodeTlsCertificateDeserializer(item["currentTlsCertificate"]), + lastAutoUpdateInfo: !item["lastAutoUpdateInfo"] + ? item["lastAutoUpdateInfo"] + : mccCacheNodeAutoUpdateInfoDeserializer(item["lastAutoUpdateInfo"]), + aggregatedStatusDetails: item["aggregatedStatusDetails"], + aggregatedStatusText: item["aggregatedStatusText"], + aggregatedStatusCode: item["aggregatedStatusCode"], + productVersion: item["productVersion"], + isProvisioned: item["isProvisioned"], + cacheNodeStateDetailedText: item["cacheNodeStateDetailedText"], + cacheNodeStateShortText: item["cacheNodeStateShortText"], + cacheNodeState: item["cacheNodeState"], + driveConfiguration: !item["driveConfiguration"] + ? item["driveConfiguration"] + : cacheNodeDriveConfigurationArrayDeserializer(item["driveConfiguration"]), + bgpConfiguration: !item["bgpConfiguration"] + ? item["bgpConfiguration"] + : bgpConfigurationDeserializer(item["bgpConfiguration"]), + proxyUrlConfiguration: !item["proxyUrlConfiguration"] + ? item["proxyUrlConfiguration"] + : proxyUrlConfigurationDeserializer(item["proxyUrlConfiguration"]), + isProxyRequired: item["isProxyRequired"], + osType: item["osType"], + autoUpdateVersion: item["autoUpdateVersion"], + updateInfoDetails: item["updateInfoDetails"], + updateRequestedDateTime: !item["updateRequestedDateTime"] + ? item["updateRequestedDateTime"] + : new Date(item["updateRequestedDateTime"]), + autoUpdateNextAvailableVersion: item["autoUpdateNextAvailableVersion"], + autoUpdateNextAvailableDateTime: !item["autoUpdateNextAvailableDateTime"] + ? item["autoUpdateNextAvailableDateTime"] + : new Date(item["autoUpdateNextAvailableDateTime"]), + autoUpdateAppliedVersion: item["autoUpdateAppliedVersion"], + autoUpdateLastAppliedDetails: item["autoUpdateLastAppliedDetails"], + autoUpdateLastAppliedState: item["autoUpdateLastAppliedState"], + autoUpdateLastAppliedDateTime: !item["autoUpdateLastAppliedDateTime"] + ? item["autoUpdateLastAppliedDateTime"] + : new Date(item["autoUpdateLastAppliedDateTime"]), + autoUpdateLastTriggeredDateTime: !item["autoUpdateLastTriggeredDateTime"] + ? item["autoUpdateLastTriggeredDateTime"] + : new Date(item["autoUpdateLastTriggeredDateTime"]), + creationMethod: item["creationMethod"], + tlsStatus: item["tlsStatus"], + optionalProperty1: item["optionalProperty1"], + optionalProperty2: item["optionalProperty2"], + optionalProperty3: item["optionalProperty3"], + optionalProperty4: item["optionalProperty4"], + optionalProperty5: item["optionalProperty5"], + }; +} + +/** Mcc cache node resource Tls certificate details. */ +export interface MccCacheNodeTlsCertificate { + /** Mcc cache node Tls certificate status. */ + readonly actionRequired?: string; + /** Mcc cache node Tls certificate file name. */ + readonly certificateFileName?: string; + /** Mcc cache node Tls certificate thumbprint. */ + readonly thumbprint?: string; + /** Mcc cache node Tls certificate expiry date. */ + readonly expiryDate?: Date; + /** Mcc cache node Tls certificate not before date. */ + readonly notBeforeDate?: Date; + /** Mcc cache node Tls certificate subject name. */ + readonly subject?: string; + /** Mcc cache node Tls certificate subject alternate name. */ + readonly subjectAltName?: string; +} + +export function mccCacheNodeTlsCertificateDeserializer(item: any): MccCacheNodeTlsCertificate { + return { + actionRequired: item["actionRequired"], + certificateFileName: item["certificateFileName"], + thumbprint: item["thumbprint"], + expiryDate: !item["expiryDate"] ? item["expiryDate"] : new Date(item["expiryDate"]), + notBeforeDate: !item["notBeforeDate"] ? item["notBeforeDate"] : new Date(item["notBeforeDate"]), + subject: item["subject"], + subjectAltName: item["subjectAltName"], + }; +} + +/** Mcc cache node resource auto update properties. */ +export interface MccCacheNodeAutoUpdateInfo { + /** Auto update image uri before update. */ + readonly imageUriBeforeUpdate?: string; + /** Auto update image uri targetted to update. */ + readonly imageUriTargeted?: string; + /** Auto update image uri at Terminal. */ + readonly imageUriTerminal?: string; + /** Auto update Ring Type. */ + readonly autoUpdateRingType?: number; + /** Auto update image uri after update. */ + readonly movedToTerminalStateDateTime?: Date; + /** Auto update image uri before update. */ + readonly ruleRequestedWeek?: number; + /** Auto update image uri after update. */ + readonly ruleRequestedDay?: number; + /** Auto update entity created datetime. */ + readonly createdDateTimeUtc?: Date; + /** Auto update entity last updated datetime. */ + readonly updatedRegistryDateTimeUtc?: Date; + /** This text describing the purpose of the plan of auto update. */ + readonly planChangeLogText?: string; + /** Auto update last applied status. */ + readonly autoUpdateLastAppliedStatus?: number; + /** Auto update last applied status text. */ + readonly autoUpdateLastAppliedStatusText?: string; + /** Auto update last applied detailed status text. */ + readonly autoUpdateLastAppliedStatusDetailedText?: string; + /** Auto update planId. */ + readonly planId?: number; + /** Auto update time to go live date time. */ + readonly timeToGoLiveDateTime?: string; + /** Auto update rule requested minute. */ + readonly ruleRequestedMinute?: string; + /** Auto update rule requested hour. */ + readonly ruleRequestedHour?: string; +} + +export function mccCacheNodeAutoUpdateInfoDeserializer(item: any): MccCacheNodeAutoUpdateInfo { + return { + imageUriBeforeUpdate: item["imageUriBeforeUpdate"], + imageUriTargeted: item["imageUriTargeted"], + imageUriTerminal: item["imageUriTerminal"], + autoUpdateRingType: item["autoUpdateRingType"], + movedToTerminalStateDateTime: !item["movedToTerminalStateDateTime"] + ? item["movedToTerminalStateDateTime"] + : new Date(item["movedToTerminalStateDateTime"]), + ruleRequestedWeek: item["ruleRequestedWeek"], + ruleRequestedDay: item["ruleRequestedDay"], + createdDateTimeUtc: !item["createdDateTimeUtc"] + ? item["createdDateTimeUtc"] + : new Date(item["createdDateTimeUtc"]), + updatedRegistryDateTimeUtc: !item["updatedRegistryDateTimeUtc"] + ? item["updatedRegistryDateTimeUtc"] + : new Date(item["updatedRegistryDateTimeUtc"]), + planChangeLogText: item["planChangeLogText"], + autoUpdateLastAppliedStatus: item["autoUpdateLastAppliedStatus"], + autoUpdateLastAppliedStatusText: item["autoUpdateLastAppliedStatusText"], + autoUpdateLastAppliedStatusDetailedText: item["autoUpdateLastAppliedStatusDetailedText"], + planId: item["planId"], + timeToGoLiveDateTime: item["timeToGoLiveDateTime"], + ruleRequestedMinute: item["ruleRequestedMinute"], + ruleRequestedHour: item["ruleRequestedHour"], + }; +} + +export function cacheNodeDriveConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return cacheNodeDriveConfigurationSerializer(item); + }); +} + +export function cacheNodeDriveConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return cacheNodeDriveConfigurationDeserializer(item); + }); +} + +/** Drive configuration for cache node */ +export interface CacheNodeDriveConfiguration { + /** physical path location of the folder used for caching content */ + physicalPath?: string; + /** physical size of the drive used for caching content */ + sizeInGb?: number; + /** corresponding nginx cache number. Valid cache numbers are 1 - 20 */ + cacheNumber?: number; + /** full binding for corresponding nginx cache drive */ + nginxMapping?: string; +} + +export function cacheNodeDriveConfigurationSerializer(item: CacheNodeDriveConfiguration): any { return { - customerEmail: item["customerEmail"], - customerTransitAsn: item["customerTransitAsn"], - customerTransitState: item["customerTransitState"], - customerAsn: item["customerAsn"], - customerEntitlementSkuId: item["customerEntitlementSkuId"], - customerEntitlementSkuGuid: item["customerEntitlementSkuGuid"], - customerEntitlementSkuName: item["customerEntitlementSkuName"], - customerEntitlementExpiration: item["customerEntitlementExpiration"]?.toISOString(), - optionalProperty1: item["optionalProperty1"], - optionalProperty2: item["optionalProperty2"], - optionalProperty3: item["optionalProperty3"], - optionalProperty4: item["optionalProperty4"], - optionalProperty5: item["optionalProperty5"], + physicalPath: item["physicalPath"], + sizeInGb: item["sizeInGb"], + cacheNumber: item["cacheNumber"], + nginxMapping: item["nginxMapping"], }; } -export function additionalCustomerPropertiesDeserializer(item: any): AdditionalCustomerProperties { +export function cacheNodeDriveConfigurationDeserializer(item: any): CacheNodeDriveConfiguration { return { - peeringDbLastUpdateTime: !item["peeringDbLastUpdateTime"] - ? item["peeringDbLastUpdateTime"] - : new Date(item["peeringDbLastUpdateTime"]), - customerPropertiesOverviewCacheEfficiency: item["customerPropertiesOverviewCacheEfficiency"], - customerPropertiesOverviewAverageEgressMbps: - item["customerPropertiesOverviewAverageEgressMbps"], - customerPropertiesOverviewAverageMissMbps: item["customerPropertiesOverviewAverageMissMbps"], - customerPropertiesOverviewEgressMbpsMax: item["customerPropertiesOverviewEgressMbpsMax"], - customerPropertiesOverviewEgressMbpsMaxDateTime: !item[ - "customerPropertiesOverviewEgressMbpsMaxDateTime" - ] - ? item["customerPropertiesOverviewEgressMbpsMaxDateTime"] - : new Date(item["customerPropertiesOverviewEgressMbpsMaxDateTime"]), - customerPropertiesOverviewMissMbpsMax: item["customerPropertiesOverviewMissMbpsMax"], - customerPropertiesOverviewMissMbpsMaxDateTime: !item[ - "customerPropertiesOverviewMissMbpsMaxDateTime" - ] - ? item["customerPropertiesOverviewMissMbpsMaxDateTime"] - : new Date(item["customerPropertiesOverviewMissMbpsMaxDateTime"]), - customerPropertiesOverviewCacheNodesHealthyCount: - item["customerPropertiesOverviewCacheNodesHealthyCount"], - customerPropertiesOverviewCacheNodesUnhealthyCount: - item["customerPropertiesOverviewCacheNodesUnhealthyCount"], - signupStatus: item["signupStatus"], - signupStatusCode: item["signupStatusCode"], - signupStatusText: item["signupStatusText"], - signupPhaseStatusCode: item["signupPhaseStatusCode"], - signupPhaseStatusText: item["signupPhaseStatusText"], - peeringDbLastUpdateDate: !item["peeringDbLastUpdateDate"] - ? item["peeringDbLastUpdateDate"] - : new Date(item["peeringDbLastUpdateDate"]), - customerOrgName: item["customerOrgName"], - customerEmail: item["customerEmail"], - customerTransitAsn: item["customerTransitAsn"], - customerTransitState: item["customerTransitState"], - customerAsn: item["customerAsn"], - customerAsnEstimatedEgressPeekGbps: item["customerAsnEstimatedEgressPeekGbps"], - customerEntitlementSkuId: item["customerEntitlementSkuId"], - customerEntitlementSkuGuid: item["customerEntitlementSkuGuid"], - customerEntitlementSkuName: item["customerEntitlementSkuName"], - customerEntitlementExpiration: !item["customerEntitlementExpiration"] - ? item["customerEntitlementExpiration"] - : new Date(item["customerEntitlementExpiration"]), - optionalProperty1: item["optionalProperty1"], - optionalProperty2: item["optionalProperty2"], - optionalProperty3: item["optionalProperty3"], - optionalProperty4: item["optionalProperty4"], - optionalProperty5: item["optionalProperty5"], + physicalPath: item["physicalPath"], + sizeInGb: item["sizeInGb"], + cacheNumber: item["cacheNumber"], + nginxMapping: item["nginxMapping"], }; } -/** Customer resource transit states */ -export enum KnownCustomerTransitState { - /** do not have transit */ - NoTransit = "NoTransit", - /** transit provider and have own subscribers */ - CombinedTransit = "CombinedTransit", - /** pure transit provider or network service provider */ - TransitOnly = "TransitOnly", +/** Bgp configuration of cache node */ +export interface BgpConfiguration { + /** Asn to ip address mapping */ + asnToIpAddressMapping?: string; +} + +export function bgpConfigurationSerializer(item: BgpConfiguration): any { + return { asnToIpAddressMapping: item["asnToIpAddressMapping"] }; +} + +export function bgpConfigurationDeserializer(item: any): BgpConfiguration { + return { + asnToIpAddressMapping: item["asnToIpAddressMapping"], + }; +} + +/** ProxyUrl configuration of cache node */ +export interface ProxyUrlConfiguration { + /** Host Proxy Address configuration along with port number. This can be a proxy or ip address. ex: xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80 */ + proxyUrl?: string; +} + +export function proxyUrlConfigurationSerializer(item: ProxyUrlConfiguration): any { + return { proxyUrl: item["proxyUrl"] }; +} + +export function proxyUrlConfigurationDeserializer(item: any): ProxyUrlConfiguration { + return { + proxyUrl: item["proxyUrl"], + }; +} + +/** Proxy details enum */ +export enum KnownProxyRequired { + /** Proxy is not required in setup */ + None = "None", + /** proxy is required in setup */ + Required = "Required", } /** - * Customer resource transit states \ - * {@link KnownCustomerTransitState} can be used interchangeably with CustomerTransitState, + * Proxy details enum \ + * {@link KnownProxyRequired} can be used interchangeably with ProxyRequired, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NoTransit**: do not have transit \ - * **CombinedTransit**: transit provider and have own subscribers \ - * **TransitOnly**: pure transit provider or network service provider + * **None**: Proxy is not required in setup \ + * **Required**: proxy is required in setup */ -export type CustomerTransitState = string; +export type ProxyRequired = string; -/** The response of a EnterpriseMccCustomerResource list operation. */ -export interface _EnterpriseMccCustomerResourceListResult { - /** The EnterpriseMccCustomerResource items on this page */ - value: EnterpriseMccCustomerResource[]; +/** Operating System of the cache node */ +export enum KnownOsType { + /** cache node installs on windows operating system */ + Windows = "Windows", + /** cache node installs on Linux Operating system */ + Linux = "Linux", + /** cache node installs on Azure Eflow */ + Eflow = "Eflow", +} + +/** + * Operating System of the cache node \ + * {@link KnownOsType} can be used interchangeably with OsType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows**: cache node installs on windows operating system \ + * **Linux**: cache node installs on Linux Operating system \ + * **Eflow**: cache node installs on Azure Eflow + */ +export type OsType = string; + +/** The response of a IspCacheNodeResource list operation. */ +export interface _IspCacheNodeResourceListResult { + /** The IspCacheNodeResource items on this page */ + value: IspCacheNodeResource[]; /** The link to the next page of items */ nextLink?: string; } -export function _enterpriseMccCustomerResourceListResultDeserializer( +export function _ispCacheNodeResourceListResultDeserializer( item: any, -): _EnterpriseMccCustomerResourceListResult { +): _IspCacheNodeResourceListResult { return { - value: enterpriseMccCustomerResourceArrayDeserializer(item["value"]), + value: ispCacheNodeResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function enterpriseMccCustomerResourceArraySerializer( - result: Array, -): any[] { +export function ispCacheNodeResourceArraySerializer(result: Array): any[] { return result.map((item) => { - return enterpriseMccCustomerResourceSerializer(item); + return ispCacheNodeResourceSerializer(item); }); } -export function enterpriseMccCustomerResourceArrayDeserializer( - result: Array, -): any[] { +export function ispCacheNodeResourceArrayDeserializer(result: Array): any[] { return result.map((item) => { - return enterpriseMccCustomerResourceDeserializer(item); + return ispCacheNodeResourceDeserializer(item); }); } -/** Represents the high level Nodes needed to provision cache node resources */ -export interface IspCacheNodeResource extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: CacheNodeProperty; +/** Represents all Cidr details of the Bgp request for a specific cache node resource */ +export interface MccCacheNodeBgpCidrDetails extends TrackedResource { + /** Mcc cache node resource Bgp Cidr properties. */ + properties?: BgpCidrsConfiguration; } -export function ispCacheNodeResourceSerializer(item: IspCacheNodeResource): any { +export function mccCacheNodeBgpCidrDetailsDeserializer(item: any): MccCacheNodeBgpCidrDetails { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodePropertySerializer(item["properties"]), + : bgpCidrsConfigurationDeserializer(item["properties"]), }; } -export function ispCacheNodeResourceDeserializer(item: any): IspCacheNodeResource { +/** Mcc cache node Bgp Cidr details. */ +export interface BgpCidrsConfiguration { + /** Mcc cache node Bgp Cidr details. */ + readonly bgpCidrs?: string[]; +} + +export function bgpCidrsConfigurationDeserializer(item: any): BgpCidrsConfiguration { return { - tags: item["tags"], + bgpCidrs: !item["bgpCidrs"] + ? item["bgpCidrs"] + : item["bgpCidrs"].map((p: any) => { + return p; + }), + }; +} + +/** Mcc cache node resource all install details. */ +export interface MccCacheNodeInstallDetails extends TrackedResource { + /** Mcc cache node resource install script details. */ + properties?: CacheNodeInstallProperties; +} + +export function mccCacheNodeInstallDetailsDeserializer(item: any): MccCacheNodeInstallDetails { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -1328,48 +1512,60 @@ export function ispCacheNodeResourceDeserializer(item: any): IspCacheNodeResourc : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodePropertyDeserializer(item["properties"]), + : cacheNodeInstallPropertiesDeserializer(item["properties"]), }; } -/** The response of a IspCacheNodeResource list operation. */ -export interface _IspCacheNodeResourceListResult { - /** The IspCacheNodeResource items on this page */ - value: IspCacheNodeResource[]; - /** The link to the next page of items */ - nextLink?: string; +/** Mcc cache node resource install script properties. */ +export interface CacheNodeInstallProperties { + /** Mcc customer resource Id. */ + customerId?: string; + /** Mcc cache node resource Id. */ + cacheNodeId?: string; + /** Mcc primary account key. Internal to Mcc. */ + readonly primaryAccountKey?: string; + /** Mcc secondary account key. Internal to Mcc. */ + readonly secondaryAccountKey?: string; + /** Mcc Iot Central temporary device registration key, used once. */ + readonly registrationKey?: string; + /** Mcc Tls certificate provisioning key. */ + readonly tlsCertificateProvisioningKey?: string; + /** Cache node resource drive configurations. */ + driveConfiguration?: CacheNodeDriveConfiguration[]; + /** proxyUrl configuration of the cache node */ + proxyUrlConfiguration?: ProxyUrlConfiguration; } -export function _ispCacheNodeResourceListResultDeserializer( - item: any, -): _IspCacheNodeResourceListResult { +export function cacheNodeInstallPropertiesDeserializer(item: any): CacheNodeInstallProperties { return { - value: ispCacheNodeResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], + customerId: item["customerId"], + cacheNodeId: item["cacheNodeId"], + primaryAccountKey: item["primaryAccountKey"], + secondaryAccountKey: item["secondaryAccountKey"], + registrationKey: item["registrationKey"], + tlsCertificateProvisioningKey: item["tlsCertificateProvisioningKey"], + driveConfiguration: !item["driveConfiguration"] + ? item["driveConfiguration"] + : cacheNodeDriveConfigurationArrayDeserializer(item["driveConfiguration"]), + proxyUrlConfiguration: !item["proxyUrlConfiguration"] + ? item["proxyUrlConfiguration"] + : proxyUrlConfigurationDeserializer(item["proxyUrlConfiguration"]), }; } -export function ispCacheNodeResourceArraySerializer(result: Array): any[] { - return result.map((item) => { - return ispCacheNodeResourceSerializer(item); - }); -} - -export function ispCacheNodeResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return ispCacheNodeResourceDeserializer(item); - }); -} - -/** Represents all Cidr details of the Bgp request for a specific cache node resource */ -export interface MccCacheNodeBgpCidrDetails extends TrackedResource { - /** Mcc cache node resource Bgp Cidr properties. */ - properties?: BgpCidrsConfiguration; +/** Mcc cache node resource auto update history. */ +export interface MccCacheNodeAutoUpdateHistory extends TrackedResource { + /** Mcc cache node resource auto update history properties. */ + properties?: MccCacheNodeAutoUpdateHistoryProperties; } -export function mccCacheNodeBgpCidrDetailsDeserializer(item: any): MccCacheNodeBgpCidrDetails { +export function mccCacheNodeAutoUpdateHistoryDeserializer( + item: any, +): MccCacheNodeAutoUpdateHistory { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -1379,45 +1575,51 @@ export function mccCacheNodeBgpCidrDetailsDeserializer(item: any): MccCacheNodeB : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : bgpCidrsConfigurationDeserializer(item["properties"]), + : mccCacheNodeAutoUpdateHistoryPropertiesDeserializer(item["properties"]), }; } -/** Mcc cache node Bgp Cidr details. */ -export interface BgpCidrsConfiguration { - /** Mcc cache node Bgp Cidr details. */ - readonly bgpCidrs?: string[]; +/** Mcc cache node resource auto update history properties. */ +export interface MccCacheNodeAutoUpdateHistoryProperties { + /** Mcc customer resource Id. */ + readonly customerId?: string; + /** Mcc cache node resource Id. */ + readonly cacheNodeId?: string; + /** Cache node resource auto update history information. */ + autoUpdateHistory?: MccCacheNodeAutoUpdateInfo[]; } -export function bgpCidrsConfigurationDeserializer(item: any): BgpCidrsConfiguration { +export function mccCacheNodeAutoUpdateHistoryPropertiesDeserializer( + item: any, +): MccCacheNodeAutoUpdateHistoryProperties { return { - bgpCidrs: !item["bgpCidrs"] - ? item["bgpCidrs"] - : item["bgpCidrs"].map((p: any) => { - return p; - }), + customerId: item["customerId"], + cacheNodeId: item["cacheNodeId"], + autoUpdateHistory: !item["autoUpdateHistory"] + ? item["autoUpdateHistory"] + : mccCacheNodeAutoUpdateInfoArrayDeserializer(item["autoUpdateHistory"]), }; } -/** Represents the high level Nodes needed to provision isp customer resources */ -export interface IspCustomerResource extends TrackedResource { - /** The resource-specific properties for this resource. */ - properties?: CustomerProperty; +export function mccCacheNodeAutoUpdateInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return mccCacheNodeAutoUpdateInfoDeserializer(item); + }); } -export function ispCustomerResourceSerializer(item: IspCustomerResource): any { - return { - tags: item["tags"], - location: item["location"], - properties: !item["properties"] - ? item["properties"] - : customerPropertySerializer(item["properties"]), - }; +/** Mcc cache node resource issue history. */ +export interface MccCacheNodeIssueHistory extends TrackedResource { + /** Mcc cache node resource issue history properties. */ + properties?: MccCacheNodeIssueHistoryProperties; } -export function ispCustomerResourceDeserializer(item: any): IspCustomerResource { +export function mccCacheNodeIssueHistoryDeserializer(item: any): MccCacheNodeIssueHistory { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -1427,58 +1629,90 @@ export function ispCustomerResourceDeserializer(item: any): IspCustomerResource : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : customerPropertyDeserializer(item["properties"]), + : mccCacheNodeIssueHistoryPropertiesDeserializer(item["properties"]), }; } -/** The response of a IspCustomerResource list operation. */ -export interface _IspCustomerResourceListResult { - /** The IspCustomerResource items on this page */ - value: IspCustomerResource[]; - /** The link to the next page of items */ - nextLink?: string; +/** Mcc cache node resource issue history properties. */ +export interface MccCacheNodeIssueHistoryProperties { + /** Mcc customer resource Id. */ + readonly customerId?: string; + /** Mcc cache node resource Id. */ + readonly cacheNodeId?: string; + /** Cache node resource issue details history. */ + mccIssueHistory?: MccIssue[]; } -export function _ispCustomerResourceListResultDeserializer( +export function mccCacheNodeIssueHistoryPropertiesDeserializer( item: any, -): _IspCustomerResourceListResult { +): MccCacheNodeIssueHistoryProperties { return { - value: ispCustomerResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], + customerId: item["customerId"], + cacheNodeId: item["cacheNodeId"], + mccIssueHistory: !item["mccIssueHistory"] + ? item["mccIssueHistory"] + : mccIssueArrayDeserializer(item["mccIssueHistory"]), }; } -export function ispCustomerResourceArraySerializer(result: Array): any[] { +export function mccIssueArrayDeserializer(result: Array): any[] { return result.map((item) => { - return ispCustomerResourceSerializer(item); + return mccIssueDeserializer(item); }); } -export function ispCustomerResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return ispCustomerResourceDeserializer(item); - }); +/** Mcc cache node resource issue properties. */ +export interface MccIssue { + /** Mcc cache node issue type. */ + readonly mccIssueType?: string; + /** Mcc cache node issues toastString. */ + readonly toastString?: string; + /** Mcc cache node issue detail string. */ + readonly detailString?: string; + /** Mcc cache node issue related help link. */ + readonly helpLink?: string; + /** Mcc cache node issue start date. */ + readonly issueStartDate?: Date; + /** Mcc cache node issue end date. */ + readonly issueEndDate?: Date; } -/** Concrete tracked resource types can be created by aliasing this type using a specific property type. */ -export interface CacheNodePreviewResource extends TrackedResource { +export function mccIssueDeserializer(item: any): MccIssue { + return { + mccIssueType: item["mccIssueType"], + toastString: item["toastString"], + detailString: item["detailString"], + helpLink: item["helpLink"], + issueStartDate: !item["issueStartDate"] + ? item["issueStartDate"] + : new Date(item["issueStartDate"]), + issueEndDate: !item["issueEndDate"] ? item["issueEndDate"] : new Date(item["issueEndDate"]), + }; +} + +/** Represents the high level Nodes needed to provision customer resources */ +export interface EnterpriseMccCustomerResource extends TrackedResource { /** The resource-specific properties for this resource. */ - properties?: CacheNodeOldResponse; + properties?: CustomerProperty; } -export function cacheNodePreviewResourceSerializer(item: CacheNodePreviewResource): any { +export function enterpriseMccCustomerResourceSerializer(item: EnterpriseMccCustomerResource): any { return { tags: item["tags"], location: item["location"], properties: !item["properties"] ? item["properties"] - : cacheNodeOldResponseSerializer(item["properties"]), + : customerPropertySerializer(item["properties"]), }; } -export function cacheNodePreviewResourceDeserializer(item: any): CacheNodePreviewResource { +export function enterpriseMccCustomerResourceDeserializer( + item: any, +): EnterpriseMccCustomerResource { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -1488,98 +1722,68 @@ export function cacheNodePreviewResourceDeserializer(item: any): CacheNodePrevie : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodeOldResponseDeserializer(item["properties"]), - }; -} - -/** Model representing Cache Node for ConnectedCache resource */ -export interface CacheNodeOldResponse { - /** The provisioned state of the resource */ - readonly provisioningState?: ProvisioningState; - /** statusCode used to get code details of Mcc response object */ - statusCode?: string; - /** statusText used to get status details in string format of Mcc response object */ - statusText?: string; - /** statusDetails used to get inner details of Mcc response object */ - statusDetails?: string; - /** status of the HTTP error code */ - readonly status?: string; - /** The error details */ - error?: ErrorDetail; -} - -export function cacheNodeOldResponseSerializer(item: CacheNodeOldResponse): any { - return { - statusCode: item["statusCode"], - statusText: item["statusText"], - statusDetails: item["statusDetails"], - error: !item["error"] ? item["error"] : errorDetailSerializer(item["error"]), - }; -} - -export function cacheNodeOldResponseDeserializer(item: any): CacheNodeOldResponse { - return { - provisioningState: item["provisioningState"], - statusCode: item["statusCode"], - statusText: item["statusText"], - statusDetails: item["statusDetails"], - status: item["status"], - error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + : customerPropertyDeserializer(item["properties"]), }; } -/** The response of a CacheNodePreviewResource list operation. */ -export interface _CacheNodePreviewResourceListResult { - /** The CacheNodePreviewResource items on this page */ - value: CacheNodePreviewResource[]; +/** The response of a EnterpriseMccCustomerResource list operation. */ +export interface _EnterpriseMccCustomerResourceListResult { + /** The EnterpriseMccCustomerResource items on this page */ + value: EnterpriseMccCustomerResource[]; /** The link to the next page of items */ nextLink?: string; } -export function _cacheNodePreviewResourceListResultDeserializer( +export function _enterpriseMccCustomerResourceListResultDeserializer( item: any, -): _CacheNodePreviewResourceListResult { +): _EnterpriseMccCustomerResourceListResult { return { - value: cacheNodePreviewResourceArrayDeserializer(item["value"]), + value: enterpriseMccCustomerResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function cacheNodePreviewResourceArraySerializer( - result: Array, +export function enterpriseMccCustomerResourceArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return cacheNodePreviewResourceSerializer(item); + return enterpriseMccCustomerResourceSerializer(item); }); } -export function cacheNodePreviewResourceArrayDeserializer( - result: Array, +export function enterpriseMccCustomerResourceArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return cacheNodePreviewResourceDeserializer(item); + return enterpriseMccCustomerResourceDeserializer(item); }); } -/** ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and customer resources used in private preview */ -export interface EnterprisePreviewResource extends TrackedResource { +/** Represents the high level Nodes needed to provision cache node resources */ +export interface EnterpriseMccCacheNodeResource extends TrackedResource { /** The resource-specific properties for this resource. */ - properties?: CacheNodeOldResponse; + properties?: CacheNodeProperty; } -export function enterprisePreviewResourceSerializer(item: EnterprisePreviewResource): any { +export function enterpriseMccCacheNodeResourceSerializer( + item: EnterpriseMccCacheNodeResource, +): any { return { tags: item["tags"], location: item["location"], properties: !item["properties"] ? item["properties"] - : cacheNodeOldResponseSerializer(item["properties"]), + : cacheNodePropertySerializer(item["properties"]), }; } -export function enterprisePreviewResourceDeserializer(item: any): EnterprisePreviewResource { +export function enterpriseMccCacheNodeResourceDeserializer( + item: any, +): EnterpriseMccCacheNodeResource { return { - tags: item["tags"], + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), location: item["location"], id: item["id"], name: item["name"], @@ -1589,147 +1793,103 @@ export function enterprisePreviewResourceDeserializer(item: any): EnterprisePrev : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodeOldResponseDeserializer(item["properties"]), + : cacheNodePropertyDeserializer(item["properties"]), }; } -/** The response of a EnterprisePreviewResource list operation. */ -export interface _EnterprisePreviewResourceListResult { - /** The EnterprisePreviewResource items on this page */ - value: EnterprisePreviewResource[]; +/** The response of a EnterpriseMccCacheNodeResource list operation. */ +export interface _EnterpriseMccCacheNodeResourceListResult { + /** The EnterpriseMccCacheNodeResource items on this page */ + value: EnterpriseMccCacheNodeResource[]; /** The link to the next page of items */ nextLink?: string; } -export function _enterprisePreviewResourceListResultDeserializer( +export function _enterpriseMccCacheNodeResourceListResultDeserializer( item: any, -): _EnterprisePreviewResourceListResult { +): _EnterpriseMccCacheNodeResourceListResult { return { - value: enterprisePreviewResourceArrayDeserializer(item["value"]), + value: enterpriseMccCacheNodeResourceArrayDeserializer(item["value"]), nextLink: item["nextLink"], }; } -export function enterprisePreviewResourceArraySerializer( - result: Array, +export function enterpriseMccCacheNodeResourceArraySerializer( + result: Array, ): any[] { return result.map((item) => { - return enterprisePreviewResourceSerializer(item); + return enterpriseMccCacheNodeResourceSerializer(item); }); } -export function enterprisePreviewResourceArrayDeserializer( - result: Array, +export function enterpriseMccCacheNodeResourceArrayDeserializer( + result: Array, ): any[] { return result.map((item) => { - return enterprisePreviewResourceDeserializer(item); - }); -} - -/** 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); + return enterpriseMccCacheNodeResourceDeserializer(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. */ - readonly 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. */ - actionType?: ActionType; +/** Mcc cache node resource Tls certificate history details. */ +export interface MccCacheNodeTlsCertificateHistory extends TrackedResource { + /** Mcc cache node resource Tls certificate details. */ + properties?: MccCacheNodeTlsCertificateProperties; } -export function operationDeserializer(item: any): Operation { +export function mccCacheNodeTlsCertificateHistoryDeserializer( + item: any, +): MccCacheNodeTlsCertificateHistory { return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], name: item["name"], - isDataAction: item["isDataAction"], - display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), - origin: item["origin"], - actionType: item["actionType"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : mccCacheNodeTlsCertificatePropertiesDeserializer(item["properties"]), }; } -/** 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; +/** Mcc cache node resource auto update properties. */ +export interface MccCacheNodeTlsCertificateProperties { + /** Mcc customer resource Id. */ + readonly customerId?: string; + /** Mcc cache node resource Id. */ + readonly cacheNodeId?: string; + /** Cache node resource tls certificate history details. */ + tlsCertificateHistory?: MccCacheNodeTlsCertificate[]; } -export function operationDisplayDeserializer(item: any): OperationDisplay { +export function mccCacheNodeTlsCertificatePropertiesDeserializer( + item: any, +): MccCacheNodeTlsCertificateProperties { return { - provider: item["provider"], - resource: item["resource"], - operation: item["operation"], - description: item["description"], + customerId: item["customerId"], + cacheNodeId: item["cacheNodeId"], + tlsCertificateHistory: !item["tlsCertificateHistory"] + ? item["tlsCertificateHistory"] + : mccCacheNodeTlsCertificateArrayDeserializer(item["tlsCertificateHistory"]), }; } -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** user */ - User = "user", - /** system */ - System = "system", - /** user,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** \ - * **system** \ - * **user,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", +export function mccCacheNodeTlsCertificateArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return mccCacheNodeTlsCertificateDeserializer(item); + }); } -/** - * 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; - /** The available API versions. */ export enum KnownVersions { /** Microsoft Connected Cache Rest Api version 2023-05-01-preview */ - v2023_05_01_preview = "2023-05-01-preview", + V20230501Preview = "2023-05-01-preview", + /** Microsoft Connected Cache Rest Api version 2024-11-30-preview */ + V20241130Preview = "2024-11-30-preview", } diff --git a/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts b/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts index 0ea35ff9340e..611ef112e94b 100644 --- a/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts +++ b/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts @@ -1,34 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ConnectedCacheClient } from "./connectedCacheClient.js"; -import { _enterpriseCustomerOperationsCreateOrUpdateDeserialize } from "./api/enterpriseCustomerOperations/index.js"; -import { _cacheNodesOperationsCreateorUpdateDeserialize } from "./api/cacheNodesOperations/index.js"; +import type { ConnectedCacheClient } from "./connectedCacheClient.js"; import { - _ispCustomersCreateOrUpdateDeserialize, - _ispCustomersDeleteDeserialize, -} from "./api/ispCustomers/index.js"; + _$deleteDeserialize, + _createOrUpdateDeserialize, +} from "./api/enterpriseMccCacheNodesOperations/operations.js"; import { - _ispCacheNodesOperationsCreateOrUpdateDeserialize, - _ispCacheNodesOperationsDeleteDeserialize, -} from "./api/ispCacheNodesOperations/index.js"; + _$deleteDeserialize as _$deleteDeserializeEnterpriseMccCustomers, + _createOrUpdateDeserialize as _createOrUpdateDeserializeEnterpriseMccCustomers, +} from "./api/enterpriseMccCustomers/operations.js"; import { - _enterpriseMccCustomersCreateOrUpdateDeserialize, - _enterpriseMccCustomersDeleteDeserialize, -} from "./api/enterpriseMccCustomers/index.js"; + _$deleteDeserialize as _$deleteDeserializeIspCacheNodesOperations, + _createOrUpdateDeserialize as _createOrUpdateDeserializeIspCacheNodesOperations, +} from "./api/ispCacheNodesOperations/operations.js"; import { - _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, - _enterpriseMccCacheNodesOperationsDeleteDeserialize, -} from "./api/enterpriseMccCacheNodesOperations/index.js"; + _$deleteDeserialize as _$deleteDeserializeIspCustomers, + _createOrUpdateDeserialize as _createOrUpdateDeserializeIspCustomers, +} from "./api/ispCustomers/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"; +import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro"; +import { deserializeState } from "@azure/core-lro"; export interface RestorePollerOptions< TResult, @@ -88,60 +82,44 @@ export function restorePoller( } interface DeserializationHelper { - deserializer: Function; + deserializer: (result: PathUncheckedResponse) => Promise; expectedStatuses: string[]; } const deserializeMap: Record = { - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}": - { - deserializer: _enterpriseCustomerOperationsCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}": - { - deserializer: _cacheNodesOperationsCreateorUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": - { - deserializer: _ispCustomersCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], - }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": + { deserializer: _$deleteDeserialize, expectedStatuses: ["202", "204", "200", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": + { deserializer: _createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": { - deserializer: _ispCustomersDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], + deserializer: _$deleteDeserializeEnterpriseMccCustomers, + expectedStatuses: ["202", "204", "200", "201"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": { - deserializer: _ispCacheNodesOperationsCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], + deserializer: _createOrUpdateDeserializeEnterpriseMccCustomers, + expectedStatuses: ["200", "201", "202"], }, "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": { - deserializer: _ispCacheNodesOperationsDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": - { - deserializer: _enterpriseMccCustomersCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], + deserializer: _$deleteDeserializeIspCacheNodesOperations, + expectedStatuses: ["202", "204", "200", "201"], }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": { - deserializer: _enterpriseMccCustomersDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], + deserializer: _createOrUpdateDeserializeIspCacheNodesOperations, + expectedStatuses: ["200", "201", "202"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": { - deserializer: _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, - expectedStatuses: ["200", "201"], + deserializer: _$deleteDeserializeIspCustomers, + expectedStatuses: ["202", "204", "200", "201"], }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": { - deserializer: _enterpriseMccCacheNodesOperationsDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], + deserializer: _createOrUpdateDeserializeIspCustomers, + expectedStatuses: ["200", "201", "202"], }, }; diff --git a/sdk/connectedcache/arm-connectedcache/src/static-helpers/cloudSettingHelpers.ts b/sdk/connectedcache/arm-connectedcache/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/static-helpers/cloudSettingHelpers.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * An enum to describe Azure Cloud environments. + * @enum {string} + */ +export enum AzureClouds { + /** Azure public cloud, which is the default cloud for Azure SDKs. */ + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + /** Azure China cloud */ + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + /** Azure US government cloud */ + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT", +} + +/** The supported values for cloud setting as a string literal type */ +export type AzureSupportedClouds = `${AzureClouds}`; + +/** + * Gets the Azure Resource Manager endpoint URL for the specified cloud setting. + * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values. + * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined. + * @throws {Error} Throws an error if an unknown cloud setting is provided. + */ +export function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined { + if (cloudSetting === undefined) { + return undefined; + } + const cloudEndpoints: Record = { + AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/", + AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/", + AZURE_PUBLIC_CLOUD: "https://management.azure.com/", + }; + if (cloudSetting in cloudEndpoints) { + return cloudEndpoints[cloudSetting]; + } else { + throw new Error( + `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`, + ); + } +} diff --git a/sdk/connectedcache/arm-connectedcache/src/static-helpers/pagingHelpers.ts b/sdk/connectedcache/arm-connectedcache/src/static-helpers/pagingHelpers.ts index ce33af5f4178..6f219e3c88cf 100644 --- a/sdk/connectedcache/arm-connectedcache/src/static-helpers/pagingHelpers.ts +++ b/sdk/connectedcache/arm-connectedcache/src/static-helpers/pagingHelpers.ts @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; import { RestError } from "@azure/core-rest-pipeline"; /** @@ -79,6 +80,7 @@ export interface PagedResult< export interface BuildPagedAsyncIteratorOptions { itemName?: string; nextLinkName?: string; + nextLinkMethod?: "GET" | "POST"; } /** @@ -98,12 +100,15 @@ export function buildPagedAsyncIterator< ): PagedAsyncIterableIterator { const itemName = options.itemName ?? "value"; const nextLinkName = options.nextLinkName ?? "nextLink"; + const nextLinkMethod = options.nextLinkMethod ?? "GET"; const pagedResult: PagedResult = { getPage: async (pageLink?: string) => { const result = pageLink === undefined ? await getInitialResponse() - : await client.pathUnchecked(pageLink).get(); + : nextLinkMethod === "POST" + ? await client.pathUnchecked(pageLink).post() + : await client.pathUnchecked(pageLink).get(); checkPagingRequest(result, expectedStatuses); const results = await processResponseBody(result as TResponse); const nextLink = getNextLink(results, nextLinkName); diff --git a/sdk/connectedcache/arm-connectedcache/src/static-helpers/pollingHelpers.ts b/sdk/connectedcache/arm-connectedcache/src/static-helpers/pollingHelpers.ts index f01c41bab69d..63b3c201e5a8 100644 --- a/sdk/connectedcache/arm-connectedcache/src/static-helpers/pollingHelpers.ts +++ b/sdk/connectedcache/arm-connectedcache/src/static-helpers/pollingHelpers.ts @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { +import type { PollerLike, OperationState, ResourceLocationConfig, RunningOperation, - createHttpPoller, OperationResponse, } from "@azure/core-lro"; +import { createHttpPoller } from "@azure/core-lro"; -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; export interface GetLongRunningPollerOptions { /** Delay to wait until next poll, in milliseconds. */ diff --git a/sdk/connectedcache/arm-connectedcache/src/static-helpers/urlTemplate.ts b/sdk/connectedcache/arm-connectedcache/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..c7109898692a --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/static-helpers/urlTemplate.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// --------------------- +// interfaces +// --------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string): string { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string): string { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string): string { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any): boolean { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false): string { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions): string { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions): string | undefined { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + const result = template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + op = expr[0]; + expr = expr.slice(1); + } + const varList = expr.split(/,/g); + const 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(""); + }); + + return normalizeUnreserved(result); +} + +/** + * Normalize an expanded URI by decoding percent-encoded unreserved characters. + * RFC 3986 unreserved: "-" / "." / "~" + */ +function normalizeUnreserved(uri: string): string { + return uri.replace(/%([0-9A-Fa-f]{2})/g, (match, hex) => { + const char = String.fromCharCode(parseInt(hex, 16)); + // Decode only if it's unreserved + if (/[\-.~]/.test(char)) { + return char; + } + return match; // leave other encodings intact + }); +} diff --git a/sdk/connectedcache/arm-connectedcache/tsp-location.yaml b/sdk/connectedcache/arm-connectedcache/tsp-location.yaml index ddb9a7d0443d..ae6822914b92 100644 --- a/sdk/connectedcache/arm-connectedcache/tsp-location.yaml +++ b/sdk/connectedcache/arm-connectedcache/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/connectedcache/ConnectedCache.Management -commit: 60c67f112c66537f1d006bf1b497857ccd2afacd -repo: ../azure-rest-api-specs +commit: be46becafeb29aa993898709e35759d3643b2809 +repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/connectedcache/ci.mgmt.yml b/sdk/connectedcache/ci.mgmt.yml index e2071197a709..fd40b53b0da0 100644 --- a/sdk/connectedcache/ci.mgmt.yml +++ b/sdk/connectedcache/ci.mgmt.yml @@ -6,6 +6,8 @@ trigger: - main - release/* - hotfix/* + exclude: + - feature/v4 paths: include: - sdk/connectedcache/ci.mgmt.yml