From ee810b376f273abae0b30305536b903e9369360b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 6 May 2025 19:52:22 +0000 Subject: [PATCH] CodeGen from PR 34464 in Azure/azure-rest-api-specs Merge 3c8ad9b3c65fea060e5c3a0ac42e700ba289f06f into b3dfafdf8ef76a48e56f0e1916f5155993005cab --- .../arm-connectedcache/CHANGELOG.md | 52 + sdk/connectedcache/arm-connectedcache/LICENSE | 2 +- .../arm-connectedcache/README.md | 14 +- .../arm-connectedcache/assets.json | 6 - .../arm-connectedcache/eslint.config.mjs | 14 + .../arm-connectedcache/package.json | 63 +- .../review/arm-connectedcache-api.api.md | 27 + .../review/arm-connectedcache-models.api.md | 134 +- .../review/arm-connectedcache.api.md | 227 +- ...acheNodesOperationsCreateorUpdateSample.ts | 38 - .../cacheNodesOperationsDeleteSample.ts | 27 - .../cacheNodesOperationsGetSample.ts | 28 - ...odesOperationsListByResourceGroupSample.ts | 29 - ...NodesOperationsListBySubscriptionSample.ts | 29 - .../cacheNodesOperationsUpdateSample.ts | 27 - ...eCustomerOperationsCreateOrUpdateSample.ts | 34 - ...nterpriseCustomerOperationsDeleteSample.ts | 27 - .../enterpriseCustomerOperationsGetSample.ts | 25 - ...omerOperationsListByResourceGroupSample.ts | 31 - ...tomerOperationsListBySubscriptionSample.ts | 29 - ...nterpriseCustomerOperationsUpdateSample.ts | 29 - ...acheNodesOperationsCreateOrUpdateSample.ts | 3 +- ...riseMccCacheNodesOperationsDeleteSample.ts | 2 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 2 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + ...GetCacheNodeTlsCertificateHistorySample.ts | 29 + ...erpriseMccCacheNodesOperationsGetSample.ts | 2 +- ...stByEnterpriseMccCustomerResourceSample.ts | 2 +- ...riseMccCacheNodesOperationsUpdateSample.ts | 2 +- ...erpriseMccCustomersCreateOrUpdateSample.ts | 3 +- .../enterpriseMccCustomersDeleteSample.ts | 2 +- .../enterpriseMccCustomersGetSample.ts | 2 +- ...seMccCustomersListByResourceGroupSample.ts | 2 +- ...iseMccCustomersListBySubscriptionSample.ts | 2 +- .../enterpriseMccCustomersUpdateSample.ts | 2 +- ...acheNodesOperationsCreateOrUpdateSample.ts | 3 +- .../ispCacheNodesOperationsDeleteSample.ts | 2 +- ...spCacheNodesOperationsGetBgpCidrsSample.ts | 2 +- ...ionsGetCacheNodeAutoUpdateHistorySample.ts | 29 + ...rationsGetCacheNodeInstallDetailsSample.ts | 2 +- ...etCacheNodeMccIssueDetailsHistorySample.ts | 29 + .../ispCacheNodesOperationsGetSample.ts | 2 +- ...erationsListByIspCustomerResourceSample.ts | 2 +- .../ispCacheNodesOperationsUpdateSample.ts | 2 +- .../ispCustomersCreateOrUpdateSample.ts | 3 +- .../samples-dev/ispCustomersDeleteSample.ts | 2 +- .../samples-dev/ispCustomersGetSample.ts | 2 +- .../ispCustomersListByResourceGroupSample.ts | 2 +- .../ispCustomersListBySubscriptionSample.ts | 2 +- .../samples-dev/ispCustomersUpdateSample.ts | 2 +- .../samples-dev/operationsListSample.ts | 2 +- .../samples/v1-beta/javascript/README.md | 90 +- ...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 | 5 +- .../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 | 6 +- .../samples/v1-beta/javascript/package.json | 2 +- .../samples/v1-beta/typescript/README.md | 90 +- .../samples/v1-beta/typescript/package.json | 2 +- ...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 | 5 +- .../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 | 6 +- .../samples/v1-beta/typescript/tsconfig.json | 21 +- .../src/api/cacheNodesOperations/index.ts | 338 --- .../src/api/connectedCacheContext.ts | 21 +- .../api/enterpriseCustomerOperations/index.ts | 350 --- .../index.ts | 406 +-- .../operations.ts | 654 +++++ .../options.ts | 43 + .../src/api/enterpriseMccCustomers/index.ts | 357 +-- .../api/enterpriseMccCustomers/operations.ts | 404 +++ .../src/api/enterpriseMccCustomers/options.ts | 28 + .../arm-connectedcache/src/api/index.ts | 90 - .../src/api/ispCacheNodesOperations/index.ts | 451 +-- .../api/ispCacheNodesOperations/operations.ts | 642 +++++ .../api/ispCacheNodesOperations/options.ts | 41 + .../src/api/ispCustomers/index.ts | 335 +-- .../src/api/ispCustomers/operations.ts | 383 +++ .../src/api/ispCustomers/options.ts | 28 + .../src/api/operations/index.ts | 52 +- .../src/api/operations/operations.ts | 71 + .../src/api/operations/options.ts | 7 + .../arm-connectedcache/src/api/options.ts | 155 -- .../src/classic/cacheNodesOperations/index.ts | 135 - .../enterpriseCustomerOperations/index.ts | 143 - .../index.ts | 201 +- .../classic/enterpriseMccCustomers/index.ts | 137 +- .../arm-connectedcache/src/classic/index.ts | 2 - .../classic/ispCacheNodesOperations/index.ts | 194 +- .../src/classic/ispCustomers/index.ts | 129 +- .../src/classic/operations/index.ts | 10 +- .../src/connectedCacheClient.ts | 78 +- .../src/helpers/serializerHelpers.ts | 36 - .../arm-connectedcache/src/index.ts | 144 +- .../arm-connectedcache/src/models/index.ts | 65 +- .../arm-connectedcache/src/models/models.ts | 2455 +++++++++-------- .../src/restorePollerHelpers.ts | 66 +- .../src/static-helpers/urlTemplate.ts | 197 ++ .../connectedcache_operations_test.spec.ts | 48 - .../test/public/sampleTest.spec.ts | 20 + .../test/public/utils/recordedClient.ts | 3 +- .../arm-connectedcache/tsp-location.yaml | 2 +- .../vitest.browser.config.ts | 3 +- .../arm-connectedcache/vitest.config.ts | 1 + .../arm-connectedcache/vitest.esm.config.ts | 6 +- sdk/connectedcache/ci.mgmt.yml | 2 + 186 files changed, 5535 insertions(+), 6070 deletions(-) delete mode 100644 sdk/connectedcache/arm-connectedcache/assets.json create mode 100644 sdk/connectedcache/arm-connectedcache/eslint.config.mjs create mode 100644 sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api.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/urlTemplate.ts delete mode 100644 sdk/connectedcache/arm-connectedcache/test/public/connectedcache_operations_test.spec.ts create mode 100644 sdk/connectedcache/arm-connectedcache/test/public/sampleTest.spec.ts diff --git a/sdk/connectedcache/arm-connectedcache/CHANGELOG.md b/sdk/connectedcache/arm-connectedcache/CHANGELOG.md index c70842647d83..d9be4a2e24d4 100644 --- a/sdk/connectedcache/arm-connectedcache/CHANGELOG.md +++ b/sdk/connectedcache/arm-connectedcache/CHANGELOG.md @@ -1,5 +1,57 @@ # Release History +## 1.0.0-beta.2 (2025-05-06) +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 + - 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 + - Interface AdditionalCacheNodeProperties no longer has parameter proxyUrl + - Interface AdditionalCacheNodeProperties no longer has parameter updateCycleType + - Interface AdditionalCustomerProperties no longer has parameter peeringDbLastUpdateTime + - Class ConnectedCacheClient no longer has parameter cacheNodesOperations + - Class ConnectedCacheClient no longer has parameter enterpriseCustomerOperations + - 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) ### Features Added diff --git a/sdk/connectedcache/arm-connectedcache/LICENSE b/sdk/connectedcache/arm-connectedcache/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/connectedcache/arm-connectedcache/LICENSE +++ b/sdk/connectedcache/arm-connectedcache/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/connectedcache/arm-connectedcache/README.md b/sdk/connectedcache/arm-connectedcache/README.md index 71666b24b39b..89658d5f2762 100644 --- a/sdk/connectedcache/arm-connectedcache/README.md +++ b/sdk/connectedcache/arm-connectedcache/README.md @@ -6,8 +6,10 @@ Microsoft Connected Cache Rest Api version 2023-05-01-preview Key links: +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedcache/arm-connectedcache) - [Package (NPM)](https://www.npmjs.com/package/@azure/arm-connectedcache) - [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-connectedcache?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedcache/arm-connectedcache/samples) ## Getting started @@ -44,7 +46,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ConnectedCache** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -64,16 +65,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { ConnectedCacheClient } from "@azure/arm-connectedcache"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); + clientId: "" + }); const client = new ConnectedCacheClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts @@ -96,6 +96,10 @@ setLogLevel("info"); For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). +## Next steps + +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedcache/arm-connectedcache/samples) directory for detailed examples on how to use this library. + ## Contributing If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. diff --git a/sdk/connectedcache/arm-connectedcache/assets.json b/sdk/connectedcache/arm-connectedcache/assets.json deleted file mode 100644 index b77abda6fd33..000000000000 --- a/sdk/connectedcache/arm-connectedcache/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/connectedcache/arm-connectedcache", - "Tag": "js/connectedcache/arm-connectedcache_c716744a2d" -} diff --git a/sdk/connectedcache/arm-connectedcache/eslint.config.mjs b/sdk/connectedcache/arm-connectedcache/eslint.config.mjs new file mode 100644 index 000000000000..6d2f8a5914c3 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/eslint.config.mjs @@ -0,0 +1,14 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/connectedcache/arm-connectedcache/package.json b/sdk/connectedcache/arm-connectedcache/package.json index 1a99556f6c8b..9b02745fcd5b 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": ">=18.0.0" @@ -8,11 +8,11 @@ "sideEffects": false, "autoPublish": false, "tshy": { - "project": "./tsconfig.src.json", "exports": { "./package.json": "./package.json", ".": "./src/index.ts", - "./models": "./src/models/index.ts" + "./models": "./src/models/index.ts", + "./api": "./src/api/index.ts" }, "dialects": [ "esm", @@ -22,7 +22,8 @@ "browser", "react-native" ], - "selfLink": false + "selfLink": false, + "project": "./tsconfig.src.json" }, "type": "module", "keywords": [ @@ -47,6 +48,7 @@ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/connectedcache/arm-connectedcache/README.md", "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "//metadata": { "constantPaths": [ @@ -61,9 +63,9 @@ "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", "@azure/core-lro": "^3.1.0", - "@azure/core-rest-pipeline": "^1.18.2", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.1.4", + "@azure/core-rest-pipeline": "^1.20.0", + "@azure/core-util": "^1.12.0", + "@azure/logger": "^1.2.0", "tslib": "^2.8.1" }, "devDependencies": { @@ -72,32 +74,39 @@ "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.6.0", + "@azure/identity": "^4.9.1", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", "eslint": "^9.9.0", - "playwright": "^1.49.1", + "playwright": "^1.52.0", "typescript": "~5.8.2", "vitest": "^3.0.9" }, "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "dev-tool samples run samples-dev", "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "generate:client": "echo skipped", - "lint": "echo skipped", - "lint:fix": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "dev-tool run test:vitest --esm", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "test": "npm run test:node && npm run test:browser", - "test:browser": "echo skipped", - "test:node": "dev-tool run test:vitest", - "test:node:esm": "dev-tool run test:vitest --esm", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "dev-tool run update-snippets" }, "//sampleConfiguration": { @@ -108,6 +117,8 @@ "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-connectedcache?view=azure-node-preview" }, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", "exports": { "./package.json": "./package.json", ".": { @@ -145,11 +156,27 @@ "types": "./dist/commonjs/models/index.d.ts", "default": "./dist/commonjs/models/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" + } } }, "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js", - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js" + "module": "./dist/esm/index.js" } diff --git a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api.api.md new file mode 100644 index 000000000000..a735fa7c5cc8 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-api.api.md @@ -0,0 +1,27 @@ +## 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 { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; + +// @public +export interface ConnectedCacheClientOptionalParams extends ClientOptions { + apiVersion?: string; +} + +// @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-models.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models.api.md index 3098b9173d57..62c10fa2873d 100644 --- a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models.api.md +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache-models.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,11 +242,6 @@ export interface EnterpriseMccCustomerResource extends TrackedResource { properties?: CustomerProperty; } -// @public -export interface EnterprisePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; -} - // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -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.api.md b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache.api.md index 13c710d3ae35..b19f42ffbfd1 100644 --- a/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache.api.md +++ b/sdk/connectedcache/arm-connectedcache/review/arm-connectedcache.api.md @@ -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; @@ -170,24 +173,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 +193,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; @@ -309,60 +263,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 { +export interface EnterpriseMccCacheNodeResource extends TrackedResource { + properties?: CacheNodeProperty; } // @public -export interface EnterpriseCustomerOperationsListBySubscriptionOptionalParams extends OperationOptions { +export interface EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @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 EnterpriseMccCacheNodesOperationsDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface EnterpriseCustomerOperationsUpdateOptionalParams extends OperationOptions { +export interface EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams extends OperationOptions { } // @public -export interface EnterpriseMccCacheNodeResource extends TrackedResource { - properties?: CacheNodeProperty; -} - -// @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 +306,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,11 +359,6 @@ export interface EnterpriseMccCustomersOperations { export interface EnterpriseMccCustomersUpdateOptionalParams extends OperationOptions { } -// @public -export interface EnterprisePreviewResource extends TrackedResource { - properties?: CacheNodeOldResponse; -} - // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -448,6 +374,11 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface IspCacheNodeResource extends TrackedResource { properties?: CacheNodeProperty; @@ -467,10 +398,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 +424,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 +499,7 @@ export enum KnownBgpReviewStateEnum { // @public export enum KnownConfigurationState { Configured = "Configured", - NotConfigured_Ip = "NotConfigured_Ip" + NotConfiguredIp = "NotConfigured_Ip" } // @public @@ -576,13 +517,6 @@ export enum KnownCustomerTransitState { TransitOnly = "TransitOnly" } -// @public -export enum KnownCycleType { - Fast = "Fast", - Preview = "Preview", - Slow = "Slow" -} - // @public export enum KnownOrigin { System = "system", @@ -616,7 +550,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 +597,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 b13a69b89fb2..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 { - 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 2eee537bf8ff..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 { - 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 4bc1e1bbbc5f..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 { - 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 6afeea3dc728..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsListByResourceGroupSample.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 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 (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 f11d13768252..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 (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 12d771cbb1e5..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/cacheNodesOperationsUpdateSample.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 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 { - 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 0c4ad4eeb0d1..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,34 +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 { - 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 52d3077feacf..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 { - 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 943945f379e9..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseCustomerOperationsGetSample.ts +++ /dev/null @@ -1,25 +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 { - 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 3c1ea174d0f7..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 (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 c6027f3ae57d..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 (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 2cf1965de1d7..000000000000 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/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 { - 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 70b6e8f00a3f..a37430068b55 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); @@ -51,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 e220d3a89a89..a82e0040e29a 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); 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 42de698f2395..0c666defeae2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -8,7 +8,7 @@ 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(); 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 d2e6caa3815e..e292b2831339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts index 87f0bd8b1389..9780aad2c7ff 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts index bfcdcfb3ac5c..51862151564b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts index ee7bebe89fb4..c053a0620be2 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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", diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts index 1efe4db0a417..a279d567ca45 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts index ce1f3959875a..22b9c75e3e14 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts index 64eff86bae36..89edb8855339 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListByResourceGroupSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts index 69eebe110762..36460eb3428e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersListBySubscriptionSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts index ac709ed5ae96..c90b375ae35f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/enterpriseMccCustomersUpdateSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts index b48e7e670415..90ee7efa9af0 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); @@ -48,7 +48,6 @@ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { 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 dd4e25b232f4..3997fba0b6fc 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsDeleteSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts index 8df4d52833eb..c6d7f9598580 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetBgpCidrsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); 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 728862d6a89b..b97777a1b132 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetCacheNodeInstallDetailsSample.ts @@ -8,7 +8,7 @@ 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(); 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 3e6861bd1095..c8b4a39c8a2e 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts index 4e33e247dfa1..8f44bf5e9b7b 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsListByIspCustomerResourceSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts index 73d4b20f50bf..44885b5c7b48 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCacheNodesOperationsUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts index 5c461b95b0ec..984d4867b254 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ 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(); @@ -35,6 +35,7 @@ async function ispCustomerCreateOrUpdateGeneratedByMaximumSetRule(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts index 857aeb94e672..d4c6e7160d9f 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersGetSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts index fdac78d8ac00..bfa31b3f32bf 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListByResourceGroupSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts index f6732c709282..9b342c59e0af 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersListBySubscriptionSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts index 5224b6d1f2aa..84b483d512e8 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/ispCustomersUpdateSample.ts @@ -8,7 +8,7 @@ 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(); diff --git a/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts b/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts index b06062316f45..0556e7407ebd 100644 --- a/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts +++ b/sdk/connectedcache/arm-connectedcache/samples-dev/operationsListSample.ts @@ -8,7 +8,7 @@ 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(); 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 1c6b752133a1..37aece6461ca 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): ```bash -npx dev-tool run vendored cross-env node cacheNodesOperationsCreateorUpdateSample.js +npx dev-tool run vendored cross-env 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..c04fe18deafc 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(); @@ -48,7 +48,6 @@ async function ispCacheNodesOperationsCreateOrUpdate() { bgpConfiguration: { asnToIpAddressMapping: "pafcimhoog" }, cacheNodePropertiesDetailsIssuesList: ["ex"], proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "qhux", optionalProperty1: "hvpmt", optionalProperty2: "talanelmsgxvksrzoeeontqkjzbpv", optionalProperty3: "bxkoxq", @@ -67,7 +66,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..f97014454224 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 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 df7403e2f7aa..3070636b4c04 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,6 @@ "dependencies": { "@azure/arm-connectedcache": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.9.1" } } 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 6bd83f34fbbb..62a59b6bef97 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): ```bash -npx dev-tool run vendored cross-env node dist/cacheNodesOperationsCreateorUpdateSample.js +npx dev-tool run vendored cross-env 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 755c035c082d..2476da99ebef 100644 --- a/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json +++ b/sdk/connectedcache/arm-connectedcache/samples/v1-beta/typescript/package.json @@ -32,7 +32,7 @@ "dependencies": { "@azure/arm-connectedcache": "next", "dotenv": "latest", - "@azure/identity": "^4.2.1" + "@azure/identity": "^4.9.1" }, "devDependencies": { "@types/node": "^18.0.0", 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..90ee7efa9af0 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(); @@ -48,7 +48,6 @@ async function ispCacheNodesOperationsCreateOrUpdate(): Promise { bgpConfiguration: { asnToIpAddressMapping: "pafcimhoog" }, cacheNodePropertiesDetailsIssuesList: ["ex"], proxyUrlConfiguration: { proxyUrl: "hplstyg" }, - proxyUrl: "qhux", optionalProperty1: "hvpmt", optionalProperty2: "talanelmsgxvksrzoeeontqkjzbpv", optionalProperty3: "bxkoxq", @@ -67,7 +66,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..0556e7407ebd 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 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..ecc2b2af7b41 100644 --- a/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts +++ b/sdk/connectedcache/arm-connectedcache/src/api/connectedCacheContext.ts @@ -7,7 +7,13 @@ import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; import { 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 { @@ -19,11 +25,12 @@ export interface ConnectedCacheClientOptionalParams extends ClientOptions { /** 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 ?? options.baseUrl ?? "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}`; @@ -37,7 +44,7 @@ export function createConnectedCache( }; 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 +60,9 @@ 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..bd41ad1bcd3c 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 { + enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails, + enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource, + enterpriseMccCacheNodesOperationsDelete, + enterpriseMccCacheNodesOperationsUpdate, + enterpriseMccCacheNodesOperationsCreateOrUpdate, + enterpriseMccCacheNodesOperationsGet, +} 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..8c0505974596 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/operations.ts @@ -0,0 +1,654 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ConnectedCachePatchResource, + connectedCachePatchResourceSerializer, + MccCacheNodeInstallDetails, + mccCacheNodeInstallDetailsDeserializer, + MccCacheNodeAutoUpdateHistory, + mccCacheNodeAutoUpdateHistoryDeserializer, + MccCacheNodeIssueHistory, + mccCacheNodeIssueHistoryDeserializer, + EnterpriseMccCacheNodeResource, + enterpriseMccCacheNodeResourceSerializer, + enterpriseMccCacheNodeResourceDeserializer, + _EnterpriseMccCacheNodeResourceListResult, + _enterpriseMccCacheNodeResourceListResultDeserializer, + MccCacheNodeTlsCertificateHistory, + mccCacheNodeTlsCertificateHistoryDeserializer, +} from "../../models/models.js"; +import { + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySend( + 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 _enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryDeserialize( + 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 enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryDeserialize(result); +} + +export function _enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySend( + 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 _enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryDeserialize( + 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 enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryDeserialize(result); +} + +export function _enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySend( + 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 _enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryDeserialize( + 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 enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryDeserialize(result); +} + +export function _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSend( + 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 _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize( + 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 enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize(result); +} + +export function _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSend( + 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 _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceDeserialize( + 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 enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceSend( + context, + resourceGroupName, + customerResourceName, + options, + ), + _enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _enterpriseMccCacheNodesOperationsDeleteSend( + 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), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _enterpriseMccCacheNodesOperationsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCacheNode resource */ +export function enterpriseMccCacheNodesOperationsDelete( + context: Client, + 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, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _enterpriseMccCacheNodesOperationsUpdateSend( + 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 _enterpriseMccCacheNodesOperationsUpdateDeserialize( + 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 enterpriseMccCacheNodesOperationsUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCacheNodesOperationsUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsUpdateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ); + return _enterpriseMccCacheNodesOperationsUpdateDeserialize(result); +} + +export function _enterpriseMccCacheNodesOperationsCreateOrUpdateSend( + 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 _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + 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 enterpriseMccCacheNodesOperationsCreateOrUpdate( + context: Client, + 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, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, EnterpriseMccCacheNodeResource>; +} + +export function _enterpriseMccCacheNodesOperationsGetSend( + 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 _enterpriseMccCacheNodesOperationsGetDeserialize( + 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 enterpriseMccCacheNodesOperationsGet( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: EnterpriseMccCacheNodesOperationsGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _enterpriseMccCacheNodesOperationsGetSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _enterpriseMccCacheNodesOperationsGetDeserialize(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..6d08a6ada857 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCacheNodesOperations/options.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { 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..e78c1f0eb72e 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 { + enterpriseMccCustomersListBySubscription, + enterpriseMccCustomersListByResourceGroup, + enterpriseMccCustomersDelete, + enterpriseMccCustomersUpdate, + enterpriseMccCustomersCreateOrUpdate, + enterpriseMccCustomersGet, +} 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..11ae689b0643 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/enterpriseMccCustomers/operations.ts @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ConnectedCachePatchResource, + connectedCachePatchResourceSerializer, + EnterpriseMccCustomerResource, + enterpriseMccCustomerResourceSerializer, + enterpriseMccCustomerResourceDeserializer, + _EnterpriseMccCustomerResourceListResult, + _enterpriseMccCustomerResourceListResultDeserializer, +} from "../../models/models.js"; +import { + EnterpriseMccCustomersListBySubscriptionOptionalParams, + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, + EnterpriseMccCustomersUpdateOptionalParams, + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _enterpriseMccCustomersListBySubscriptionSend( + 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 _enterpriseMccCustomersListBySubscriptionDeserialize( + 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 enterpriseMccCustomersListBySubscription( + context: Client, + options: EnterpriseMccCustomersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _enterpriseMccCustomersListBySubscriptionSend(context, options), + _enterpriseMccCustomersListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _enterpriseMccCustomersListByResourceGroupSend( + 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 _enterpriseMccCustomersListByResourceGroupDeserialize( + 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 enterpriseMccCustomersListByResourceGroup( + context: Client, + resourceGroupName: string, + options: EnterpriseMccCustomersListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _enterpriseMccCustomersListByResourceGroupSend(context, resourceGroupName, options), + _enterpriseMccCustomersListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _enterpriseMccCustomersDeleteSend( + 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), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _enterpriseMccCustomersDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing enterprise mcc customer resource */ +export function enterpriseMccCustomersDelete( + context: Client, + 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, + resourceGroupName, + customerResourceName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _enterpriseMccCustomersUpdateSend( + 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 _enterpriseMccCustomersUpdateDeserialize( + 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 enterpriseMccCustomersUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: EnterpriseMccCustomersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _enterpriseMccCustomersUpdateSend( + context, + resourceGroupName, + customerResourceName, + properties, + options, + ); + return _enterpriseMccCustomersUpdateDeserialize(result); +} + +export function _enterpriseMccCustomersCreateOrUpdateSend( + 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 _enterpriseMccCustomersCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + 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 enterpriseMccCustomersCreateOrUpdate( + context: Client, + 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, + resourceGroupName, + customerResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, EnterpriseMccCustomerResource>; +} + +export function _enterpriseMccCustomersGetSend( + 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 _enterpriseMccCustomersGetDeserialize( + 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 enterpriseMccCustomersGet( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: EnterpriseMccCustomersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _enterpriseMccCustomersGetSend( + context, + resourceGroupName, + customerResourceName, + options, + ); + return _enterpriseMccCustomersGetDeserialize(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..17ad0e568aff --- /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 { 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..703edefeb451 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 { + ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory, + ispCacheNodesOperationsGetCacheNodeAutoUpdateHistory, + ispCacheNodesOperationsGetCacheNodeInstallDetails, + ispCacheNodesOperationsGetBgpCidrs, + ispCacheNodesOperationsListByIspCustomerResource, + ispCacheNodesOperationsDelete, + ispCacheNodesOperationsUpdate, + ispCacheNodesOperationsCreateOrUpdate, + ispCacheNodesOperationsGet, +} 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..b800358bb739 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/operations.ts @@ -0,0 +1,642 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ConnectedCachePatchResource, + connectedCachePatchResourceSerializer, + IspCacheNodeResource, + ispCacheNodeResourceSerializer, + ispCacheNodeResourceDeserializer, + _IspCacheNodeResourceListResult, + _ispCacheNodeResourceListResultDeserializer, + MccCacheNodeBgpCidrDetails, + mccCacheNodeBgpCidrDetailsDeserializer, + MccCacheNodeInstallDetails, + mccCacheNodeInstallDetailsDeserializer, + MccCacheNodeAutoUpdateHistory, + mccCacheNodeAutoUpdateHistoryDeserializer, + MccCacheNodeIssueHistory, + mccCacheNodeIssueHistoryDeserializer, +} from "../../models/models.js"; +import { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + IspCacheNodesOperationsGetBgpCidrsOptionalParams, + IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, + IspCacheNodesOperationsUpdateOptionalParams, + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySend( + 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 _ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryDeserialize( + 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 ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryDeserialize(result); +} + +export function _ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySend( + 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 _ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryDeserialize( + 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 ispCacheNodesOperationsGetCacheNodeAutoUpdateHistory( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _ispCacheNodesOperationsGetCacheNodeAutoUpdateHistorySend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _ispCacheNodesOperationsGetCacheNodeAutoUpdateHistoryDeserialize(result); +} + +export function _ispCacheNodesOperationsGetCacheNodeInstallDetailsSend( + 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 _ispCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize( + 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 ispCacheNodesOperationsGetCacheNodeInstallDetails( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _ispCacheNodesOperationsGetCacheNodeInstallDetailsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _ispCacheNodesOperationsGetCacheNodeInstallDetailsDeserialize(result); +} + +export function _ispCacheNodesOperationsGetBgpCidrsSend( + 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 _ispCacheNodesOperationsGetBgpCidrsDeserialize( + 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 ispCacheNodesOperationsGetBgpCidrs( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetBgpCidrsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _ispCacheNodesOperationsGetBgpCidrsSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _ispCacheNodesOperationsGetBgpCidrsDeserialize(result); +} + +export function _ispCacheNodesOperationsListByIspCustomerResourceSend( + 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 _ispCacheNodesOperationsListByIspCustomerResourceDeserialize( + 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 ispCacheNodesOperationsListByIspCustomerResource( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCacheNodesOperationsListByIspCustomerResourceOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _ispCacheNodesOperationsListByIspCustomerResourceSend( + context, + resourceGroupName, + customerResourceName, + options, + ), + _ispCacheNodesOperationsListByIspCustomerResourceDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _ispCacheNodesOperationsDeleteSend( + 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), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _ispCacheNodesOperationsDeleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCacheNode resource */ +export function ispCacheNodesOperationsDelete( + context: Client, + 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, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ), + resourceLocationConfig: "location", + }, + ) as PollerLike, void>; +} + +export function _ispCacheNodesOperationsUpdateSend( + 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 _ispCacheNodesOperationsUpdateDeserialize( + 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 ispCacheNodesOperationsUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCacheNodesOperationsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _ispCacheNodesOperationsUpdateSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ); + return _ispCacheNodesOperationsUpdateDeserialize(result); +} + +export function _ispCacheNodesOperationsCreateOrUpdateSend( + 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 _ispCacheNodesOperationsCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + 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 ispCacheNodesOperationsCreateOrUpdate( + context: Client, + 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, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }, + ) as PollerLike, IspCacheNodeResource>; +} + +export function _ispCacheNodesOperationsGetSend( + 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 _ispCacheNodesOperationsGetDeserialize( + 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 ispCacheNodesOperationsGet( + context: Client, + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options: IspCacheNodesOperationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _ispCacheNodesOperationsGetSend( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ); + return _ispCacheNodesOperationsGetDeserialize(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..53a9e22ed35c --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCacheNodesOperations/options.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { 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..3d33430195d4 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 { + ispCustomersListBySubscription, + ispCustomersListByResourceGroup, + ispCustomersDelete, + ispCustomersUpdate, + ispCustomersCreateOrUpdate, + ispCustomersGet, +} 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..bebd9462106f --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/ispCustomers/operations.ts @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IspCustomerResource, + ispCustomerResourceSerializer, + ispCustomerResourceDeserializer, + ConnectedCachePatchResource, + connectedCachePatchResourceSerializer, + _IspCustomerResourceListResult, + _ispCustomerResourceListResultDeserializer, +} from "../../models/models.js"; +import { + IspCustomersListBySubscriptionOptionalParams, + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, + IspCustomersUpdateOptionalParams, + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _ispCustomersListBySubscriptionSend( + 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 _ispCustomersListBySubscriptionDeserialize( + 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 ispCustomersListBySubscription( + context: Client, + options: IspCustomersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _ispCustomersListBySubscriptionSend(context, options), + _ispCustomersListBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _ispCustomersListByResourceGroupSend( + 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 _ispCustomersListByResourceGroupDeserialize( + 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 ispCustomersListByResourceGroup( + context: Client, + resourceGroupName: string, + options: IspCustomersListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _ispCustomersListByResourceGroupSend(context, resourceGroupName, options), + _ispCustomersListByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _ispCustomersDeleteSend( + 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), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _ispCustomersDeleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** This api deletes an existing ispCustomer resource */ +export function ispCustomersDelete( + context: Client, + 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, resourceGroupName, customerResourceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _ispCustomersUpdateSend( + 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 _ispCustomersUpdateDeserialize( + 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 ispCustomersUpdate( + context: Client, + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options: IspCustomersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _ispCustomersUpdateSend( + context, + resourceGroupName, + customerResourceName, + properties, + options, + ); + return _ispCustomersUpdateDeserialize(result); +} + +export function _ispCustomersCreateOrUpdateSend( + 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 _ispCustomersCreateOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + 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 ispCustomersCreateOrUpdate( + context: Client, + 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, + resourceGroupName, + customerResourceName, + resource, + options, + ), + resourceLocationConfig: "azure-async-operation", + }) as PollerLike, IspCustomerResource>; +} + +export function _ispCustomersGetSend( + 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 _ispCustomersGetDeserialize( + 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 ispCustomersGet( + context: Client, + resourceGroupName: string, + customerResourceName: string, + options: IspCustomersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _ispCustomersGetSend( + context, + resourceGroupName, + customerResourceName, + options, + ); + return _ispCustomersGetDeserialize(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..a048d30bafc4 --- /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 { 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..77c1dd0c5a1b 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 { operationsList } 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..641162995fba --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/api/operations/operations.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConnectedCacheContext as Client } from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, + errorResponseDeserializer, +} from "../../models/models.js"; +import { OperationsListOptionalParams } from "./options.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _operationsListSend( + 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 _operationsListDeserialize( + 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 operationsList( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _operationsListSend(context, options), + _operationsListDeserialize, + ["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..c461016ad1c5 --- /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 { 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 b2bce9d483c3..000000000000 --- a/sdk/connectedcache/arm-connectedcache/src/api/options.ts +++ /dev/null @@ -1,155 +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..224ec94679ad 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCacheNodesOperations/index.ts @@ -3,136 +3,155 @@ import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; import { - enterpriseMccCacheNodesOperationsGet, - enterpriseMccCacheNodesOperationsCreateOrUpdate, - enterpriseMccCacheNodesOperationsUpdate, - enterpriseMccCacheNodesOperationsDelete, - enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource, - enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails, -} from "../../api/enterpriseMccCacheNodesOperations/index.js"; -import { - EnterpriseMccCacheNodesOperationsGetOptionalParams, - EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsUpdateOptionalParams, - EnterpriseMccCacheNodesOperationsDeleteOptionalParams, - EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, - EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "../../api/options.js"; -import { - EnterpriseMccCacheNodeResource, ConnectedCachePatchResource, MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, + EnterpriseMccCacheNodeResource, + MccCacheNodeTlsCertificateHistory, } from "../../models/models.js"; +import { + EnterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + EnterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResourceOptionalParams, + EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + EnterpriseMccCacheNodesOperationsGetOptionalParams, +} from "../../api/enterpriseMccCacheNodesOperations/options.js"; +import { + enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistory, + enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails, + enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource, + enterpriseMccCacheNodesOperationsDelete, + enterpriseMccCacheNodesOperationsUpdate, + enterpriseMccCacheNodesOperationsCreateOrUpdate, + enterpriseMccCacheNodesOperationsGet, +} from "../../api/enterpriseMccCacheNodesOperations/operations.js"; import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; import { 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 */ + 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( + enterpriseMccCacheNodesOperationsGetCacheNodeTlsCertificateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, options, ), - createOrUpdate: ( + getCacheNodeMccIssueDetailsHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: EnterpriseMccCacheNodeResource, - options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, ) => - enterpriseMccCacheNodesOperationsCreateOrUpdate( + enterpriseMccCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - resource, options, ), - update: ( + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, ) => - enterpriseMccCacheNodesOperationsUpdate( + enterpriseMccCacheNodesOperationsGetCacheNodeAutoUpdateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - properties, options, ), - delete: ( + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, + options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, ) => - enterpriseMccCacheNodesOperationsDelete( + enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, @@ -145,20 +164,61 @@ export function getEnterpriseMccCacheNodesOperations( ) => enterpriseMccCacheNodesOperationsListByEnterpriseMccCustomerResource( context, - subscriptionId, resourceGroupName, customerResourceName, options, ), - getCacheNodeInstallDetails: ( + delete: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: EnterpriseMccCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + options?: EnterpriseMccCacheNodesOperationsDeleteOptionalParams, ) => - enterpriseMccCacheNodesOperationsGetCacheNodeInstallDetails( + enterpriseMccCacheNodesOperationsDelete( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + options, + ), + update: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + properties: ConnectedCachePatchResource, + options?: EnterpriseMccCacheNodesOperationsUpdateOptionalParams, + ) => + enterpriseMccCacheNodesOperationsUpdate( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: EnterpriseMccCacheNodeResource, + options?: EnterpriseMccCacheNodesOperationsCreateOrUpdateOptionalParams, + ) => + enterpriseMccCacheNodesOperationsCreateOrUpdate( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: EnterpriseMccCacheNodesOperationsGetOptionalParams, + ) => + enterpriseMccCacheNodesOperationsGet( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, @@ -167,11 +227,10 @@ export function getEnterpriseMccCacheNodesOperations( }; } -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..66b6670df3a9 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/enterpriseMccCustomers/index.ts @@ -2,41 +2,43 @@ // Licensed under the MIT License. import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import { ConnectedCachePatchResource, EnterpriseMccCustomerResource } from "../../models/models.js"; import { - enterpriseMccCustomersGet, - enterpriseMccCustomersCreateOrUpdate, - enterpriseMccCustomersUpdate, - enterpriseMccCustomersDelete, - enterpriseMccCustomersListByResourceGroup, - enterpriseMccCustomersListBySubscription, -} from "../../api/enterpriseMccCustomers/index.js"; -import { - EnterpriseMccCustomersGetOptionalParams, - EnterpriseMccCustomersCreateOrUpdateOptionalParams, - EnterpriseMccCustomersUpdateOptionalParams, - EnterpriseMccCustomersDeleteOptionalParams, - EnterpriseMccCustomersListByResourceGroupOptionalParams, EnterpriseMccCustomersListBySubscriptionOptionalParams, -} from "../../api/options.js"; -import { ConnectedCachePatchResource, EnterpriseMccCustomerResource } from "../../models/models.js"; + EnterpriseMccCustomersListByResourceGroupOptionalParams, + EnterpriseMccCustomersDeleteOptionalParams, + EnterpriseMccCustomersUpdateOptionalParams, + EnterpriseMccCustomersCreateOrUpdateOptionalParams, + EnterpriseMccCustomersGetOptionalParams, +} from "../../api/enterpriseMccCustomers/options.js"; +import { + enterpriseMccCustomersListBySubscription, + enterpriseMccCustomersListByResourceGroup, + enterpriseMccCustomersDelete, + enterpriseMccCustomersUpdate, + enterpriseMccCustomersCreateOrUpdate, + enterpriseMccCustomersGet, +} from "../../api/enterpriseMccCustomers/operations.js"; import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; import { 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 */ + 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,51 +46,34 @@ 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) => + enterpriseMccCustomersListBySubscription(context, options), + listByResourceGroup: ( resourceGroupName: string, - customerResourceName: string, - options?: EnterpriseMccCustomersGetOptionalParams, - ) => - enterpriseMccCustomersGet( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - options, - ), - createOrUpdate: ( + options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, + ) => enterpriseMccCustomersListByResourceGroup(context, resourceGroupName, options), + delete: ( resourceGroupName: string, customerResourceName: string, - resource: EnterpriseMccCustomerResource, - options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, - ) => - enterpriseMccCustomersCreateOrUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - resource, - options, - ), + options?: EnterpriseMccCustomersDeleteOptionalParams, + ) => enterpriseMccCustomersDelete(context, resourceGroupName, customerResourceName, options), update: ( resourceGroupName: string, customerResourceName: string, @@ -97,44 +82,36 @@ export function getEnterpriseMccCustomers(context: ConnectedCacheContext, subscr ) => enterpriseMccCustomersUpdate( context, - subscriptionId, resourceGroupName, customerResourceName, properties, options, ), - delete: ( + createOrUpdate: ( resourceGroupName: string, customerResourceName: string, - options?: EnterpriseMccCustomersDeleteOptionalParams, + resource: EnterpriseMccCustomerResource, + options?: EnterpriseMccCustomersCreateOrUpdateOptionalParams, ) => - enterpriseMccCustomersDelete( + enterpriseMccCustomersCreateOrUpdate( context, - subscriptionId, resourceGroupName, customerResourceName, + resource, options, ), - listByResourceGroup: ( + get: ( resourceGroupName: string, - options?: EnterpriseMccCustomersListByResourceGroupOptionalParams, - ) => - enterpriseMccCustomersListByResourceGroup( - context, - subscriptionId, - resourceGroupName, - options, - ), - listBySubscription: (options?: EnterpriseMccCustomersListBySubscriptionOptionalParams) => - enterpriseMccCustomersListBySubscription(context, subscriptionId, options), + customerResourceName: string, + options?: EnterpriseMccCustomersGetOptionalParams, + ) => enterpriseMccCustomersGet(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..69dc2ea51052 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/ispCacheNodesOperations/index.ts @@ -2,144 +2,156 @@ // Licensed under the MIT License. import { 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, - IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, -} from "../../api/options.js"; import { ConnectedCachePatchResource, - MccCacheNodeInstallDetails, IspCacheNodeResource, MccCacheNodeBgpCidrDetails, + MccCacheNodeInstallDetails, + MccCacheNodeAutoUpdateHistory, + MccCacheNodeIssueHistory, } from "../../models/models.js"; +import { + IspCacheNodesOperationsGetCacheNodeMccIssueDetailsHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, + IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + IspCacheNodesOperationsGetBgpCidrsOptionalParams, + IspCacheNodesOperationsListByIspCustomerResourceOptionalParams, + IspCacheNodesOperationsDeleteOptionalParams, + IspCacheNodesOperationsUpdateOptionalParams, + IspCacheNodesOperationsCreateOrUpdateOptionalParams, + IspCacheNodesOperationsGetOptionalParams, +} from "../../api/ispCacheNodesOperations/options.js"; +import { + ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory, + ispCacheNodesOperationsGetCacheNodeAutoUpdateHistory, + ispCacheNodesOperationsGetCacheNodeInstallDetails, + ispCacheNodesOperationsGetBgpCidrs, + ispCacheNodesOperationsListByIspCustomerResource, + ispCacheNodesOperationsDelete, + ispCacheNodesOperationsUpdate, + ispCacheNodesOperationsCreateOrUpdate, + ispCacheNodesOperationsGet, +} from "../../api/ispCacheNodesOperations/operations.js"; import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; import { 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 */ + 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( + ispCacheNodesOperationsGetCacheNodeMccIssueDetailsHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, options, ), - createOrUpdate: ( + getCacheNodeAutoUpdateHistory: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - resource: IspCacheNodeResource, - options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, + options?: IspCacheNodesOperationsGetCacheNodeAutoUpdateHistoryOptionalParams, ) => - ispCacheNodesOperationsCreateOrUpdate( + ispCacheNodesOperationsGetCacheNodeAutoUpdateHistory( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - resource, options, ), - update: ( + getCacheNodeInstallDetails: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - properties: ConnectedCachePatchResource, - options?: IspCacheNodesOperationsUpdateOptionalParams, + options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, ) => - ispCacheNodesOperationsUpdate( + ispCacheNodesOperationsGetCacheNodeInstallDetails( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, - properties, options, ), - delete: ( + getBgpCidrs: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsDeleteOptionalParams, + options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, ) => - ispCacheNodesOperationsDelete( + ispCacheNodesOperationsGetBgpCidrs( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, @@ -152,34 +164,61 @@ export function getIspCacheNodesOperations(context: ConnectedCacheContext, subsc ) => ispCacheNodesOperationsListByIspCustomerResource( context, - subscriptionId, resourceGroupName, customerResourceName, options, ), - getBgpCidrs: ( + delete: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetBgpCidrsOptionalParams, + options?: IspCacheNodesOperationsDeleteOptionalParams, ) => - ispCacheNodesOperationsGetBgpCidrs( + ispCacheNodesOperationsDelete( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, options, ), - getCacheNodeInstallDetails: ( + update: ( resourceGroupName: string, customerResourceName: string, cacheNodeResourceName: string, - options?: IspCacheNodesOperationsGetCacheNodeInstallDetailsOptionalParams, + properties: ConnectedCachePatchResource, + options?: IspCacheNodesOperationsUpdateOptionalParams, ) => - ispCacheNodesOperationsGetCacheNodeInstallDetails( + ispCacheNodesOperationsUpdate( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + properties, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + resource: IspCacheNodeResource, + options?: IspCacheNodesOperationsCreateOrUpdateOptionalParams, + ) => + ispCacheNodesOperationsCreateOrUpdate( + context, + resourceGroupName, + customerResourceName, + cacheNodeResourceName, + resource, + options, + ), + get: ( + resourceGroupName: string, + customerResourceName: string, + cacheNodeResourceName: string, + options?: IspCacheNodesOperationsGetOptionalParams, + ) => + ispCacheNodesOperationsGet( context, - subscriptionId, resourceGroupName, customerResourceName, cacheNodeResourceName, @@ -188,11 +227,10 @@ export function getIspCacheNodesOperations(context: ConnectedCacheContext, subsc }; } -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..92eb83c9efc3 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/ispCustomers/index.ts @@ -2,41 +2,43 @@ // Licensed under the MIT License. import { ConnectedCacheContext } from "../../api/connectedCacheContext.js"; +import { IspCustomerResource, ConnectedCachePatchResource } from "../../models/models.js"; import { - ispCustomersGet, - ispCustomersCreateOrUpdate, - ispCustomersUpdate, - ispCustomersDelete, - ispCustomersListByResourceGroup, - ispCustomersListBySubscription, -} from "../../api/ispCustomers/index.js"; -import { - IspCustomersGetOptionalParams, - IspCustomersCreateOrUpdateOptionalParams, - IspCustomersUpdateOptionalParams, - IspCustomersDeleteOptionalParams, - IspCustomersListByResourceGroupOptionalParams, IspCustomersListBySubscriptionOptionalParams, -} from "../../api/options.js"; -import { ConnectedCachePatchResource, IspCustomerResource } from "../../models/models.js"; + IspCustomersListByResourceGroupOptionalParams, + IspCustomersDeleteOptionalParams, + IspCustomersUpdateOptionalParams, + IspCustomersCreateOrUpdateOptionalParams, + IspCustomersGetOptionalParams, +} from "../../api/ispCustomers/options.js"; +import { + ispCustomersListBySubscription, + ispCustomersListByResourceGroup, + ispCustomersDelete, + ispCustomersUpdate, + ispCustomersCreateOrUpdate, + ispCustomersGet, +} from "../../api/ispCustomers/operations.js"; import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; import { 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 */ + 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,30 +46,40 @@ 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) => + ispCustomersListBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: IspCustomersListByResourceGroupOptionalParams, + ) => ispCustomersListByResourceGroup(context, resourceGroupName, options), + delete: ( resourceGroupName: string, customerResourceName: string, - options?: IspCustomersGetOptionalParams, - ) => ispCustomersGet(context, subscriptionId, resourceGroupName, customerResourceName, options), + options?: IspCustomersDeleteOptionalParams, + ) => ispCustomersDelete(context, resourceGroupName, customerResourceName, options), + update: ( + resourceGroupName: string, + customerResourceName: string, + properties: ConnectedCachePatchResource, + options?: IspCustomersUpdateOptionalParams, + ) => ispCustomersUpdate(context, resourceGroupName, customerResourceName, properties, options), createOrUpdate: ( resourceGroupName: string, customerResourceName: string, @@ -76,46 +88,21 @@ export function getIspCustomers(context: ConnectedCacheContext, subscriptionId: ) => ispCustomersCreateOrUpdate( context, - subscriptionId, resourceGroupName, customerResourceName, resource, options, ), - update: ( - resourceGroupName: string, - customerResourceName: string, - properties: ConnectedCachePatchResource, - options?: IspCustomersUpdateOptionalParams, - ) => - ispCustomersUpdate( - context, - subscriptionId, - resourceGroupName, - customerResourceName, - properties, - options, - ), - delete: ( + get: ( resourceGroupName: string, customerResourceName: string, - options?: IspCustomersDeleteOptionalParams, - ) => - ispCustomersDelete(context, subscriptionId, resourceGroupName, customerResourceName, options), - listByResourceGroup: ( - resourceGroupName: string, - options?: IspCustomersListByResourceGroupOptionalParams, - ) => ispCustomersListByResourceGroup(context, subscriptionId, resourceGroupName, options), - listBySubscription: (options?: IspCustomersListBySubscriptionOptionalParams) => - ispCustomersListBySubscription(context, subscriptionId, options), + options?: IspCustomersGetOptionalParams, + ) => ispCustomersGet(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..a3de398abc9a 100644 --- a/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/classic/operations/index.ts @@ -2,9 +2,9 @@ // 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 { OperationsListOptionalParams } from "../../api/operations/options.js"; +import { operationsList } from "../../api/operations/operations.js"; import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a Operations operations. */ @@ -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), }; } -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..9b8b8b0e5b73 100644 --- a/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts +++ b/sdk/connectedcache/arm-connectedcache/src/connectedCacheClient.ts @@ -1,33 +1,28 @@ // 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"; + createConnectedCache, + ConnectedCacheContext, + ConnectedCacheClientOptionalParams, +} from "./api/index.js"; import { - getIspCacheNodesOperationsOperations, - IspCacheNodesOperationsOperations, -} from "./classic/ispCacheNodesOperations/index.js"; + EnterpriseMccCacheNodesOperationsOperations, + _getEnterpriseMccCacheNodesOperationsOperations, +} from "./classic/enterpriseMccCacheNodesOperations/index.js"; import { - getEnterpriseMccCustomersOperations, EnterpriseMccCustomersOperations, + _getEnterpriseMccCustomersOperations, } from "./classic/enterpriseMccCustomers/index.js"; import { - getEnterpriseMccCacheNodesOperationsOperations, - EnterpriseMccCacheNodesOperationsOperations, -} from "./classic/enterpriseMccCacheNodesOperations/index.js"; + IspCacheNodesOperationsOperations, + _getIspCacheNodesOperationsOperations, +} from "./classic/ispCacheNodesOperations/index.js"; import { - createConnectedCache, - ConnectedCacheContext, - ConnectedCacheClientOptionalParams, -} from "./api/index.js"; + IspCustomersOperations, + _getIspCustomersOperations, +} from "./classic/ispCustomers/index.js"; +import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; import { Pipeline } from "@azure/core-rest-pipeline"; import { TokenCredential } from "@azure/core-auth"; @@ -48,41 +43,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._client, - subscriptionId, - ); - this.cacheNodesOperations = getCacheNodesOperationsOperations(this._client, subscriptionId); - this.ispCustomers = getIspCustomersOperations(this._client, subscriptionId); - this.ispCacheNodesOperations = getIspCacheNodesOperationsOperations( + this.enterpriseMccCacheNodesOperations = _getEnterpriseMccCacheNodesOperationsOperations( 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..0c8c22b03ed7 100644 --- a/sdk/connectedcache/arm-connectedcache/src/index.ts +++ b/sdk/connectedcache/arm-connectedcache/src/index.ts @@ -10,10 +10,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 +43,8 @@ export { KnownAutoUpdateRingType, AutoUpdateRingType, AdditionalCacheNodeProperties, + MccCacheNodeTlsCertificate, + MccCacheNodeAutoUpdateInfo, CacheNodeDriveConfiguration, BgpConfiguration, ProxyUrlConfiguration, @@ -29,83 +52,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, 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..624b6d627481 100644 --- a/sdk/connectedcache/arm-connectedcache/src/models/models.ts +++ b/sdk/connectedcache/arm-connectedcache/src/models/models.ts @@ -1,27 +1,207 @@ // 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 { +/** 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?: 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; +} + +/** 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"], location: item["location"], @@ -33,54 +213,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 +294,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 +461,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 +511,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 { @@ -869,46 +647,52 @@ 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"], location: item["location"], @@ -920,104 +704,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,297 +760,738 @@ 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 */ + 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; } -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"], - }; -} - -export function customerEntityDeserializer(item: any): CustomerEntity { - return { + cidrSelectionType: item["cidrSelectionType"], + fullyQualifiedDomainName: item["fullyQualifiedDomainName"], + autoUpdateRingType: item["autoUpdateRingType"], + autoUpdateRequestedWeek: item["autoUpdateRequestedWeek"], + autoUpdateRequestedDay: item["autoUpdateRequestedDay"], + autoUpdateRequestedTime: item["autoUpdateRequestedTime"], + }; +} + +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"], + 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"], - synchWithAzureAttemptsCount: item["synchWithAzureAttemptsCount"], + category: item["category"], + releaseVersion: item["releaseVersion"], lastSyncWithAzureTimestamp: !item["lastSyncWithAzureTimestamp"] ? item["lastSyncWithAzureTimestamp"] : new Date(item["lastSyncWithAzureTimestamp"]), - isEnterpriseManaged: item["isEnterpriseManaged"], + 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"], 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 { + 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"], location: item["location"], @@ -1328,46 +1503,56 @@ export function ispCacheNodeResourceDeserializer(item: any): IspCacheNodeResourc : systemDataDeserializer(item["systemData"]), properties: !item["properties"] ? item["properties"] - : cacheNodePropertyDeserializer(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; -} - -export function _ispCacheNodeResourceListResultDeserializer( - item: any, -): _IspCacheNodeResourceListResult { - return { - value: ispCacheNodeResourceArrayDeserializer(item["value"]), - nextLink: item["nextLink"], + : cacheNodeInstallPropertiesDeserializer(item["properties"]), }; } -export function ispCacheNodeResourceArraySerializer(result: Array): any[] { - return result.map((item) => { - return ispCacheNodeResourceSerializer(item); - }); +/** 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 ispCacheNodeResourceArrayDeserializer(result: Array): any[] { - return result.map((item) => { - return ispCacheNodeResourceDeserializer(item); - }); +export function cacheNodeInstallPropertiesDeserializer(item: any): CacheNodeInstallProperties { + return { + 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"]), + }; } -/** 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"], location: item["location"], @@ -1379,43 +1564,47 @@ 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"], location: item["location"], @@ -1427,56 +1616,86 @@ 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; +} + +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"]), + }; } -/** Concrete tracked resource types can be created by aliasing this type using a specific property type. */ -export interface CacheNodePreviewResource extends TrackedResource { +/** 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"], location: item["location"], @@ -1488,96 +1707,64 @@ 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"], location: item["location"], @@ -1589,147 +1776,101 @@ 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"], + 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..794f872cbbd6 100644 --- a/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts +++ b/sdk/connectedcache/arm-connectedcache/src/restorePollerHelpers.ts @@ -2,24 +2,22 @@ // 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 { - _ispCustomersCreateOrUpdateDeserialize, - _ispCustomersDeleteDeserialize, -} from "./api/ispCustomers/index.js"; -import { - _ispCacheNodesOperationsCreateOrUpdateDeserialize, - _ispCacheNodesOperationsDeleteDeserialize, -} from "./api/ispCacheNodesOperations/index.js"; + _enterpriseMccCacheNodesOperationsDeleteDeserialize, + _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, +} from "./api/enterpriseMccCacheNodesOperations/operations.js"; import { - _enterpriseMccCustomersCreateOrUpdateDeserialize, _enterpriseMccCustomersDeleteDeserialize, -} from "./api/enterpriseMccCustomers/index.js"; + _enterpriseMccCustomersCreateOrUpdateDeserialize, +} from "./api/enterpriseMccCustomers/operations.js"; import { - _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, - _enterpriseMccCacheNodesOperationsDeleteDeserialize, -} from "./api/enterpriseMccCacheNodesOperations/index.js"; + _ispCacheNodesOperationsDeleteDeserialize, + _ispCacheNodesOperationsCreateOrUpdateDeserialize, +} from "./api/ispCacheNodesOperations/operations.js"; +import { + _ispCustomersDeleteDeserialize, + _ispCustomersCreateOrUpdateDeserialize, +} 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"; @@ -93,29 +91,24 @@ interface DeserializationHelper { } 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}": + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": { - deserializer: _cacheNodesOperationsCreateorUpdateDeserialize, - expectedStatuses: ["200", "201"], + deserializer: _enterpriseMccCacheNodesOperationsDeleteDeserialize, + expectedStatuses: ["202", "204", "200"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": { - deserializer: _ispCustomersCreateOrUpdateDeserialize, + deserializer: _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, expectedStatuses: ["200", "201"], }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": { - deserializer: _ispCustomersDeleteDeserialize, + deserializer: _enterpriseMccCustomersDeleteDeserialize, expectedStatuses: ["202", "204", "200"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": { - deserializer: _ispCacheNodesOperationsCreateOrUpdateDeserialize, + deserializer: _enterpriseMccCustomersCreateOrUpdateDeserialize, expectedStatuses: ["200", "201"], }, "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": @@ -123,26 +116,21 @@ const deserializeMap: Record = { deserializer: _ispCacheNodesOperationsDeleteDeserialize, expectedStatuses: ["202", "204", "200"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}": { - deserializer: _enterpriseMccCustomersCreateOrUpdateDeserialize, + deserializer: _ispCacheNodesOperationsCreateOrUpdateDeserialize, expectedStatuses: ["200", "201"], }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}": + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": { - deserializer: _enterpriseMccCustomersDeleteDeserialize, + deserializer: _ispCustomersDeleteDeserialize, expectedStatuses: ["202", "204", "200"], }, - "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}": { - deserializer: _enterpriseMccCacheNodesOperationsCreateOrUpdateDeserialize, + deserializer: _ispCustomersCreateOrUpdateDeserialize, expectedStatuses: ["200", "201"], }, - "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}": - { - deserializer: _enterpriseMccCacheNodesOperationsDeleteDeserialize, - expectedStatuses: ["202", "204", "200"], - }, }; function getDeserializationHelper( 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..cd03319fda35 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/src/static-helpers/urlTemplate.ts @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +//--------------------- +// interfaces +//--------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string) { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string) { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any) { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false) { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions) { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + named && val === "" ? vals.push(ifEmpty) : vals.push("="); + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions) { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + val === "" ? vals.push(ifEmpty) : vals.push("="); + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + (op = expr[0]), (expr = expr.slice(1)); + } + const varList = expr.split(/,/g); + const result = []; + for (const varSpec of varList) { + const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: result.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + result.push(varValue); + } + } + return result.join(""); + }); +} diff --git a/sdk/connectedcache/arm-connectedcache/test/public/connectedcache_operations_test.spec.ts b/sdk/connectedcache/arm-connectedcache/test/public/connectedcache_operations_test.spec.ts deleted file mode 100644 index 0f81fb360a78..000000000000 --- a/sdk/connectedcache/arm-connectedcache/test/public/connectedcache_operations_test.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import type { Recorder } from "@azure-tools/test-recorder"; -import { env, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, beforeEach, afterEach, it, describe } from "vitest"; -import { createRecorder } from "./utils/recordedClient.js"; -import { ConnectedCacheClient } from "../../src/connectedCacheClient.js"; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("ConnectedCache test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ConnectedCacheClient; - - beforeEach(async (context) => { - process.env["SYSTEMROOT"] = process.env["SYSTEMROOT"] || "C:\\Windows"; - recorder = await createRecorder(context); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new ConnectedCacheClient( - credential, - subscriptionId, - recorder.configureClientOptions({}), - ); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/connectedcache/arm-connectedcache/test/public/sampleTest.spec.ts b/sdk/connectedcache/arm-connectedcache/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/connectedcache/arm-connectedcache/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/connectedcache/arm-connectedcache/test/public/utils/recordedClient.ts b/sdk/connectedcache/arm-connectedcache/test/public/utils/recordedClient.ts index 285e4643c45e..14dcd9fa397c 100644 --- a/sdk/connectedcache/arm-connectedcache/test/public/utils/recordedClient.ts +++ b/sdk/connectedcache/arm-connectedcache/test/public/utils/recordedClient.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; -import { Recorder } from "@azure-tools/test-recorder"; +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "azure_subscription_id", diff --git a/sdk/connectedcache/arm-connectedcache/tsp-location.yaml b/sdk/connectedcache/arm-connectedcache/tsp-location.yaml index ddb9a7d0443d..b9f6d292ba23 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 +commit: bd63bf3710616fd0dc1d883b0760899ca7f9babd repo: ../azure-rest-api-specs additionalDirectories: diff --git a/sdk/connectedcache/arm-connectedcache/vitest.browser.config.ts b/sdk/connectedcache/arm-connectedcache/vitest.browser.config.ts index 10e70dbfa8ee..182729ab5ce9 100644 --- a/sdk/connectedcache/arm-connectedcache/vitest.browser.config.ts +++ b/sdk/connectedcache/arm-connectedcache/vitest.browser.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,7 +9,7 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: ["dist-test/browser/test/**/*.spec.js"], + include: ["dist-test/browser/test/**/*.spec.js",], testTimeout: 1200000, hookTimeout: 1200000, }, diff --git a/sdk/connectedcache/arm-connectedcache/vitest.config.ts b/sdk/connectedcache/arm-connectedcache/vitest.config.ts index 86a71911ccc2..40e031385dd8 100644 --- a/sdk/connectedcache/arm-connectedcache/vitest.config.ts +++ b/sdk/connectedcache/arm-connectedcache/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. diff --git a/sdk/connectedcache/arm-connectedcache/vitest.esm.config.ts b/sdk/connectedcache/arm-connectedcache/vitest.esm.config.ts index 5e9735e9b144..a70127279fc9 100644 --- a/sdk/connectedcache/arm-connectedcache/vitest.esm.config.ts +++ b/sdk/connectedcache/arm-connectedcache/vitest.esm.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -5,4 +6,7 @@ import { mergeConfig } from "vitest/config"; import vitestConfig from "./vitest.config.ts"; import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; -export default mergeConfig(vitestConfig, vitestEsmConfig); +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); 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