From fedf4aa0c3c743715ec75f0d2fbe92845d6927b1 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:19:38 +0800 Subject: [PATCH] [mgmt] hybridcompute release (#31722) https://github.com/Azure/sdk-release-request/issues/5635 --- common/config/rush/pnpm-lock.yaml | 7 +- .../arm-hybridcompute/CHANGELOG.md | 88 +- sdk/hybridcompute/arm-hybridcompute/README.md | 2 +- .../arm-hybridcompute/_meta.json | 8 +- .../arm-hybridcompute/assets.json | 2 +- .../arm-hybridcompute/package.json | 6 +- .../review/arm-hybridcompute.api.md | 389 +++++++ .../arm-hybridcompute/sample.env | 5 +- .../samples-dev/extensionMetadataGetSample.ts | 2 +- .../extensionMetadataListSample.ts | 2 +- .../gatewaysCreateOrUpdateSample.ts | 52 + .../samples-dev/gatewaysDeleteSample.ts | 43 + .../samples-dev/gatewaysGetSample.ts | 40 + .../gatewaysListByResourceGroupSample.ts | 44 + .../gatewaysListBySubscriptionSample.ts | 40 + .../samples-dev/gatewaysUpdateSample.ts | 48 + .../licenseProfilesCreateOrUpdateSample.ts | 2 +- .../licenseProfilesDeleteSample.ts | 2 +- .../samples-dev/licenseProfilesGetSample.ts | 2 +- .../samples-dev/licenseProfilesListSample.ts | 2 +- .../licenseProfilesUpdateSample.ts | 2 +- .../licensesCreateOrUpdateSample.ts | 2 +- .../samples-dev/licensesDeleteSample.ts | 2 +- .../samples-dev/licensesGetSample.ts | 2 +- .../licensesListByResourceGroupSample.ts | 2 +- .../licensesListBySubscriptionSample.ts | 2 +- .../samples-dev/licensesUpdateSample.ts | 2 +- .../licensesValidateLicenseSample.ts | 2 +- .../machineExtensionsCreateOrUpdateSample.ts | 2 +- .../machineExtensionsDeleteSample.ts | 2 +- .../samples-dev/machineExtensionsGetSample.ts | 2 +- .../machineExtensionsListSample.ts | 2 +- .../machineExtensionsUpdateSample.ts | 6 +- .../machineRunCommandsCreateOrUpdateSample.ts | 64 ++ .../machineRunCommandsDeleteSample.ts | 44 + .../machineRunCommandsGetSample.ts | 44 + .../machineRunCommandsListSample.ts | 45 + .../machinesAssessPatchesSample.ts | 2 +- .../samples-dev/machinesDeleteSample.ts | 2 +- .../samples-dev/machinesGetSample.ts | 4 +- .../machinesInstallPatchesSample.ts | 2 +- .../machinesListByResourceGroupSample.ts | 2 +- .../machinesListBySubscriptionSample.ts | 2 +- .../samples-dev/networkProfileGetSample.ts | 2 +- ...nfigurationsGetByPrivateLinkScopeSample.ts | 2 +- ...figurationsListByPrivateLinkScopeSample.ts | 2 +- ...tionsReconcileForPrivateLinkScopeSample.ts | 2 +- .../samples-dev/operationsListSample.ts | 2 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- ...ConnectionsListByPrivateLinkScopeSample.ts | 2 +- .../privateLinkResourcesGetSample.ts | 2 +- ...nkResourcesListByPrivateLinkScopeSample.ts | 2 +- .../privateLinkScopesCreateOrUpdateSample.ts | 4 +- .../privateLinkScopesDeleteSample.ts | 2 +- .../samples-dev/privateLinkScopesGetSample.ts | 2 +- ...pesGetValidationDetailsForMachineSample.ts | 2 +- ...ateLinkScopesGetValidationDetailsSample.ts | 2 +- ...vateLinkScopesListByResourceGroupSample.ts | 2 +- .../privateLinkScopesListSample.ts | 2 +- .../privateLinkScopesUpdateTagsSample.ts | 2 +- .../samples-dev/settingsGetSample.ts | 49 + .../samples-dev/settingsPatchSample.ts | 57 + .../samples-dev/settingsUpdateSample.ts | 57 + .../samples-dev/upgradeExtensionsSample.ts | 2 +- .../{v4 => v4-beta}/javascript/README.md | 212 ++-- .../javascript/extensionMetadataGetSample.js | 2 +- .../javascript/extensionMetadataListSample.js | 2 +- .../gatewaysCreateOrUpdateSample.js | 45 + .../javascript/gatewaysDeleteSample.js | 36 + .../v4-beta/javascript/gatewaysGetSample.js | 36 + .../gatewaysListByResourceGroupSample.js | 38 + .../gatewaysListBySubscriptionSample.js | 37 + .../javascript/gatewaysUpdateSample.js | 37 + .../licenseProfilesCreateOrUpdateSample.js | 2 +- .../javascript/licenseProfilesDeleteSample.js | 2 +- .../javascript/licenseProfilesGetSample.js | 2 +- .../javascript/licenseProfilesListSample.js | 2 +- .../javascript/licenseProfilesUpdateSample.js | 2 +- .../licensesCreateOrUpdateSample.js | 2 +- .../javascript/licensesDeleteSample.js | 2 +- .../javascript/licensesGetSample.js | 2 +- .../licensesListByResourceGroupSample.js | 2 +- .../licensesListBySubscriptionSample.js | 2 +- .../javascript/licensesUpdateSample.js | 2 +- .../licensesValidateLicenseSample.js | 2 +- .../machineExtensionsCreateOrUpdateSample.js | 2 +- .../machineExtensionsDeleteSample.js | 2 +- .../javascript/machineExtensionsGetSample.js | 2 +- .../javascript/machineExtensionsListSample.js | 2 +- .../machineExtensionsUpdateSample.js | 6 +- .../machineRunCommandsCreateOrUpdateSample.js | 56 + .../machineRunCommandsDeleteSample.js | 40 + .../javascript/machineRunCommandsGetSample.js | 40 + .../machineRunCommandsListSample.js | 38 + .../javascript/machinesAssessPatchesSample.js | 2 +- .../javascript/machinesDeleteSample.js | 2 +- .../javascript/machinesGetSample.js | 4 +- .../machinesInstallPatchesSample.js | 2 +- .../machinesListByResourceGroupSample.js | 2 +- .../machinesListBySubscriptionSample.js | 2 +- .../javascript/networkProfileGetSample.js | 2 +- ...nfigurationsGetByPrivateLinkScopeSample.js | 2 +- ...figurationsListByPrivateLinkScopeSample.js | 2 +- ...tionsReconcileForPrivateLinkScopeSample.js | 2 +- .../javascript/operationsListSample.js | 2 +- .../{v4 => v4-beta}/javascript/package.json | 6 +- ...EndpointConnectionsCreateOrUpdateSample.js | 2 +- .../privateEndpointConnectionsDeleteSample.js | 2 +- .../privateEndpointConnectionsGetSample.js | 2 +- ...ConnectionsListByPrivateLinkScopeSample.js | 2 +- .../privateLinkResourcesGetSample.js | 2 +- ...nkResourcesListByPrivateLinkScopeSample.js | 2 +- .../privateLinkScopesCreateOrUpdateSample.js | 4 +- .../privateLinkScopesDeleteSample.js | 2 +- .../javascript/privateLinkScopesGetSample.js | 2 +- ...pesGetValidationDetailsForMachineSample.js | 2 +- ...ateLinkScopesGetValidationDetailsSample.js | 2 +- ...vateLinkScopesListByResourceGroupSample.js | 2 +- .../javascript/privateLinkScopesListSample.js | 2 +- .../privateLinkScopesUpdateTagsSample.js | 2 +- .../samples/v4-beta/javascript/sample.env | 1 + .../v4-beta/javascript/settingsGetSample.js | 45 + .../v4-beta/javascript/settingsPatchSample.js | 50 + .../javascript/settingsUpdateSample.js | 50 + .../javascript/upgradeExtensionsSample.js | 2 +- .../{v4 => v4-beta}/typescript/README.md | 212 ++-- .../{v4 => v4-beta}/typescript/package.json | 6 +- .../samples/v4-beta/typescript/sample.env | 1 + .../src/extensionMetadataGetSample.ts | 2 +- .../src/extensionMetadataListSample.ts | 2 +- .../src/gatewaysCreateOrUpdateSample.ts | 52 + .../typescript/src/gatewaysDeleteSample.ts | 43 + .../typescript/src/gatewaysGetSample.ts | 40 + .../src/gatewaysListByResourceGroupSample.ts | 44 + .../src/gatewaysListBySubscriptionSample.ts | 40 + .../typescript/src/gatewaysUpdateSample.ts | 48 + .../licenseProfilesCreateOrUpdateSample.ts | 2 +- .../src/licenseProfilesDeleteSample.ts | 2 +- .../src/licenseProfilesGetSample.ts | 2 +- .../src/licenseProfilesListSample.ts | 2 +- .../src/licenseProfilesUpdateSample.ts | 2 +- .../src/licensesCreateOrUpdateSample.ts | 2 +- .../typescript/src/licensesDeleteSample.ts | 2 +- .../typescript/src/licensesGetSample.ts | 2 +- .../src/licensesListByResourceGroupSample.ts | 2 +- .../src/licensesListBySubscriptionSample.ts | 2 +- .../typescript/src/licensesUpdateSample.ts | 2 +- .../src/licensesValidateLicenseSample.ts | 2 +- .../machineExtensionsCreateOrUpdateSample.ts | 2 +- .../src/machineExtensionsDeleteSample.ts | 2 +- .../src/machineExtensionsGetSample.ts | 2 +- .../src/machineExtensionsListSample.ts | 2 +- .../src/machineExtensionsUpdateSample.ts | 6 +- .../machineRunCommandsCreateOrUpdateSample.ts | 64 ++ .../src/machineRunCommandsDeleteSample.ts | 44 + .../src/machineRunCommandsGetSample.ts | 44 + .../src/machineRunCommandsListSample.ts | 45 + .../src/machinesAssessPatchesSample.ts | 2 +- .../typescript/src/machinesDeleteSample.ts | 2 +- .../typescript/src/machinesGetSample.ts | 4 +- .../src/machinesInstallPatchesSample.ts | 2 +- .../src/machinesListByResourceGroupSample.ts | 2 +- .../src/machinesListBySubscriptionSample.ts | 2 +- .../typescript/src/networkProfileGetSample.ts | 2 +- ...nfigurationsGetByPrivateLinkScopeSample.ts | 2 +- ...figurationsListByPrivateLinkScopeSample.ts | 2 +- ...tionsReconcileForPrivateLinkScopeSample.ts | 2 +- .../typescript/src/operationsListSample.ts | 2 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 2 +- .../privateEndpointConnectionsDeleteSample.ts | 2 +- .../privateEndpointConnectionsGetSample.ts | 2 +- ...ConnectionsListByPrivateLinkScopeSample.ts | 2 +- .../src/privateLinkResourcesGetSample.ts | 2 +- ...nkResourcesListByPrivateLinkScopeSample.ts | 2 +- .../privateLinkScopesCreateOrUpdateSample.ts | 4 +- .../src/privateLinkScopesDeleteSample.ts | 2 +- .../src/privateLinkScopesGetSample.ts | 2 +- ...pesGetValidationDetailsForMachineSample.ts | 2 +- ...ateLinkScopesGetValidationDetailsSample.ts | 2 +- ...vateLinkScopesListByResourceGroupSample.ts | 2 +- .../src/privateLinkScopesListSample.ts | 2 +- .../src/privateLinkScopesUpdateTagsSample.ts | 2 +- .../typescript/src/settingsGetSample.ts | 49 + .../typescript/src/settingsPatchSample.ts | 57 + .../typescript/src/settingsUpdateSample.ts | 57 + .../typescript/src/upgradeExtensionsSample.ts | 2 +- .../{v4 => v4-beta}/typescript/tsconfig.json | 0 .../samples/v4/javascript/sample.env | 4 - .../samples/v4/typescript/sample.env | 4 - .../src/hybridComputeManagementClient.ts | 16 +- .../arm-hybridcompute/src/models/index.ts | 586 ++++++++++- .../arm-hybridcompute/src/models/mappers.ts | 985 +++++++++++++++++- .../src/models/parameters.ts | 115 +- .../src/operations/gateways.ts | 641 ++++++++++++ .../arm-hybridcompute/src/operations/index.ts | 3 + .../src/operations/machineExtensions.ts | 4 +- .../src/operations/machineRunCommands.ts | 511 +++++++++ .../operations/privateEndpointConnections.ts | 2 +- .../src/operations/privateLinkScopes.ts | 2 +- .../src/operations/settingsOperations.ts | 213 ++++ .../src/operationsInterfaces/gateways.ts | 127 +++ .../src/operationsInterfaces/index.ts | 3 + .../operationsInterfaces/machineExtensions.ts | 4 +- .../machineRunCommands.ts | 115 ++ .../settingsOperations.ts | 76 ++ .../arm-hybridcompute/tsconfig.json | 4 +- 208 files changed, 6044 insertions(+), 412 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysCreateOrUpdateSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysDeleteSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListByResourceGroupSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListBySubscriptionSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysUpdateSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsCreateOrUpdateSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsDeleteSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsListSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsPatchSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsUpdateSample.ts rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/README.md (53%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/extensionMetadataGetSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/extensionMetadataListSample.js (93%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysCreateOrUpdateSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysDeleteSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysGetSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysListByResourceGroupSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysListBySubscriptionSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/gatewaysUpdateSample.js rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licenseProfilesCreateOrUpdateSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licenseProfilesDeleteSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licenseProfilesGetSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licenseProfilesListSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licenseProfilesUpdateSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesCreateOrUpdateSample.js (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesDeleteSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesGetSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesListByResourceGroupSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesListBySubscriptionSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesUpdateSample.js (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/licensesValidateLicenseSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machineExtensionsCreateOrUpdateSample.js (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machineExtensionsDeleteSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machineExtensionsGetSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machineExtensionsListSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machineExtensionsUpdateSample.js (86%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsCreateOrUpdateSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsDeleteSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsGetSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsListSample.js rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesAssessPatchesSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesDeleteSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesGetSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesInstallPatchesSample.js (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesListByResourceGroupSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/machinesListBySubscriptionSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/networkProfileGetSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/operationsListSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/package.json (80%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateEndpointConnectionsCreateOrUpdateSample.js (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateEndpointConnectionsDeleteSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateEndpointConnectionsGetSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkResourcesGetSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesCreateOrUpdateSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesDeleteSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesGetSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesGetValidationDetailsSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesListByResourceGroupSample.js (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesListSample.js (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/privateLinkScopesUpdateTagsSample.js (92%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/sample.env create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsGetSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsPatchSample.js create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsUpdateSample.js rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/javascript/upgradeExtensionsSample.js (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/README.md (54%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/package.json (84%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/sample.env rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/extensionMetadataGetSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/extensionMetadataListSample.ts (93%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysCreateOrUpdateSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysDeleteSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListByResourceGroupSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListBySubscriptionSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysUpdateSample.ts rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licenseProfilesCreateOrUpdateSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licenseProfilesDeleteSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licenseProfilesGetSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licenseProfilesListSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licenseProfilesUpdateSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesCreateOrUpdateSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesDeleteSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesGetSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesListByResourceGroupSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesListBySubscriptionSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesUpdateSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/licensesValidateLicenseSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machineExtensionsCreateOrUpdateSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machineExtensionsDeleteSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machineExtensionsGetSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machineExtensionsListSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machineExtensionsUpdateSample.ts (87%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsCreateOrUpdateSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsDeleteSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsListSample.ts rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesAssessPatchesSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesDeleteSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesGetSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesInstallPatchesSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesListByResourceGroupSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/machinesListBySubscriptionSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/networkProfileGetSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/operationsListSample.ts (93%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateEndpointConnectionsDeleteSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateEndpointConnectionsGetSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkResourcesGetSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesCreateOrUpdateSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesDeleteSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesGetSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesGetValidationDetailsSample.ts (91%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesListByResourceGroupSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesListSample.ts (92%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/privateLinkScopesUpdateTagsSample.ts (93%) create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsGetSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsPatchSample.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsUpdateSample.ts rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/src/upgradeExtensionsSample.ts (94%) rename sdk/hybridcompute/arm-hybridcompute/samples/{v4 => v4-beta}/typescript/tsconfig.json (100%) delete mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/sample.env delete mode 100644 sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/sample.env create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/gateways.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/settingsOperations.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/gateways.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/settingsOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ba3c0bc326c..e2ac4a887b9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4912,7 +4912,7 @@ packages: /ajv-formats@3.0.1: resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} dependencies: - ajv: 8.13.0 + ajv: 8.17.1 dev: false /ajv@6.12.6: @@ -15416,23 +15416,26 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-cEQb5jxuTRbVMsRDFbH2ZMgGF7YC+dBR1Iw3/+Jkwwzy0zUK97csQJaStktVO7m7n8k7uCODOrU7vdRV0qkOgA==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-+DX7eIMt7WAbn6AD+QZpjVyoMuXdNpGH452FuoUH2UvFhOBtlZD3B5y8bwW/oE8d3E/u2eZ3B4N2cAFV32bgbw==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' version: 0.0.0 dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.47.11(@types/node@18.19.64) '@types/chai': 4.3.20 '@types/mocha': 10.0.9 '@types/node': 18.19.64 chai: 4.3.10 + cross-env: 7.0.3 dotenv: 16.4.5 mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.64)(typescript@5.6.3) tslib: 2.8.1 tsx: 4.19.2 typescript: 5.6.3 + uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md index de275795f92..e42b5208579 100644 --- a/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md @@ -1,15 +1,85 @@ # Release History - -## 4.0.1 (Unreleased) - + +## 4.1.0-beta.1 (2024-11-12) +Compared with version 4.0.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group Gateways + - Added operation group MachineRunCommands + - Added operation group SettingsOperations + - Added Interface AgentVersion + - Added Interface AgentVersionsList + - Added Interface Disk + - Added Interface ErrorDetailAutoGenerated + - Added Interface ErrorResponseAutoGenerated + - Added Interface FirmwareProfile + - Added Interface Gateway + - Added Interface GatewaysCreateOrUpdateHeaders + - Added Interface GatewaysCreateOrUpdateOptionalParams + - Added Interface GatewaysDeleteHeaders + - Added Interface GatewaysDeleteOptionalParams + - Added Interface GatewaysGetOptionalParams + - Added Interface GatewaysListByResourceGroupNextOptionalParams + - Added Interface GatewaysListByResourceGroupOptionalParams + - Added Interface GatewaysListBySubscriptionNextOptionalParams + - Added Interface GatewaysListBySubscriptionOptionalParams + - Added Interface GatewaysListResult + - Added Interface GatewaysUpdateOptionalParams + - Added Interface GatewayUpdate + - Added Interface HardwareProfile + - Added Interface HybridIdentityMetadata + - Added Interface HybridIdentityMetadataList + - Added Interface MachineRunCommand + - Added Interface MachineRunCommandInstanceView + - Added Interface MachineRunCommandsCreateOrUpdateHeaders + - Added Interface MachineRunCommandsCreateOrUpdateOptionalParams + - Added Interface MachineRunCommandScriptSource + - Added Interface MachineRunCommandsDeleteHeaders + - Added Interface MachineRunCommandsDeleteOptionalParams + - Added Interface MachineRunCommandsGetOptionalParams + - Added Interface MachineRunCommandsListNextOptionalParams + - Added Interface MachineRunCommandsListOptionalParams + - Added Interface MachineRunCommandsListResult + - Added Interface MachineRunCommandUpdate + - Added Interface NetworkConfiguration + - Added Interface Processor + - Added Interface RunCommandInputParameter + - Added Interface RunCommandManagedIdentity + - Added Interface Settings + - Added Interface SettingsGetOptionalParams + - Added Interface SettingsPatchOptionalParams + - Added Interface SettingsUpdateOptionalParams + - Added Interface StorageProfile + - Added Interface TrackedResourceAutoGenerated + - Added Type Alias ExecutionState + - Added Type Alias GatewaysCreateOrUpdateResponse + - Added Type Alias GatewaysDeleteResponse + - Added Type Alias GatewaysGetResponse + - Added Type Alias GatewaysListByResourceGroupNextResponse + - Added Type Alias GatewaysListByResourceGroupResponse + - Added Type Alias GatewaysListBySubscriptionNextResponse + - Added Type Alias GatewaysListBySubscriptionResponse + - Added Type Alias GatewaysUpdateResponse + - Added Type Alias GatewayType + - Added Type Alias MachineRunCommandsCreateOrUpdateResponse + - Added Type Alias MachineRunCommandsDeleteResponse + - Added Type Alias MachineRunCommandsGetResponse + - Added Type Alias MachineRunCommandsListNextResponse + - Added Type Alias MachineRunCommandsListResponse + - Added Type Alias SettingsGetResponse + - Added Type Alias SettingsPatchResponse + - Added Type Alias SettingsUpdateResponse + - Interface Machine has a new optional parameter firmwareProfile + - Interface Machine has a new optional parameter hardwareProfile + - Interface Machine has a new optional parameter storageProfile + - Interface NetworkInterface has a new optional parameter id + - Interface NetworkInterface has a new optional parameter macAddress + - Interface NetworkInterface has a new optional parameter name + - Added Enum KnownExecutionState + - Added Enum KnownGatewayType + + ## 4.0.0 (2024-10-12) ### Features Added diff --git a/sdk/hybridcompute/arm-hybridcompute/README.md b/sdk/hybridcompute/arm-hybridcompute/README.md index 54a92e8185f..9ed36d6bf2c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/README.md @@ -6,7 +6,7 @@ The Hybrid Compute Management Client. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-hybridcompute) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/hybridcompute/arm-hybridcompute/_meta.json b/sdk/hybridcompute/arm-hybridcompute/_meta.json index 9ec2e53b558..e7422a57b72 100644 --- a/sdk/hybridcompute/arm-hybridcompute/_meta.json +++ b/sdk/hybridcompute/arm-hybridcompute/_meta.json @@ -1,8 +1,8 @@ { - "commit": "15b16d1b5c3cccdecdd1cfe936f6a8005680c557", + "commit": "2d4992bd73955a93f972ba6c476e980e7e16a992", "readme": "specification/hybridcompute/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hybridcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hybridcompute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.28 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.13", - "use": "@autorest/typescript@6.0.27" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.15", + "use": "@autorest/typescript@6.0.28" } \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/assets.json b/sdk/hybridcompute/arm-hybridcompute/assets.json index 616866d8b1e..51cfc773ee0 100644 --- a/sdk/hybridcompute/arm-hybridcompute/assets.json +++ b/sdk/hybridcompute/arm-hybridcompute/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/hybridcompute/arm-hybridcompute", - "Tag": "js/hybridcompute/arm-hybridcompute_d121632d82" + "Tag": "js/hybridcompute/arm-hybridcompute_0fd9d119d9" } diff --git a/sdk/hybridcompute/arm-hybridcompute/package.json b/sdk/hybridcompute/arm-hybridcompute/package.json index 2631757f979..00a1cbb6b90 100644 --- a/sdk/hybridcompute/arm-hybridcompute/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HybridComputeManagementClient.", - "version": "4.0.1", + "version": "4.1.0-beta.1", "engines": { "node": ">=18.0.0" }, @@ -28,6 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-hybridcompute.d.ts", "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", "typescript": "~5.6.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", @@ -89,7 +90,8 @@ "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped" + "integration-test:browser": "echo skipped", + "update-snippets": "echo skipped" }, "sideEffects": false, "//metadata": { diff --git a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md index c047dd6b081..37ac2bc81a8 100644 --- a/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md +++ b/sdk/hybridcompute/arm-hybridcompute/review/arm-hybridcompute.api.md @@ -49,6 +49,19 @@ export interface AgentUpgrade { readonly lastAttemptTimestamp?: Date; } +// @public +export interface AgentVersion { + agentVersion?: string; + downloadLink?: string; + osType?: string; +} + +// @public +export interface AgentVersionsList { + nextLink?: string; + value?: AgentVersion[]; +} + // @public export type ArcKindEnum = string; @@ -91,6 +104,17 @@ export interface ConnectionDetail { // @public export type CreatedByType = string; +// @public +export interface Disk { + diskType?: string; + generatedId?: string; + id?: string; + maxSizeInBytes?: number; + name?: string; + path?: string; + usedSpaceInBytes?: number; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -106,11 +130,25 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + // @public export type EsuEligibility = string; @@ -126,6 +164,9 @@ export type EsuKeyState = string; // @public export type EsuServerType = string; +// @public +export type ExecutionState = string; + // @public export interface ExtensionMetadata { get(location: string, publisher: string, extensionType: string, version: string, options?: ExtensionMetadataGetOptionalParams): Promise; @@ -175,9 +216,131 @@ export interface ExtensionValueListResult { readonly value?: ExtensionValue[]; } +// @public +export interface FirmwareProfile { + readonly serialNumber?: string; + readonly type?: string; +} + +// @public +export interface Gateway extends TrackedResourceAutoGenerated { + allowedFeatures?: string[]; + readonly gatewayEndpoint?: string; + readonly gatewayId?: string; + gatewayType?: GatewayType; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface Gateways { + beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, parameters: Gateway, options?: GatewaysCreateOrUpdateOptionalParams): Promise, GatewaysCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, parameters: Gateway, options?: GatewaysCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams): Promise, GatewaysDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams): Promise; + get(resourceGroupName: string, gatewayName: string, options?: GatewaysGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: GatewaysListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: GatewaysListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, gatewayName: string, parameters: GatewayUpdate, options?: GatewaysUpdateOptionalParams): Promise; +} + +// @public +export interface GatewaysCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface GatewaysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GatewaysCreateOrUpdateResponse = Gateway; + +// @public +export interface GatewaysDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface GatewaysDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GatewaysDeleteResponse = GatewaysDeleteHeaders; + +// @public +export interface GatewaysGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysGetResponse = Gateway; + +// @public +export interface GatewaysListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysListByResourceGroupNextResponse = GatewaysListResult; + +// @public +export interface GatewaysListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysListByResourceGroupResponse = GatewaysListResult; + +// @public +export interface GatewaysListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysListBySubscriptionNextResponse = GatewaysListResult; + +// @public +export interface GatewaysListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysListBySubscriptionResponse = GatewaysListResult; + +// @public +export interface GatewaysListResult { + nextLink?: string; + value: Gateway[]; +} + +// @public +export interface GatewaysUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GatewaysUpdateResponse = Gateway; + +// @public +export type GatewayType = string; + +// @public +export interface GatewayUpdate extends ResourceUpdate { + allowedFeatures?: string[]; +} + // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface HardwareProfile { + readonly numberOfCpuSockets?: number; + readonly processors?: Processor[]; + readonly totalPhysicalMemoryInBytes?: number; +} + // @public export type HotpatchEnablementStatus = string; @@ -193,12 +356,16 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) extensionMetadata: ExtensionMetadata; // (undocumented) + gateways: Gateways; + // (undocumented) licenseProfiles: LicenseProfiles; // (undocumented) licenses: Licenses; // (undocumented) machineExtensions: MachineExtensions; // (undocumented) + machineRunCommands: MachineRunCommands; + // (undocumented) machines: Machines; // (undocumented) networkProfileOperations: NetworkProfileOperations; @@ -213,6 +380,8 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // (undocumented) privateLinkScopes: PrivateLinkScopes; // (undocumented) + settingsOperations: SettingsOperations; + // (undocumented) subscriptionId: string; } @@ -250,6 +419,19 @@ export interface HybridComputePrivateLinkScopeProperties { publicNetworkAccess?: PublicNetworkAccessType; } +// @public +export interface HybridIdentityMetadata extends ProxyResourceAutoGenerated { + readonly identity?: Identity; + publicKey?: string; + vmId?: string; +} + +// @public +export interface HybridIdentityMetadataList { + nextLink?: string; + value: HybridIdentityMetadata[]; +} + // @public export interface Identity { readonly principalId?: string; @@ -343,6 +525,22 @@ export enum KnownEsuServerType { Standard = "Standard" } +// @public +export enum KnownExecutionState { + Canceled = "Canceled", + Failed = "Failed", + Pending = "Pending", + Running = "Running", + Succeeded = "Succeeded", + TimedOut = "TimedOut", + Unknown = "Unknown" +} + +// @public +export enum KnownGatewayType { + Public = "Public" +} + // @public export enum KnownHotpatchEnablementStatus { ActionRequired = "ActionRequired", @@ -899,6 +1097,8 @@ export interface Machine extends TrackedResource { readonly domainName?: string; readonly errorDetails?: ErrorDetail[]; extensions?: MachineExtensionInstanceView[]; + readonly firmwareProfile?: FirmwareProfile; + readonly hardwareProfile?: HardwareProfile; identity?: Identity; kind?: ArcKindEnum; readonly lastStatusChange?: Date; @@ -919,6 +1119,7 @@ export interface Machine extends TrackedResource { readonly resources?: MachineExtension[]; serviceStatuses?: ServiceStatuses; readonly status?: StatusTypes; + readonly storageProfile?: StorageProfile; vmId?: string; readonly vmUuid?: string; } @@ -1111,6 +1312,117 @@ export interface MachineListResult { value: Machine[]; } +// @public +export interface MachineRunCommand extends TrackedResource { + asyncExecution?: boolean; + errorBlobManagedIdentity?: RunCommandManagedIdentity; + errorBlobUri?: string; + readonly instanceView?: MachineRunCommandInstanceView; + outputBlobManagedIdentity?: RunCommandManagedIdentity; + outputBlobUri?: string; + parameters?: RunCommandInputParameter[]; + protectedParameters?: RunCommandInputParameter[]; + readonly provisioningState?: string; + runAsPassword?: string; + runAsUser?: string; + source?: MachineRunCommandScriptSource; + timeoutInSeconds?: number; +} + +// @public +export interface MachineRunCommandInstanceView { + endTime?: Date; + error?: string; + executionMessage?: string; + executionState?: ExecutionState; + exitCode?: number; + output?: string; + startTime?: Date; + statuses?: ExtensionsResourceStatus[]; +} + +// @public +export interface MachineRunCommands { + beginCreateOrUpdate(resourceGroupName: string, machineName: string, runCommandName: string, runCommandProperties: MachineRunCommand, options?: MachineRunCommandsCreateOrUpdateOptionalParams): Promise, MachineRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, machineName: string, runCommandName: string, runCommandProperties: MachineRunCommand, options?: MachineRunCommandsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, machineName: string, runCommandName: string, options?: MachineRunCommandsDeleteOptionalParams): Promise, MachineRunCommandsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, machineName: string, runCommandName: string, options?: MachineRunCommandsDeleteOptionalParams): Promise; + get(resourceGroupName: string, machineName: string, runCommandName: string, options?: MachineRunCommandsGetOptionalParams): Promise; + list(resourceGroupName: string, machineName: string, options?: MachineRunCommandsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MachineRunCommandsCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MachineRunCommandsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineRunCommandsCreateOrUpdateResponse = MachineRunCommand; + +// @public +export interface MachineRunCommandScriptSource { + commandId?: string; + script?: string; + scriptUri?: string; + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +// @public +export interface MachineRunCommandsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MachineRunCommandsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MachineRunCommandsDeleteResponse = MachineRunCommandsDeleteHeaders; + +// @public +export interface MachineRunCommandsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachineRunCommandsGetResponse = MachineRunCommand; + +// @public +export interface MachineRunCommandsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MachineRunCommandsListNextResponse = MachineRunCommandsListResult; + +// @public +export interface MachineRunCommandsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type MachineRunCommandsListResponse = MachineRunCommandsListResult; + +// @public +export interface MachineRunCommandsListResult { + nextLink?: string; + value?: MachineRunCommand[]; +} + +// @public +export interface MachineRunCommandUpdate extends ResourceUpdate { +} + // @public export interface Machines { beginAssessPatches(resourceGroupName: string, name: string, options?: MachinesAssessPatchesOptionalParams): Promise, MachinesAssessPatchesResponse>>; @@ -1204,9 +1516,21 @@ export interface MachineUpdate extends ResourceUpdate { privateLinkScopeResourceId?: string; } +// @public (undocumented) +export interface NetworkConfiguration extends ProxyResourceAutoGenerated { + readonly keyProperties?: KeyProperties; + location?: string; + networkConfigurationScopeId?: string; + networkConfigurationScopeResourceId?: string; + readonly tenantId?: string; +} + // @public export interface NetworkInterface { + id?: string; ipAddresses?: IpAddress[]; + macAddress?: string; + name?: string; } // @public @@ -1631,6 +1955,12 @@ export interface PrivateLinkServiceConnectionStateProperty { status: string; } +// @public +export interface Processor { + readonly name?: string; + readonly numberOfCores?: number; +} + // @public export interface ProductFeature { readonly billingEndDate?: Date; @@ -1710,6 +2040,18 @@ export interface ResourceUpdate { }; } +// @public +export interface RunCommandInputParameter { + name: string; + value: string; +} + +// @public +export interface RunCommandManagedIdentity { + clientId?: string; + objectId?: string; +} + // @public export interface ServiceStatus { startupType?: string; @@ -1722,12 +2064,51 @@ export interface ServiceStatuses { guestConfigurationService?: ServiceStatus; } +// @public (undocumented) +export interface Settings extends ProxyResourceAutoGenerated { + gatewayResourceId?: string; + readonly tenantId?: string; +} + +// @public +export interface SettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SettingsGetResponse = Settings; + +// @public +export interface SettingsOperations { + get(resourceGroupName: string, baseProvider: string, baseResourceType: string, baseResourceName: string, settingsResourceName: string, options?: SettingsGetOptionalParams): Promise; + patch(resourceGroupName: string, baseProvider: string, baseResourceType: string, baseResourceName: string, settingsResourceName: string, parameters: Settings, options?: SettingsPatchOptionalParams): Promise; + update(resourceGroupName: string, baseProvider: string, baseResourceType: string, baseResourceName: string, settingsResourceName: string, parameters: Settings, options?: SettingsUpdateOptionalParams): Promise; +} + +// @public +export interface SettingsPatchOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SettingsPatchResponse = Settings; + +// @public +export interface SettingsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SettingsUpdateResponse = Settings; + // @public export type StatusLevelTypes = string; // @public export type StatusTypes = string; +// @public +export interface StorageProfile { + disks?: Disk[]; +} + // @public export interface Subnet { addressPrefix?: string; @@ -1758,6 +2139,14 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface TrackedResourceAutoGenerated extends ResourceAutoGenerated { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // @public export interface UpgradeExtensionsOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/hybridcompute/arm-hybridcompute/sample.env b/sdk/hybridcompute/arm-hybridcompute/sample.env index 672847a3fea..508439fc7d6 100644 --- a/sdk/hybridcompute/arm-hybridcompute/sample.env +++ b/sdk/hybridcompute/arm-hybridcompute/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataGetSample.ts index fdfdf4e7f63..af8f820a24f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets an Extension Metadata based on location, publisher, extensionType and version * * @summary Gets an Extension Metadata based on location, publisher, extensionType and version - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_Get.json */ async function getAnExtensionsMetadata() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataListSample.ts index d6f71ead9f7..2b8036e88d0 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/extensionMetadataListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Extension versions based on location, publisher, extensionType * * @summary Gets all Extension versions based on location, publisher, extensionType - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_List.json */ async function getAListOfExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysCreateOrUpdateSample.ts new file mode 100644 index 00000000000..47e89c7492a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysCreateOrUpdateSample.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Gateway, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a gateway. + * + * @summary The operation to create or update a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_CreateOrUpdate.json + */ +async function createOrUpdateAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const parameters: Gateway = { + allowedFeatures: ["*"], + gatewayType: "Public", + location: "eastus2euap", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.beginCreateOrUpdateAndWait( + resourceGroupName, + gatewayName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysDeleteSample.ts new file mode 100644 index 00000000000..6356de13502 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to delete a gateway. + * + * @summary The operation to delete a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Delete.json + */ +async function deleteAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.beginDeleteAndWait( + resourceGroupName, + gatewayName, + ); + console.log(result); +} + +async function main() { + deleteAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysGetSample.ts new file mode 100644 index 00000000000..ddfd2392ac0 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about the view of a gateway. + * + * @summary Retrieves information about the view of a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Get.json + */ +async function getGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.get(resourceGroupName, gatewayName); + console.log(result); +} + +async function main() { + getGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListByResourceGroupSample.ts new file mode 100644 index 00000000000..58cfa35f7a1 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all gateways of a non-Azure machine + * + * @summary The operation to get all gateways of a non-Azure machine + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListByResourceGroup.json + */ +async function listGatewaysByResourceGroup() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateways.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGatewaysByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListBySubscriptionSample.ts new file mode 100644 index 00000000000..602f8ff3e96 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysListBySubscriptionSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all gateways of a non-Azure machine + * + * @summary The operation to get all gateways of a non-Azure machine + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListBySubscription.json + */ +async function listGatewaysBySubscription() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateways.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGatewaysBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysUpdateSample.ts new file mode 100644 index 00000000000..f9eb46e9a8a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/gatewaysUpdateSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GatewayUpdate, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to update a gateway. + * + * @summary The operation to update a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Update.json + */ +async function updateAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const parameters: GatewayUpdate = { allowedFeatures: ["*"] }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.update( + resourceGroupName, + gatewayName, + parameters, + ); + console.log(result); +} + +async function main() { + updateAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesCreateOrUpdateSample.ts index f954114f396..0e95e3714bb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update a license profile. * * @summary The operation to create or update a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json */ async function createOrUpdateALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesDeleteSample.ts index d5677baacab..b2528c2fa69 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a license profile. * * @summary The operation to delete a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Delete.json */ async function deleteALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesGetSample.ts index fa41f985886..fdaa61f7384 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the view of a license profile. * * @summary Retrieves information about the view of a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Get.json */ async function getLicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesListSample.ts index b9f3a086c03..2b3c280b1cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all license profiles of a non-Azure machine * * @summary The operation to get all license profiles of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_List.json */ async function listAllLicenseProfiles() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesUpdateSample.ts index b6fac9c0108..f1611d08790 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licenseProfilesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to update a license profile. * * @summary The operation to update a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Update.json */ async function updateALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesCreateOrUpdateSample.ts index b64b89da6fb..7fe57120501 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update a license. * * @summary The operation to create or update a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_CreateOrUpdate.json */ async function createOrUpdateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesDeleteSample.ts index 4d3be2b7b2a..6712f0a8e58 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a license. * * @summary The operation to delete a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Delete.json */ async function deleteALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesGetSample.ts index 1e8a977f420..330fbbc35ee 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the view of a license. * * @summary Retrieves information about the view of a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Get.json */ async function getLicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListByResourceGroupSample.ts index dfcaff3ff4c..2a33da47325 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all licenses of a non-Azure machine * * @summary The operation to get all licenses of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListByResourceGroup.json */ async function getAllMachineExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListBySubscriptionSample.ts index f2d22d0609b..2a914fd801a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListBySubscriptionSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all licenses of a non-Azure machine * * @summary The operation to get all licenses of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListBySubscription.json */ async function listLicensesBySubscription() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesUpdateSample.ts index f14a3d4deac..2dfb630cc97 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to update a license. * * @summary The operation to update a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Update.json */ async function updateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesValidateLicenseSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesValidateLicenseSample.ts index df06b892c3e..5055bca8488 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesValidateLicenseSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/licensesValidateLicenseSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to validate a license. * * @summary The operation to validate a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ValidateLicense.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ValidateLicense.json */ async function validateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsCreateOrUpdateSample.ts index c9610fd5d94..45477734d24 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update the extension. * * @summary The operation to create or update the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_CreateOrUpdate.json */ async function createOrUpdateAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsDeleteSample.ts index 480214199bf..331b833d31c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete the extension. * * @summary The operation to delete the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Delete.json */ async function deleteAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsGetSample.ts index df6dd1bd383..2ca155afa7b 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get the extension. * * @summary The operation to get the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Get.json */ async function getMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsListSample.ts index 3d2be11300c..ade0ca81522 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all extensions of a non-Azure machine * * @summary The operation to get all extensions of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_List.json */ async function getAllMachineExtensionsList() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsUpdateSample.ts index 6d590e16722..a6cfa6a6984 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineExtensionsUpdateSample.ts @@ -18,10 +18,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to The operation to update the extension. + * This sample demonstrates how to The operation to create or update the extension. * - * @summary The operation to update the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Update.json + * @summary The operation to create or update the extension. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Update.json */ async function createOrUpdateAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsCreateOrUpdateSample.ts new file mode 100644 index 00000000000..89ce6e7b767 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsCreateOrUpdateSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + MachineRunCommand, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a run command. + * + * @summary The operation to create or update a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json + */ +async function createOrUpdateARunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const runCommandProperties: MachineRunCommand = { + asyncExecution: false, + errorBlobUri: + "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + location: "eastus2", + outputBlobUri: + "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + parameters: [ + { name: "param1", value: "value1" }, + { name: "param2", value: "value2" }, + ], + runAsPassword: "", + runAsUser: "user1", + source: { script: "Write-Host Hello World!" }, + timeoutInSeconds: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginCreateOrUpdateAndWait( + resourceGroupName, + machineName, + runCommandName, + runCommandProperties, + ); + console.log(result); +} + +async function main() { + createOrUpdateARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsDeleteSample.ts new file mode 100644 index 00000000000..ba53653d46c --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to delete a run command. + * + * @summary The operation to delete a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Delete.json + */ +async function deleteAMachineRunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginDeleteAndWait( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + deleteAMachineRunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsGetSample.ts new file mode 100644 index 00000000000..f8b9fb9b06a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get a run command. + * + * @summary The operation to get a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Get.json + */ +async function getARunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.get( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + getARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsListSample.ts new file mode 100644 index 00000000000..48061f1bb28 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machineRunCommandsListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all the run commands of a non-Azure machine. + * + * @summary The operation to get all the run commands of a non-Azure machine. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_List.json + */ +async function getAllMachineRunCommands() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.machineRunCommands.list( + resourceGroupName, + machineName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + getAllMachineRunCommands(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesAssessPatchesSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesAssessPatchesSample.ts index f3392d1522a..f85c3d3f47e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesAssessPatchesSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesAssessPatchesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to assess patches on a hybrid machine identity in Azure. * * @summary The operation to assess patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_AssessPatches.json */ async function assessPatchStateOfAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesDeleteSample.ts index 4815ae06e1a..bb6d9174a36 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a hybrid machine. * * @summary The operation to delete a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Delete.json */ async function deleteAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesGetSample.ts index 192712fd9c4..93858b34e64 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get.json */ async function getMachine() { const subscriptionId = @@ -39,7 +39,7 @@ async function getMachine() { * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json */ async function getMachineWithLicenseProfileInstanceView() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesInstallPatchesSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesInstallPatchesSample.ts index afe1b93360b..11ed6a98fdd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesInstallPatchesSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesInstallPatchesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to install patches on a hybrid machine identity in Azure. * * @summary The operation to install patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_InstallPatches.json */ async function installPatchStateOfAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListByResourceGroupSample.ts index be99cc48393..ae276b6ab01 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListByResourceGroup.json */ async function listMachinesByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListBySubscriptionSample.ts index 315585d665f..409e584f954 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListBySubscriptionSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/machinesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListBySubscription.json */ async function listMachinesByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkProfileGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkProfileGetSample.ts index 6689495efe0..fac322570b7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkProfileGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkProfileGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get network information of hybrid machine * * @summary The operation to get network information of hybrid machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/NetworkProfile_Get.json */ async function getNetworkProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts index b48a7a83479..6889a5e285e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the network security perimeter configuration for a private link scope. * * @summary Gets the network security perimeter configuration for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ async function getsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts index 04e7d1b503d..5221504c515 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the network security perimeter configurations for a private link scope. * * @summary Lists the network security perimeter configurations for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ async function getsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts index c1fb893f5a5..7d7a80b1ea9 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Forces the network security perimeter configuration to refresh for a private link scope. * * @summary Forces the network security perimeter configuration to refresh for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ async function reconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/operationsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/operationsListSample.ts index d387b185423..392118b18f3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/operationsListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of hybrid compute operations. * * @summary Gets a list of hybrid compute operations. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/Operations_List.json */ async function listHybridComputeProviderOperations() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index e149d0eb0ec..80f78fbd092 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsDeleteSample.ts index e44918f7df5..301ebd1a5bf 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsGetSample.ts index eb3c01a68ea..82e552c2045 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts index edb567a0ca2..ccc529d9e32 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoint connections on a private link scope. * * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json */ async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesGetSample.ts index 100226c597f..9f8a0f5631a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts index 007f14cf494..3fd96f3d2c2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesCreateOrUpdateSample.ts index 8b6e4ae7579..31d54ad2031 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json */ async function privateLinkScopeCreate() { const subscriptionId = @@ -45,7 +45,7 @@ async function privateLinkScopeCreate() { * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json */ async function privateLinkScopeUpdate() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesDeleteSample.ts index 896013f60f6..3d3d7fee9de 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Azure Arc PrivateLinkScope. * * @summary Deletes a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json */ async function privateLinkScopesDelete() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetSample.ts index e289948c48a..7ccc812ca7c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope. * * @summary Returns a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsForMachineSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsForMachineSample.ts index cab5e9864dc..34e1c458285 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsForMachineSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsForMachineSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * * @summary Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsSample.ts index 3604d097822..f5adb503f05 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesGetValidationDetailsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details. * * @summary Returns a Azure Arc PrivateLinkScope's validation details. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListByResourceGroupSample.ts index 7d698639ccd..9bf91ce632d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @summary Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ async function privateLinkScopeListByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListSample.ts index 0e95c3e9b02..80c105b347d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * * @summary Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json */ async function privateLinkScopesListJson() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesUpdateTagsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesUpdateTagsSample.ts index 8c1b870b909..db53e0b85c4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesUpdateTagsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/privateLinkScopesUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ async function privateLinkScopeUpdateTagsOnly() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsGetSample.ts new file mode 100644 index 00000000000..2b763927831 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsGetSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Returns the base Settings for the target resource. + * + * @summary Returns the base Settings for the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsGet.json + */ +async function networkConfigurationsGet() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.get( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + ); + console.log(result); +} + +async function main() { + networkConfigurationsGet(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsPatchSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsPatchSample.ts new file mode 100644 index 00000000000..d5e7fc2346b --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsPatchSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Settings, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the base Settings of the target resource. + * + * @summary Update the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsPatch.json + */ +async function networkConfigurationsPatch() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters: Settings = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.patch( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + networkConfigurationsPatch(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsUpdateSample.ts new file mode 100644 index 00000000000..fdf91e4b41d --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/settingsUpdateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Settings, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the base Settings of the target resource. + * + * @summary Updates the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsUpdate.json + */ +async function settingsUpdate() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters: Settings = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.update( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + settingsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples-dev/upgradeExtensionsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples-dev/upgradeExtensionsSample.ts index ec8a23160b3..50cd5abe82e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples-dev/upgradeExtensionsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples-dev/upgradeExtensionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to Upgrade Machine Extensions. * * @summary The operation to Upgrade Machine Extensions. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extensions_Upgrade.json */ async function upgradeMachineExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/README.md b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/README.md similarity index 53% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/README.md rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/README.md index cc7a8e150a2..73337eecc98 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/README.md @@ -1,54 +1,67 @@ -# client library samples for JavaScript +# client library samples for JavaScript (Beta) These sample programs show how to use the JavaScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [extensionMetadataGetSample.js][extensionmetadatagetsample] | Gets an Extension Metadata based on location, publisher, extensionType and version x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json | -| [extensionMetadataListSample.js][extensionmetadatalistsample] | Gets all Extension versions based on location, publisher, extensionType x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_List.json | -| [licenseProfilesCreateOrUpdateSample.js][licenseprofilescreateorupdatesample] | The operation to create or update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json | -| [licenseProfilesDeleteSample.js][licenseprofilesdeletesample] | The operation to delete a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Delete.json | -| [licenseProfilesGetSample.js][licenseprofilesgetsample] | Retrieves information about the view of a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Get.json | -| [licenseProfilesListSample.js][licenseprofileslistsample] | The operation to get all license profiles of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_List.json | -| [licenseProfilesUpdateSample.js][licenseprofilesupdatesample] | The operation to update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Update.json | -| [licensesCreateOrUpdateSample.js][licensescreateorupdatesample] | The operation to create or update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json | -| [licensesDeleteSample.js][licensesdeletesample] | The operation to delete a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Delete.json | -| [licensesGetSample.js][licensesgetsample] | Retrieves information about the view of a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json | -| [licensesListByResourceGroupSample.js][licenseslistbyresourcegroupsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListByResourceGroup.json | -| [licensesListBySubscriptionSample.js][licenseslistbysubscriptionsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListBySubscription.json | -| [licensesUpdateSample.js][licensesupdatesample] | The operation to update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Update.json | -| [licensesValidateLicenseSample.js][licensesvalidatelicensesample] | The operation to validate a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ValidateLicense.json | -| [machineExtensionsCreateOrUpdateSample.js][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_CreateOrUpdate.json | -| [machineExtensionsDeleteSample.js][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Delete.json | -| [machineExtensionsGetSample.js][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json | -| [machineExtensionsListSample.js][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_List.json | -| [machineExtensionsUpdateSample.js][machineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Update.json | -| [machinesAssessPatchesSample.js][machinesassesspatchessample] | The operation to assess patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json | -| [machinesDeleteSample.js][machinesdeletesample] | The operation to delete a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json | -| [machinesGetSample.js][machinesgetsample] | Retrieves information about the model view or the instance view of a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json | -| [machinesInstallPatchesSample.js][machinesinstallpatchessample] | The operation to install patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json | -| [machinesListByResourceGroupSample.js][machineslistbyresourcegroupsample] | Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json | -| [machinesListBySubscriptionSample.js][machineslistbysubscriptionsample] | Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json | -| [networkProfileGetSample.js][networkprofilegetsample] | The operation to get network information of hybrid machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json | -| [networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js][networksecurityperimeterconfigurationsgetbyprivatelinkscopesample] | Gets the network security perimeter configuration for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json | -| [networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js][networksecurityperimeterconfigurationslistbyprivatelinkscopesample] | Lists the network security perimeter configurations for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json | -| [networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js][networksecurityperimeterconfigurationsreconcileforprivatelinkscopesample] | Forces the network security perimeter configuration to refresh for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json | -| [operationsListSample.js][operationslistsample] | Gets a list of hybrid compute operations. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List.json | -| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json | -| [privateEndpointConnectionsListByPrivateLinkScopeSample.js][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json | -| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json | -| [privateLinkResourcesListByPrivateLinkScopeSample.js][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json | -| [privateLinkScopesCreateOrUpdateSample.js][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json | -| [privateLinkScopesDeleteSample.js][privatelinkscopesdeletesample] | Deletes a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json | -| [privateLinkScopesGetSample.js][privatelinkscopesgetsample] | Returns a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json | -| [privateLinkScopesGetValidationDetailsForMachineSample.js][privatelinkscopesgetvalidationdetailsformachinesample] | Returns a Azure Arc PrivateLinkScope's validation details for a given machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json | -| [privateLinkScopesGetValidationDetailsSample.js][privatelinkscopesgetvalidationdetailssample] | Returns a Azure Arc PrivateLinkScope's validation details. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json | -| [privateLinkScopesListByResourceGroupSample.js][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Arc PrivateLinkScopes within a resource group. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json | -| [privateLinkScopesListSample.js][privatelinkscopeslistsample] | Gets a list of all Azure Arc PrivateLinkScopes within a subscription. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json | -| [privateLinkScopesUpdateTagsSample.js][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json | -| [upgradeExtensionsSample.js][upgradeextensionssample] | The operation to Upgrade Machine Extensions. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [extensionMetadataGetSample.js][extensionmetadatagetsample] | Gets an Extension Metadata based on location, publisher, extensionType and version x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_Get.json | +| [extensionMetadataListSample.js][extensionmetadatalistsample] | Gets all Extension versions based on location, publisher, extensionType x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_List.json | +| [gatewaysCreateOrUpdateSample.js][gatewayscreateorupdatesample] | The operation to create or update a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_CreateOrUpdate.json | +| [gatewaysDeleteSample.js][gatewaysdeletesample] | The operation to delete a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Delete.json | +| [gatewaysGetSample.js][gatewaysgetsample] | Retrieves information about the view of a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Get.json | +| [gatewaysListByResourceGroupSample.js][gatewayslistbyresourcegroupsample] | The operation to get all gateways of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListByResourceGroup.json | +| [gatewaysListBySubscriptionSample.js][gatewayslistbysubscriptionsample] | The operation to get all gateways of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListBySubscription.json | +| [gatewaysUpdateSample.js][gatewaysupdatesample] | The operation to update a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Update.json | +| [licenseProfilesCreateOrUpdateSample.js][licenseprofilescreateorupdatesample] | The operation to create or update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json | +| [licenseProfilesDeleteSample.js][licenseprofilesdeletesample] | The operation to delete a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Delete.json | +| [licenseProfilesGetSample.js][licenseprofilesgetsample] | Retrieves information about the view of a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Get.json | +| [licenseProfilesListSample.js][licenseprofileslistsample] | The operation to get all license profiles of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_List.json | +| [licenseProfilesUpdateSample.js][licenseprofilesupdatesample] | The operation to update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Update.json | +| [licensesCreateOrUpdateSample.js][licensescreateorupdatesample] | The operation to create or update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_CreateOrUpdate.json | +| [licensesDeleteSample.js][licensesdeletesample] | The operation to delete a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Delete.json | +| [licensesGetSample.js][licensesgetsample] | Retrieves information about the view of a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Get.json | +| [licensesListByResourceGroupSample.js][licenseslistbyresourcegroupsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListByResourceGroup.json | +| [licensesListBySubscriptionSample.js][licenseslistbysubscriptionsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListBySubscription.json | +| [licensesUpdateSample.js][licensesupdatesample] | The operation to update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Update.json | +| [licensesValidateLicenseSample.js][licensesvalidatelicensesample] | The operation to validate a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ValidateLicense.json | +| [machineExtensionsCreateOrUpdateSample.js][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_CreateOrUpdate.json | +| [machineExtensionsDeleteSample.js][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Delete.json | +| [machineExtensionsGetSample.js][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Get.json | +| [machineExtensionsListSample.js][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_List.json | +| [machineExtensionsUpdateSample.js][machineextensionsupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Update.json | +| [machineRunCommandsCreateOrUpdateSample.js][machineruncommandscreateorupdatesample] | The operation to create or update a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json | +| [machineRunCommandsDeleteSample.js][machineruncommandsdeletesample] | The operation to delete a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Delete.json | +| [machineRunCommandsGetSample.js][machineruncommandsgetsample] | The operation to get a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Get.json | +| [machineRunCommandsListSample.js][machineruncommandslistsample] | The operation to get all the run commands of a non-Azure machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_List.json | +| [machinesAssessPatchesSample.js][machinesassesspatchessample] | The operation to assess patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_AssessPatches.json | +| [machinesDeleteSample.js][machinesdeletesample] | The operation to delete a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Delete.json | +| [machinesGetSample.js][machinesgetsample] | Retrieves information about the model view or the instance view of a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get.json | +| [machinesInstallPatchesSample.js][machinesinstallpatchessample] | The operation to install patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_InstallPatches.json | +| [machinesListByResourceGroupSample.js][machineslistbyresourcegroupsample] | Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListByResourceGroup.json | +| [machinesListBySubscriptionSample.js][machineslistbysubscriptionsample] | Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListBySubscription.json | +| [networkProfileGetSample.js][networkprofilegetsample] | The operation to get network information of hybrid machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/NetworkProfile_Get.json | +| [networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js][networksecurityperimeterconfigurationsgetbyprivatelinkscopesample] | Gets the network security perimeter configuration for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js][networksecurityperimeterconfigurationslistbyprivatelinkscopesample] | Lists the network security perimeter configurations for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js][networksecurityperimeterconfigurationsreconcileforprivatelinkscopesample] | Forces the network security perimeter configuration to refresh for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json | +| [operationsListSample.js][operationslistsample] | Gets a list of hybrid compute operations. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/Operations_List.json | +| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json | +| [privateEndpointConnectionsListByPrivateLinkScopeSample.js][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json | +| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json | +| [privateLinkResourcesListByPrivateLinkScopeSample.js][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json | +| [privateLinkScopesCreateOrUpdateSample.js][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json | +| [privateLinkScopesDeleteSample.js][privatelinkscopesdeletesample] | Deletes a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json | +| [privateLinkScopesGetSample.js][privatelinkscopesgetsample] | Returns a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json | +| [privateLinkScopesGetValidationDetailsForMachineSample.js][privatelinkscopesgetvalidationdetailsformachinesample] | Returns a Azure Arc PrivateLinkScope's validation details for a given machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json | +| [privateLinkScopesGetValidationDetailsSample.js][privatelinkscopesgetvalidationdetailssample] | Returns a Azure Arc PrivateLinkScope's validation details. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json | +| [privateLinkScopesListByResourceGroupSample.js][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Arc PrivateLinkScopes within a resource group. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json | +| [privateLinkScopesListSample.js][privatelinkscopeslistsample] | Gets a list of all Azure Arc PrivateLinkScopes within a subscription. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json | +| [privateLinkScopesUpdateTagsSample.js][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json | +| [settingsGetSample.js][settingsgetsample] | Returns the base Settings for the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsGet.json | +| [settingsPatchSample.js][settingspatchsample] | Update the base Settings of the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsPatch.json | +| [settingsUpdateSample.js][settingsupdatesample] | Updates the base Settings of the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsUpdate.json | +| [upgradeExtensionsSample.js][upgradeextensionssample] | The operation to Upgrade Machine Extensions. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extensions_Upgrade.json | ## Prerequisites @@ -88,51 +101,64 @@ npx dev-tool run vendored cross-env HYBRIDCOMPUTE_SUBSCRIPTION_ID="", + runAsUser: "user1", + source: { script: "Write-Host Hello World!" }, + timeoutInSeconds: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginCreateOrUpdateAndWait( + resourceGroupName, + machineName, + runCommandName, + runCommandProperties, + ); + console.log(result); +} + +async function main() { + createOrUpdateARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsDeleteSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsDeleteSample.js new file mode 100644 index 00000000000..f00efd300a2 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsDeleteSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to The operation to delete a run command. + * + * @summary The operation to delete a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Delete.json + */ +async function deleteAMachineRunCommand() { + const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginDeleteAndWait( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + deleteAMachineRunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsGetSample.js new file mode 100644 index 00000000000..a5f9a7e2c02 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsGetSample.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to The operation to get a run command. + * + * @summary The operation to get a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Get.json + */ +async function getARunCommand() { + const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.get( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + getARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsListSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsListSample.js new file mode 100644 index 00000000000..6e469c037b8 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machineRunCommandsListSample.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to The operation to get all the run commands of a non-Azure machine. + * + * @summary The operation to get all the run commands of a non-Azure machine. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_List.json + */ +async function getAllMachineRunCommands() { + const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.machineRunCommands.list(resourceGroupName, machineName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + getAllMachineRunCommands(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesAssessPatchesSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesAssessPatchesSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesAssessPatchesSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesAssessPatchesSample.js index a642d14cb8e..da8a976b2a6 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesAssessPatchesSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesAssessPatchesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The operation to assess patches on a hybrid machine identity in Azure. * * @summary The operation to assess patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_AssessPatches.json */ async function assessPatchStateOfAMachine() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesDeleteSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesDeleteSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesDeleteSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesDeleteSample.js index e4677dc800c..289ed6e90d7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesDeleteSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The operation to delete a hybrid machine. * * @summary The operation to delete a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Delete.json */ async function deleteAMachine() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesGetSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesGetSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesGetSample.js index 299633c601b..dd524dfb3c4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesGetSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get.json */ async function getMachine() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; @@ -32,7 +32,7 @@ async function getMachine() { * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json */ async function getMachineWithLicenseProfileInstanceView() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesInstallPatchesSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesInstallPatchesSample.js similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesInstallPatchesSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesInstallPatchesSample.js index b093f202e83..334c0d5286d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesInstallPatchesSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesInstallPatchesSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The operation to install patches on a hybrid machine identity in Azure. * * @summary The operation to install patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_InstallPatches.json */ async function installPatchStateOfAMachine() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListByResourceGroupSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListByResourceGroupSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListByResourceGroupSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListByResourceGroupSample.js index 619a31b83e7..66c3f65f693 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListByResourceGroupSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListByResourceGroup.json */ async function listMachinesByResourceGroup() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListBySubscriptionSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListBySubscriptionSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListBySubscriptionSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListBySubscriptionSample.js index 7b4aeea82d3..fc510e31a15 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/machinesListBySubscriptionSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/machinesListBySubscriptionSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListBySubscription.json */ async function listMachinesByResourceGroup() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkProfileGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkProfileGetSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkProfileGetSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkProfileGetSample.js index f6f6cf246b3..662d6439607 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkProfileGetSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkProfileGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The operation to get network information of hybrid machine * * @summary The operation to get network information of hybrid machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/NetworkProfile_Get.json */ async function getNetworkProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js index 813511aa7c7..4450cacfa3f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the network security perimeter configuration for a private link scope. * * @summary Gets the network security perimeter configuration for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ async function getsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js index 8a8508253bc..7739ec97328 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the network security perimeter configurations for a private link scope. * * @summary Lists the network security perimeter configurations for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ async function getsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js index 63ce24d6e12..75ab03c2bb8 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Forces the network security perimeter configuration to refresh for a private link scope. * * @summary Forces the network security perimeter configuration to refresh for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ async function reconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/operationsListSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/operationsListSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/operationsListSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/operationsListSample.js index 148eaa892a0..ba97f906ca2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/operationsListSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of hybrid compute operations. * * @summary Gets a list of hybrid compute operations. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/Operations_List.json */ async function listHybridComputeProviderOperations() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/package.json b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/package.json similarity index 80% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/package.json rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/package.json index 0ed9123957f..b45773fdaf3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/package.json +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-hybridcompute-js", + "name": "@azure-samples/arm-hybridcompute-js-beta", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript", + "description": " client library samples for JavaScript (Beta)", "engines": { "node": ">=18.0.0" }, @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute", "dependencies": { - "@azure/arm-hybridcompute": "latest", + "@azure/arm-hybridcompute": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" } diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js index 7d99bce8757..257b3d5b2d0 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsDeleteSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsDeleteSample.js index 74f7b9b1177..124aca46f77 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsGetSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsGetSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsGetSample.js index 7dff5ae5ccb..4b510b81dd5 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js index c2cfb857ad5..a7b8f65ce9d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets all private endpoint connections on a private link scope. * * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json */ async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesGetSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesGetSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesGetSample.js index 6bad5cdc2d2..531c15eedfb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesGetSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js index 74d948ba07f..06840e40c03 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesCreateOrUpdateSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesCreateOrUpdateSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesCreateOrUpdateSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesCreateOrUpdateSample.js index 0718413f5a5..ade45e659bb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesCreateOrUpdateSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json */ async function privateLinkScopeCreate() { const subscriptionId = @@ -38,7 +38,7 @@ async function privateLinkScopeCreate() { * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json */ async function privateLinkScopeUpdate() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesDeleteSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesDeleteSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesDeleteSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesDeleteSample.js index 62998186390..076d8ac7f4a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesDeleteSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a Azure Arc PrivateLinkScope. * * @summary Deletes a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json */ async function privateLinkScopesDelete() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetSample.js index e7319109762..65bd0f90a72 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope. * * @summary Returns a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js index 417bda37da9..345673ca18c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsForMachineSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * * @summary Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsSample.js index 7b4ce0b16cd..dbfeb251209 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesGetValidationDetailsSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesGetValidationDetailsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details. * * @summary Returns a Azure Arc PrivateLinkScope's validation details. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListByResourceGroupSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListByResourceGroupSample.js similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListByResourceGroupSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListByResourceGroupSample.js index 5a18e24df86..49f830b8279 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListByResourceGroupSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @summary Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ async function privateLinkScopeListByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListSample.js index 386571020bd..77ba4caeeee 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesListSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * * @summary Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json */ async function privateLinkScopesListJson() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesUpdateTagsSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesUpdateTagsSample.js similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesUpdateTagsSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesUpdateTagsSample.js index afe615bfbe8..57a16b4f750 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/privateLinkScopesUpdateTagsSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/privateLinkScopesUpdateTagsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ async function privateLinkScopeUpdateTagsOnly() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "subid"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/sample.env b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/sample.env new file mode 100644 index 00000000000..508439fc7d6 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsGetSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsGetSample.js new file mode 100644 index 00000000000..d746ec3d22a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsGetSample.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Returns the base Settings for the target resource. + * + * @summary Returns the base Settings for the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsGet.json + */ +async function networkConfigurationsGet() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.get( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + ); + console.log(result); +} + +async function main() { + networkConfigurationsGet(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsPatchSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsPatchSample.js new file mode 100644 index 00000000000..c735f15654b --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsPatchSample.js @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the base Settings of the target resource. + * + * @summary Update the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsPatch.json + */ +async function networkConfigurationsPatch() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.patch( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + networkConfigurationsPatch(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsUpdateSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsUpdateSample.js new file mode 100644 index 00000000000..72bb593a992 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/settingsUpdateSample.js @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates the base Settings of the target resource. + * + * @summary Updates the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsUpdate.json + */ +async function settingsUpdate() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.update( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + settingsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/upgradeExtensionsSample.js b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/upgradeExtensionsSample.js similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/upgradeExtensionsSample.js rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/upgradeExtensionsSample.js index e20517a5b5c..ec4c8964741 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/upgradeExtensionsSample.js +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/javascript/upgradeExtensionsSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to The operation to Upgrade Machine Extensions. * * @summary The operation to Upgrade Machine Extensions. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extensions_Upgrade.json */ async function upgradeMachineExtensions() { const subscriptionId = process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/README.md b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/README.md similarity index 54% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/README.md rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/README.md index 7eaacc08d52..21ad222c506 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/README.md @@ -1,54 +1,67 @@ -# client library samples for TypeScript +# client library samples for TypeScript (Beta) These sample programs show how to use the TypeScript client libraries for in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [extensionMetadataGetSample.ts][extensionmetadatagetsample] | Gets an Extension Metadata based on location, publisher, extensionType and version x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json | -| [extensionMetadataListSample.ts][extensionmetadatalistsample] | Gets all Extension versions based on location, publisher, extensionType x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_List.json | -| [licenseProfilesCreateOrUpdateSample.ts][licenseprofilescreateorupdatesample] | The operation to create or update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json | -| [licenseProfilesDeleteSample.ts][licenseprofilesdeletesample] | The operation to delete a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Delete.json | -| [licenseProfilesGetSample.ts][licenseprofilesgetsample] | Retrieves information about the view of a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Get.json | -| [licenseProfilesListSample.ts][licenseprofileslistsample] | The operation to get all license profiles of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_List.json | -| [licenseProfilesUpdateSample.ts][licenseprofilesupdatesample] | The operation to update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Update.json | -| [licensesCreateOrUpdateSample.ts][licensescreateorupdatesample] | The operation to create or update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json | -| [licensesDeleteSample.ts][licensesdeletesample] | The operation to delete a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Delete.json | -| [licensesGetSample.ts][licensesgetsample] | Retrieves information about the view of a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json | -| [licensesListByResourceGroupSample.ts][licenseslistbyresourcegroupsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListByResourceGroup.json | -| [licensesListBySubscriptionSample.ts][licenseslistbysubscriptionsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListBySubscription.json | -| [licensesUpdateSample.ts][licensesupdatesample] | The operation to update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Update.json | -| [licensesValidateLicenseSample.ts][licensesvalidatelicensesample] | The operation to validate a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ValidateLicense.json | -| [machineExtensionsCreateOrUpdateSample.ts][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_CreateOrUpdate.json | -| [machineExtensionsDeleteSample.ts][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Delete.json | -| [machineExtensionsGetSample.ts][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json | -| [machineExtensionsListSample.ts][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_List.json | -| [machineExtensionsUpdateSample.ts][machineextensionsupdatesample] | The operation to update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Update.json | -| [machinesAssessPatchesSample.ts][machinesassesspatchessample] | The operation to assess patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json | -| [machinesDeleteSample.ts][machinesdeletesample] | The operation to delete a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json | -| [machinesGetSample.ts][machinesgetsample] | Retrieves information about the model view or the instance view of a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json | -| [machinesInstallPatchesSample.ts][machinesinstallpatchessample] | The operation to install patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json | -| [machinesListByResourceGroupSample.ts][machineslistbyresourcegroupsample] | Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json | -| [machinesListBySubscriptionSample.ts][machineslistbysubscriptionsample] | Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json | -| [networkProfileGetSample.ts][networkprofilegetsample] | The operation to get network information of hybrid machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json | -| [networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationsgetbyprivatelinkscopesample] | Gets the network security perimeter configuration for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json | -| [networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationslistbyprivatelinkscopesample] | Lists the network security perimeter configurations for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json | -| [networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationsreconcileforprivatelinkscopesample] | Forces the network security perimeter configuration to refresh for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of hybrid compute operations. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List.json | -| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json | -| [privateEndpointConnectionsListByPrivateLinkScopeSample.ts][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json | -| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json | -| [privateLinkResourcesListByPrivateLinkScopeSample.ts][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json | -| [privateLinkScopesCreateOrUpdateSample.ts][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json | -| [privateLinkScopesDeleteSample.ts][privatelinkscopesdeletesample] | Deletes a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json | -| [privateLinkScopesGetSample.ts][privatelinkscopesgetsample] | Returns a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json | -| [privateLinkScopesGetValidationDetailsForMachineSample.ts][privatelinkscopesgetvalidationdetailsformachinesample] | Returns a Azure Arc PrivateLinkScope's validation details for a given machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json | -| [privateLinkScopesGetValidationDetailsSample.ts][privatelinkscopesgetvalidationdetailssample] | Returns a Azure Arc PrivateLinkScope's validation details. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json | -| [privateLinkScopesListByResourceGroupSample.ts][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Arc PrivateLinkScopes within a resource group. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json | -| [privateLinkScopesListSample.ts][privatelinkscopeslistsample] | Gets a list of all Azure Arc PrivateLinkScopes within a subscription. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json | -| [privateLinkScopesUpdateTagsSample.ts][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json | -| [upgradeExtensionsSample.ts][upgradeextensionssample] | The operation to Upgrade Machine Extensions. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json | +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [extensionMetadataGetSample.ts][extensionmetadatagetsample] | Gets an Extension Metadata based on location, publisher, extensionType and version x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_Get.json | +| [extensionMetadataListSample.ts][extensionmetadatalistsample] | Gets all Extension versions based on location, publisher, extensionType x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_List.json | +| [gatewaysCreateOrUpdateSample.ts][gatewayscreateorupdatesample] | The operation to create or update a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_CreateOrUpdate.json | +| [gatewaysDeleteSample.ts][gatewaysdeletesample] | The operation to delete a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Delete.json | +| [gatewaysGetSample.ts][gatewaysgetsample] | Retrieves information about the view of a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Get.json | +| [gatewaysListByResourceGroupSample.ts][gatewayslistbyresourcegroupsample] | The operation to get all gateways of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListByResourceGroup.json | +| [gatewaysListBySubscriptionSample.ts][gatewayslistbysubscriptionsample] | The operation to get all gateways of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListBySubscription.json | +| [gatewaysUpdateSample.ts][gatewaysupdatesample] | The operation to update a gateway. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Update.json | +| [licenseProfilesCreateOrUpdateSample.ts][licenseprofilescreateorupdatesample] | The operation to create or update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json | +| [licenseProfilesDeleteSample.ts][licenseprofilesdeletesample] | The operation to delete a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Delete.json | +| [licenseProfilesGetSample.ts][licenseprofilesgetsample] | Retrieves information about the view of a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Get.json | +| [licenseProfilesListSample.ts][licenseprofileslistsample] | The operation to get all license profiles of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_List.json | +| [licenseProfilesUpdateSample.ts][licenseprofilesupdatesample] | The operation to update a license profile. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Update.json | +| [licensesCreateOrUpdateSample.ts][licensescreateorupdatesample] | The operation to create or update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_CreateOrUpdate.json | +| [licensesDeleteSample.ts][licensesdeletesample] | The operation to delete a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Delete.json | +| [licensesGetSample.ts][licensesgetsample] | Retrieves information about the view of a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Get.json | +| [licensesListByResourceGroupSample.ts][licenseslistbyresourcegroupsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListByResourceGroup.json | +| [licensesListBySubscriptionSample.ts][licenseslistbysubscriptionsample] | The operation to get all licenses of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListBySubscription.json | +| [licensesUpdateSample.ts][licensesupdatesample] | The operation to update a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Update.json | +| [licensesValidateLicenseSample.ts][licensesvalidatelicensesample] | The operation to validate a license. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ValidateLicense.json | +| [machineExtensionsCreateOrUpdateSample.ts][machineextensionscreateorupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_CreateOrUpdate.json | +| [machineExtensionsDeleteSample.ts][machineextensionsdeletesample] | The operation to delete the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Delete.json | +| [machineExtensionsGetSample.ts][machineextensionsgetsample] | The operation to get the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Get.json | +| [machineExtensionsListSample.ts][machineextensionslistsample] | The operation to get all extensions of a non-Azure machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_List.json | +| [machineExtensionsUpdateSample.ts][machineextensionsupdatesample] | The operation to create or update the extension. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Update.json | +| [machineRunCommandsCreateOrUpdateSample.ts][machineruncommandscreateorupdatesample] | The operation to create or update a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json | +| [machineRunCommandsDeleteSample.ts][machineruncommandsdeletesample] | The operation to delete a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Delete.json | +| [machineRunCommandsGetSample.ts][machineruncommandsgetsample] | The operation to get a run command. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Get.json | +| [machineRunCommandsListSample.ts][machineruncommandslistsample] | The operation to get all the run commands of a non-Azure machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_List.json | +| [machinesAssessPatchesSample.ts][machinesassesspatchessample] | The operation to assess patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_AssessPatches.json | +| [machinesDeleteSample.ts][machinesdeletesample] | The operation to delete a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Delete.json | +| [machinesGetSample.ts][machinesgetsample] | Retrieves information about the model view or the instance view of a hybrid machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get.json | +| [machinesInstallPatchesSample.ts][machinesinstallpatchessample] | The operation to install patches on a hybrid machine identity in Azure. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_InstallPatches.json | +| [machinesListByResourceGroupSample.ts][machineslistbyresourcegroupsample] | Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListByResourceGroup.json | +| [machinesListBySubscriptionSample.ts][machineslistbysubscriptionsample] | Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListBySubscription.json | +| [networkProfileGetSample.ts][networkprofilegetsample] | The operation to get network information of hybrid machine x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/NetworkProfile_Get.json | +| [networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationsgetbyprivatelinkscopesample] | Gets the network security perimeter configuration for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationslistbyprivatelinkscopesample] | Lists the network security perimeter configurations for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts][networksecurityperimeterconfigurationsreconcileforprivatelinkscopesample] | Forces the network security perimeter configuration to refresh for a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json | +| [operationsListSample.ts][operationslistsample] | Gets a list of hybrid compute operations. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/Operations_List.json | +| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json | +| [privateEndpointConnectionsListByPrivateLinkScopeSample.ts][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json | +| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json | +| [privateLinkResourcesListByPrivateLinkScopeSample.ts][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json | +| [privateLinkScopesCreateOrUpdateSample.ts][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json | +| [privateLinkScopesDeleteSample.ts][privatelinkscopesdeletesample] | Deletes a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json | +| [privateLinkScopesGetSample.ts][privatelinkscopesgetsample] | Returns a Azure Arc PrivateLinkScope. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json | +| [privateLinkScopesGetValidationDetailsForMachineSample.ts][privatelinkscopesgetvalidationdetailsformachinesample] | Returns a Azure Arc PrivateLinkScope's validation details for a given machine. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json | +| [privateLinkScopesGetValidationDetailsSample.ts][privatelinkscopesgetvalidationdetailssample] | Returns a Azure Arc PrivateLinkScope's validation details. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json | +| [privateLinkScopesListByResourceGroupSample.ts][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Arc PrivateLinkScopes within a resource group. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json | +| [privateLinkScopesListSample.ts][privatelinkscopeslistsample] | Gets a list of all Azure Arc PrivateLinkScopes within a subscription. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json | +| [privateLinkScopesUpdateTagsSample.ts][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json | +| [settingsGetSample.ts][settingsgetsample] | Returns the base Settings for the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsGet.json | +| [settingsPatchSample.ts][settingspatchsample] | Update the base Settings of the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsPatch.json | +| [settingsUpdateSample.ts][settingsupdatesample] | Updates the base Settings of the target resource. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsUpdate.json | +| [upgradeExtensionsSample.ts][upgradeextensionssample] | The operation to Upgrade Machine Extensions. x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extensions_Upgrade.json | ## Prerequisites @@ -100,51 +113,64 @@ npx dev-tool run vendored cross-env HYBRIDCOMPUTE_SUBSCRIPTION_ID="=18.0.0" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hybridcompute/arm-hybridcompute", "dependencies": { - "@azure/arm-hybridcompute": "latest", + "@azure/arm-hybridcompute": "next", "dotenv": "latest", "@azure/identity": "^4.2.1" }, diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/sample.env b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/sample.env new file mode 100644 index 00000000000..508439fc7d6 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataGetSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataGetSample.ts index fdfdf4e7f63..af8f820a24f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets an Extension Metadata based on location, publisher, extensionType and version * * @summary Gets an Extension Metadata based on location, publisher, extensionType and version - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_Get.json */ async function getAnExtensionsMetadata() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataListSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataListSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataListSample.ts index d6f71ead9f7..2b8036e88d0 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/extensionMetadataListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/extensionMetadataListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all Extension versions based on location, publisher, extensionType * * @summary Gets all Extension versions based on location, publisher, extensionType - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ExtensionMetadata_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/ExtensionMetadata_List.json */ async function getAListOfExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysCreateOrUpdateSample.ts new file mode 100644 index 00000000000..47e89c7492a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysCreateOrUpdateSample.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Gateway, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a gateway. + * + * @summary The operation to create or update a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_CreateOrUpdate.json + */ +async function createOrUpdateAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const parameters: Gateway = { + allowedFeatures: ["*"], + gatewayType: "Public", + location: "eastus2euap", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.beginCreateOrUpdateAndWait( + resourceGroupName, + gatewayName, + parameters, + ); + console.log(result); +} + +async function main() { + createOrUpdateAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysDeleteSample.ts new file mode 100644 index 00000000000..6356de13502 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysDeleteSample.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to delete a gateway. + * + * @summary The operation to delete a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Delete.json + */ +async function deleteAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.beginDeleteAndWait( + resourceGroupName, + gatewayName, + ); + console.log(result); +} + +async function main() { + deleteAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysGetSample.ts new file mode 100644 index 00000000000..ddfd2392ac0 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysGetSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves information about the view of a gateway. + * + * @summary Retrieves information about the view of a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Get.json + */ +async function getGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.get(resourceGroupName, gatewayName); + console.log(result); +} + +async function main() { + getGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListByResourceGroupSample.ts new file mode 100644 index 00000000000..58cfa35f7a1 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListByResourceGroupSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all gateways of a non-Azure machine + * + * @summary The operation to get all gateways of a non-Azure machine + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListByResourceGroup.json + */ +async function listGatewaysByResourceGroup() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateways.listByResourceGroup( + resourceGroupName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGatewaysByResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListBySubscriptionSample.ts new file mode 100644 index 00000000000..602f8ff3e96 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysListBySubscriptionSample.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all gateways of a non-Azure machine + * + * @summary The operation to get all gateways of a non-Azure machine + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_ListBySubscription.json + */ +async function listGatewaysBySubscription() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.gateways.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listGatewaysBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysUpdateSample.ts new file mode 100644 index 00000000000..f9eb46e9a8a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/gatewaysUpdateSample.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + GatewayUpdate, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to update a gateway. + * + * @summary The operation to update a gateway. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/Gateway_Update.json + */ +async function updateAGateway() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "ffd506c8-3415-42d3-9612-fdb423fb17df"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const gatewayName = "{gatewayName}"; + const parameters: GatewayUpdate = { allowedFeatures: ["*"] }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.gateways.update( + resourceGroupName, + gatewayName, + parameters, + ); + console.log(result); +} + +async function main() { + updateAGateway(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesCreateOrUpdateSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesCreateOrUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesCreateOrUpdateSample.ts index f954114f396..0e95e3714bb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update a license profile. * * @summary The operation to create or update a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json */ async function createOrUpdateALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesDeleteSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesDeleteSample.ts index d5677baacab..b2528c2fa69 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a license profile. * * @summary The operation to delete a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Delete.json */ async function deleteALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesGetSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesGetSample.ts index fa41f985886..fdaa61f7384 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the view of a license profile. * * @summary Retrieves information about the view of a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Get.json */ async function getLicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesListSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesListSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesListSample.ts index b9f3a086c03..2b3c280b1cd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all license profiles of a non-Azure machine * * @summary The operation to get all license profiles of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_List.json */ async function listAllLicenseProfiles() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesUpdateSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesUpdateSample.ts index b6fac9c0108..f1611d08790 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licenseProfilesUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licenseProfilesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to update a license profile. * * @summary The operation to update a license profile. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/LicenseProfile_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/licenseProfile/LicenseProfile_Update.json */ async function updateALicenseProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesCreateOrUpdateSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesCreateOrUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesCreateOrUpdateSample.ts index b64b89da6fb..7fe57120501 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update a license. * * @summary The operation to create or update a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_CreateOrUpdate.json */ async function createOrUpdateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesDeleteSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesDeleteSample.ts index 4d3be2b7b2a..6712f0a8e58 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a license. * * @summary The operation to delete a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Delete.json */ async function deleteALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesGetSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesGetSample.ts index 1e8a977f420..330fbbc35ee 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the view of a license. * * @summary Retrieves information about the view of a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Get.json */ async function getLicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListByResourceGroupSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListByResourceGroupSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListByResourceGroupSample.ts index dfcaff3ff4c..2a33da47325 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all licenses of a non-Azure machine * * @summary The operation to get all licenses of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListByResourceGroup.json */ async function getAllMachineExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListBySubscriptionSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListBySubscriptionSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListBySubscriptionSample.ts index f2d22d0609b..2a914fd801a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesListBySubscriptionSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all licenses of a non-Azure machine * * @summary The operation to get all licenses of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ListBySubscription.json */ async function listLicensesBySubscription() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesUpdateSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesUpdateSample.ts index f14a3d4deac..2dfb630cc97 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to update a license. * * @summary The operation to update a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_Update.json */ async function updateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesValidateLicenseSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesValidateLicenseSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesValidateLicenseSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesValidateLicenseSample.ts index df06b892c3e..5055bca8488 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/licensesValidateLicenseSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/licensesValidateLicenseSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to validate a license. * * @summary The operation to validate a license. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/License_ValidateLicense.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/License_ValidateLicense.json */ async function validateALicense() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsCreateOrUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts index c9610fd5d94..45477734d24 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to create or update the extension. * * @summary The operation to create or update the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_CreateOrUpdate.json */ async function createOrUpdateAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsDeleteSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsDeleteSample.ts index 480214199bf..331b833d31c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete the extension. * * @summary The operation to delete the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Delete.json */ async function deleteAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsGetSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsGetSample.ts index df6dd1bd383..2ca155afa7b 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get the extension. * * @summary The operation to get the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Get.json */ async function getMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsListSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsListSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsListSample.ts index 3d2be11300c..ade0ca81522 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get all extensions of a non-Azure machine * * @summary The operation to get all extensions of a non-Azure machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_List.json */ async function getAllMachineExtensionsList() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsUpdateSample.ts similarity index 87% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsUpdateSample.ts index 6d590e16722..a6cfa6a6984 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machineExtensionsUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineExtensionsUpdateSample.ts @@ -18,10 +18,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to The operation to update the extension. + * This sample demonstrates how to The operation to create or update the extension. * - * @summary The operation to update the extension. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extension_Update.json + * @summary The operation to create or update the extension. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extension_Update.json */ async function createOrUpdateAMachineExtension() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsCreateOrUpdateSample.ts new file mode 100644 index 00000000000..89ce6e7b767 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsCreateOrUpdateSample.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + MachineRunCommand, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to create or update a run command. + * + * @summary The operation to create or update a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json + */ +async function createOrUpdateARunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const runCommandProperties: MachineRunCommand = { + asyncExecution: false, + errorBlobUri: + "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + location: "eastus2", + outputBlobUri: + "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + parameters: [ + { name: "param1", value: "value1" }, + { name: "param2", value: "value2" }, + ], + runAsPassword: "", + runAsUser: "user1", + source: { script: "Write-Host Hello World!" }, + timeoutInSeconds: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginCreateOrUpdateAndWait( + resourceGroupName, + machineName, + runCommandName, + runCommandProperties, + ); + console.log(result); +} + +async function main() { + createOrUpdateARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsDeleteSample.ts new file mode 100644 index 00000000000..ba53653d46c --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsDeleteSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to delete a run command. + * + * @summary The operation to delete a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Delete.json + */ +async function deleteAMachineRunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.beginDeleteAndWait( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + deleteAMachineRunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsGetSample.ts new file mode 100644 index 00000000000..f8b9fb9b06a --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsGetSample.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get a run command. + * + * @summary The operation to get a run command. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_Get.json + */ +async function getARunCommand() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const runCommandName = "myRunCommand"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.machineRunCommands.get( + resourceGroupName, + machineName, + runCommandName, + ); + console.log(result); +} + +async function main() { + getARunCommand(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsListSample.ts new file mode 100644 index 00000000000..48061f1bb28 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machineRunCommandsListSample.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to The operation to get all the run commands of a non-Azure machine. + * + * @summary The operation to get all the run commands of a non-Azure machine. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/runCommand/RunCommands_List.json + */ +async function getAllMachineRunCommands() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || "{subscriptionId}"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "myResourceGroup"; + const machineName = "myMachine"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.machineRunCommands.list( + resourceGroupName, + machineName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + getAllMachineRunCommands(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesAssessPatchesSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesAssessPatchesSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesAssessPatchesSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesAssessPatchesSample.ts index f3392d1522a..f85c3d3f47e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesAssessPatchesSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesAssessPatchesSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to assess patches on a hybrid machine identity in Azure. * * @summary The operation to assess patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_AssessPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_AssessPatches.json */ async function assessPatchStateOfAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesDeleteSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesDeleteSample.ts index 4815ae06e1a..bb6d9174a36 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to delete a hybrid machine. * * @summary The operation to delete a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Delete.json */ async function deleteAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesGetSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesGetSample.ts index 192712fd9c4..93858b34e64 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesGetSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get.json */ async function getMachine() { const subscriptionId = @@ -39,7 +39,7 @@ async function getMachine() { * This sample demonstrates how to Retrieves information about the model view or the instance view of a hybrid machine. * * @summary Retrieves information about the model view or the instance view of a hybrid machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json */ async function getMachineWithLicenseProfileInstanceView() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesInstallPatchesSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesInstallPatchesSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesInstallPatchesSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesInstallPatchesSample.ts index afe1b93360b..11ed6a98fdd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesInstallPatchesSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesInstallPatchesSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to install patches on a hybrid machine identity in Azure. * * @summary The operation to install patches on a hybrid machine identity in Azure. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machine_InstallPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machine_InstallPatches.json */ async function installPatchStateOfAMachine() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListByResourceGroupSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListByResourceGroupSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListByResourceGroupSample.ts index be99cc48393..ae276b6ab01 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListByResourceGroup.json */ async function listMachinesByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListBySubscriptionSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListBySubscriptionSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListBySubscriptionSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListBySubscriptionSample.ts index 315585d665f..409e584f954 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/machinesListBySubscriptionSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/machinesListBySubscriptionSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. * * @summary Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/Machines_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/Machines_ListBySubscription.json */ async function listMachinesByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkProfileGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkProfileGetSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkProfileGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkProfileGetSample.ts index 6689495efe0..fac322570b7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkProfileGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkProfileGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to The operation to get network information of hybrid machine * * @summary The operation to get network information of hybrid machine - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/NetworkProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/NetworkProfile_Get.json */ async function getNetworkProfile() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts index b48a7a83479..6889a5e285e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the network security perimeter configuration for a private link scope. * * @summary Gets the network security perimeter configuration for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ async function getsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts index 04e7d1b503d..5221504c515 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the network security perimeter configurations for a private link scope. * * @summary Lists the network security perimeter configurations for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ async function getsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts index c1fb893f5a5..7d7a80b1ea9 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Forces the network security perimeter configuration to refresh for a private link scope. * * @summary Forces the network security perimeter configuration to refresh for a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ async function reconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/operationsListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/operationsListSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/operationsListSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/operationsListSample.ts index d387b185423..392118b18f3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/operationsListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of hybrid compute operations. * * @summary Gets a list of hybrid compute operations. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/Operations_List.json */ async function listHybridComputeProviderOperations() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index e149d0eb0ec..80f78fbd092 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. * * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json */ async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index e44918f7df5..301ebd1a5bf 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection with a given name. * * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json */ async function deletesAPrivateEndpointConnectionWithAGivenName() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsGetSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsGetSample.ts index eb3c01a68ea..82e552c2045 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a private endpoint connection. * * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts index edb567a0ca2..ccc529d9e32 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets all private endpoint connections on a private link scope. * * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json */ async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesGetSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesGetSample.ts index 100226c597f..9f8a0f5631a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts index 007f14cf494..3fd96f3d2c2 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ async function getsPrivateEndpointConnection() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesCreateOrUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesCreateOrUpdateSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts index 8b6e4ae7579..31d54ad2031 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesCreateOrUpdateSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json */ async function privateLinkScopeCreate() { const subscriptionId = @@ -45,7 +45,7 @@ async function privateLinkScopeCreate() { * This sample demonstrates how to Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. * * @summary Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json */ async function privateLinkScopeUpdate() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesDeleteSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesDeleteSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesDeleteSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesDeleteSample.ts index 896013f60f6..3d3d7fee9de 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesDeleteSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a Azure Arc PrivateLinkScope. * * @summary Deletes a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json */ async function privateLinkScopesDelete() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetSample.ts index e289948c48a..7ccc812ca7c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope. * * @summary Returns a Azure Arc PrivateLinkScope. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts index cab5e9864dc..34e1c458285 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsForMachineSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * * @summary Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsSample.ts similarity index 91% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsSample.ts index 3604d097822..f5adb503f05 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesGetValidationDetailsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesGetValidationDetailsSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Returns a Azure Arc PrivateLinkScope's validation details. * * @summary Returns a Azure Arc PrivateLinkScope's validation details. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json */ async function privateLinkScopeGet() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListByResourceGroupSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListByResourceGroupSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts index 7d698639ccd..9bf91ce632d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListByResourceGroupSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @summary Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ async function privateLinkScopeListByResourceGroup() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListSample.ts similarity index 92% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListSample.ts index 0e95c3e9b02..80c105b347d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesListSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * * @summary Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json */ async function privateLinkScopesListJson() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesUpdateTagsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts similarity index 93% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesUpdateTagsSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts index 8c1b870b909..db53e0b85c4 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/privateLinkScopesUpdateTagsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ async function privateLinkScopeUpdateTagsOnly() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsGetSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsGetSample.ts new file mode 100644 index 00000000000..2b763927831 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsGetSample.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { HybridComputeManagementClient } from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Returns the base Settings for the target resource. + * + * @summary Returns the base Settings for the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsGet.json + */ +async function networkConfigurationsGet() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.get( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + ); + console.log(result); +} + +async function main() { + networkConfigurationsGet(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsPatchSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsPatchSample.ts new file mode 100644 index 00000000000..d5e7fc2346b --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsPatchSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Settings, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the base Settings of the target resource. + * + * @summary Update the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsPatch.json + */ +async function networkConfigurationsPatch() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters: Settings = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.patch( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + networkConfigurationsPatch(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsUpdateSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsUpdateSample.ts new file mode 100644 index 00000000000..fdf91e4b41d --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/settingsUpdateSample.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Settings, + HybridComputeManagementClient, +} from "@azure/arm-hybridcompute"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates the base Settings of the target resource. + * + * @summary Updates the base Settings of the target resource. + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings/SettingsUpdate.json + */ +async function settingsUpdate() { + const subscriptionId = + process.env["HYBRIDCOMPUTE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = + process.env["HYBRIDCOMPUTE_RESOURCE_GROUP"] || "hybridRG"; + const baseProvider = "Microsoft.HybridCompute"; + const baseResourceType = "machines"; + const baseResourceName = "testMachine"; + const settingsResourceName = "default"; + const parameters: Settings = { + gatewayResourceId: + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway", + }; + const credential = new DefaultAzureCredential(); + const client = new HybridComputeManagementClient(credential, subscriptionId); + const result = await client.settingsOperations.update( + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + ); + console.log(result); +} + +async function main() { + settingsUpdate(); +} + +main().catch(console.error); diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/upgradeExtensionsSample.ts b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/upgradeExtensionsSample.ts similarity index 94% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/upgradeExtensionsSample.ts rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/upgradeExtensionsSample.ts index ec8a23160b3..50cd5abe82e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/src/upgradeExtensionsSample.ts +++ b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/src/upgradeExtensionsSample.ts @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to The operation to Upgrade Machine Extensions. * * @summary The operation to Upgrade Machine Extensions. - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/Extensions_Upgrade.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/extension/Extensions_Upgrade.json */ async function upgradeMachineExtensions() { const subscriptionId = diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/tsconfig.json similarity index 100% rename from sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/tsconfig.json rename to sdk/hybridcompute/arm-hybridcompute/samples/v4-beta/typescript/tsconfig.json diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/sample.env b/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/sample.env deleted file mode 100644 index 672847a3fea..00000000000 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/sample.env b/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/sample.env deleted file mode 100644 index 672847a3fea..00000000000 --- a/sdk/hybridcompute/arm-hybridcompute/samples/v4/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index 76005a1946d..6acba958f7a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -28,6 +28,9 @@ import { ExtensionMetadataImpl, OperationsImpl, NetworkProfileOperationsImpl, + MachineRunCommandsImpl, + GatewaysImpl, + SettingsOperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, @@ -41,6 +44,9 @@ import { ExtensionMetadata, Operations, NetworkProfileOperations, + MachineRunCommands, + Gateways, + SettingsOperations, PrivateLinkScopes, PrivateLinkResources, PrivateEndpointConnections, @@ -86,7 +92,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-hybridcompute/4.0.1`; + const packageDetails = `azsdk-js-arm-hybridcompute/4.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -140,7 +146,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-07-10"; + this.apiVersion = options.apiVersion || "2024-07-31-preview"; this.licenses = new LicensesImpl(this); this.machines = new MachinesImpl(this); this.licenseProfiles = new LicenseProfilesImpl(this); @@ -148,6 +154,9 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { this.extensionMetadata = new ExtensionMetadataImpl(this); this.operations = new OperationsImpl(this); this.networkProfileOperations = new NetworkProfileOperationsImpl(this); + this.machineRunCommands = new MachineRunCommandsImpl(this); + this.gateways = new GatewaysImpl(this); + this.settingsOperations = new SettingsOperationsImpl(this); this.privateLinkScopes = new PrivateLinkScopesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -282,6 +291,9 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient { extensionMetadata: ExtensionMetadata; operations: Operations; networkProfileOperations: NetworkProfileOperations; + machineRunCommands: MachineRunCommands; + gateways: Gateways; + settingsOperations: SettingsOperations; privateLinkScopes: PrivateLinkScopes; privateLinkResources: PrivateLinkResources; privateEndpointConnections: PrivateEndpointConnections; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index d8a94f4e931..d487fa84269 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -230,6 +230,77 @@ export interface ServiceStatus { startupType?: string; } +/** Describes the hardware of the machine */ +export interface HardwareProfile { + /** + * The total physical memory on the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalPhysicalMemoryInBytes?: number; + /** + * The total number of CPU sockets available on the machine + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfCpuSockets?: number; + /** + * The physical processors of the machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processors?: Processor[]; +} + +/** Describes the firmware of the machine */ +export interface Processor { + /** + * The name of the processor. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The total number of physical cores on the processor. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly numberOfCores?: number; +} + +/** Describes the storage configuration of the machine */ +export interface StorageProfile { + /** The disks on the machine. */ + disks?: Disk[]; +} + +/** Describes a disk on the machine */ +export interface Disk { + /** The path of the disk. */ + path?: string; + /** The type of the disk. */ + diskType?: string; + /** The generated ID of the disk. */ + generatedId?: string; + /** The ID of the disk. */ + id?: string; + /** The name of the disk. */ + name?: string; + /** The size of the disk, in bytes */ + maxSizeInBytes?: number; + /** The amount of space used on the disk, in bytes */ + usedSpaceInBytes?: number; +} + +/** Describes the firmware of the machine */ +export interface FirmwareProfile { + /** + * The serial number of the firmware + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serialNumber?: string; + /** + * The type of the firmware + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ export interface CloudMetadata { /** @@ -243,9 +314,9 @@ export interface CloudMetadata { export interface AgentUpgrade { /** Specifies the version info w.r.t AgentUpgrade for the machine. */ desiredVersion?: string; - /** The correlation ID passed in from RSM per upgrade. */ + /** The correlation ID associated with an agent upgrade operation. */ correlationId?: string; - /** Specifies if RSM should try to upgrade this machine */ + /** Specifies if the machine's agent should be upgraded */ enableAutomaticUpgrade?: boolean; /** * Specifies the version of the last attempt @@ -461,6 +532,12 @@ export interface NetworkProfile { /** Describes a network interface. */ export interface NetworkInterface { + /** Represents MAC address of the network interface. */ + macAddress?: string; + /** Represents the ID of the network interface. */ + id?: string; + /** Represents the name of the network interface. */ + name?: string; /** The list of IP addresses in this interface. */ ipAddresses?: IpAddress[]; } @@ -873,6 +950,119 @@ export interface OperationValueDisplay { readonly provider?: string; } +/** Describes the script sources for run command. Use only one of script, scriptUri, commandId. */ +export interface MachineRunCommandScriptSource { + /** Specifies the script content to be executed on the machine. */ + script?: string; + /** Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. */ + scriptUri?: string; + /** Specifies the commandId of predefined built-in script. */ + commandId?: string; + /** User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +/** Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. */ +export interface RunCommandManagedIdentity { + /** Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. */ + clientId?: string; + /** Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. */ + objectId?: string; +} + +/** Describes the properties of a run command parameter. */ +export interface RunCommandInputParameter { + /** The run command parameter name. */ + name: string; + /** The run command parameter value. */ + value: string; +} + +/** The instance view of a machine run command. */ +export interface MachineRunCommandInstanceView { + /** Script execution status. */ + executionState?: ExecutionState; + /** Communicate script configuration errors or execution messages. */ + executionMessage?: string; + /** Exit code returned from script execution. */ + exitCode?: number; + /** Script output stream. */ + output?: string; + /** Script error stream. */ + error?: string; + /** Script start time. */ + startTime?: Date; + /** Script end time. */ + endTime?: Date; + /** The status information. */ + statuses?: ExtensionsResourceStatus[]; +} + +/** Instance view status. */ +export interface ExtensionsResourceStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: ExtensionsStatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; +} + +/** Describes the Run Commands List Result. */ +export interface MachineRunCommandsListResult { + /** The list of run commands */ + value?: MachineRunCommand[]; + /** The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. */ + nextLink?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The List license operation response. */ +export interface GatewaysListResult { + /** The list of Gateways. */ + value: Gateway[]; + /** The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. */ + nextLink?: string; +} + /** Describes the list of Azure Arc PrivateLinkScope resources. */ export interface HybridComputePrivateLinkScopeListResult { /** List of Azure Arc PrivateLinkScope definitions. */ @@ -1246,18 +1436,30 @@ export interface NetworkSecurityPerimeterConfigurationReconcileResult { location?: string; } -/** Instance view status. */ -export interface ExtensionsResourceStatus { - /** The status code. */ - code?: string; - /** The level code. */ - level?: ExtensionsStatusLevelTypes; - /** The short localizable label for the status. */ - displayStatus?: string; - /** The detailed status message, including for alerts and error messages. */ - message?: string; - /** The time of the status. */ - time?: Date; +/** List of HybridIdentityMetadata. */ +export interface HybridIdentityMetadataList { + /** Url to follow for getting next page of HybridIdentityMetadata. */ + nextLink?: string; + /** Array of HybridIdentityMetadata */ + value: HybridIdentityMetadata[]; +} + +/** Describes AgentVersions List. */ +export interface AgentVersionsList { + /** The list of available Agent Versions. */ + value?: AgentVersion[]; + /** The URI to fetch the next 10 available Agent Versions. */ + nextLink?: string; +} + +/** Describes properties of Agent Version. */ +export interface AgentVersion { + /** Represents the agent version. */ + agentVersion?: string; + /** Represents the download link of specific agent version. */ + downloadLink?: string; + /** Defines the os type. */ + osType?: string; } /** Public key information for client authentication */ @@ -1354,6 +1556,12 @@ export interface MachineExtensionUpdate extends ResourceUpdate { protectedSettings?: { [propertyName: string]: any }; } +/** Describes a License Update. */ +export interface GatewayUpdate extends ResourceUpdate { + /** Specifies the list of features that are enabled for this Gateway. */ + allowedFeatures?: string[]; +} + /** Describes a hybrid machine Update. */ export interface MachineUpdate extends ResourceUpdate { /** Identity for the resource. */ @@ -1374,6 +1582,9 @@ export interface MachineUpdate extends ResourceUpdate { privateLinkScopeResourceId?: string; } +/** Describes a Machine Extension Update. */ +export interface MachineRunCommandUpdate extends ResourceUpdate {} + /** Describes the properties of a License Profile ARM model. */ export interface LicenseProfileArmEsuPropertiesWithoutAssignedLicense extends LicenseProfileStorageModelEsuProperties { @@ -1397,6 +1608,14 @@ export interface LicenseProfileArmEsuPropertiesWithoutAssignedLicense /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends ResourceAutoGenerated {} +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResourceAutoGenerated extends ResourceAutoGenerated { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + /** An Azure Arc PrivateLinkScope definition. */ export interface HybridComputePrivateLinkScope extends PrivateLinkScopesResource { @@ -1450,6 +1669,21 @@ export interface Machine extends TrackedResource { readonly agentConfiguration?: AgentConfiguration; /** Statuses of dependent services that are reported back to ARM. */ serviceStatuses?: ServiceStatuses; + /** + * Information about the machine's hardware + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hardwareProfile?: HardwareProfile; + /** + * Information about the machine's storage + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageProfile?: StorageProfile; + /** + * Information about the machine's firmware + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firmwareProfile?: FirmwareProfile; /** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ cloudMetadata?: CloudMetadata; /** The info of the machine w.r.t Agent Upgrade */ @@ -1628,6 +1862,52 @@ export interface LicenseProfile extends TrackedResource { softwareAssuranceCustomer?: boolean; } +/** Describes a Run Command */ +export interface MachineRunCommand extends TrackedResource { + /** The source of the run command script. */ + source?: MachineRunCommandScriptSource; + /** The parameters used by the script. */ + parameters?: RunCommandInputParameter[]; + /** The parameters used by the script. */ + protectedParameters?: RunCommandInputParameter[]; + /** Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. */ + asyncExecution?: boolean; + /** Specifies the user account on the machine when executing the run command. */ + runAsUser?: string; + /** Specifies the user account password on the machine when executing the run command. */ + runAsPassword?: string; + /** The timeout in seconds to execute the run command. */ + timeoutInSeconds?: number; + /** Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. */ + outputBlobUri?: string; + /** Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. */ + errorBlobUri?: string; + /** User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + outputBlobManagedIdentity?: RunCommandManagedIdentity; + /** User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged */ + errorBlobManagedIdentity?: RunCommandManagedIdentity; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The machine run command instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: MachineRunCommandInstanceView; +} + +export interface Settings extends ProxyResourceAutoGenerated { + /** + * Azure resource tenant Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Associated Gateway Resource Id */ + gatewayResourceId?: string; +} + /** A private link resource */ export interface PrivateLinkResource extends ProxyResourceAutoGenerated { /** Resource properties. */ @@ -1640,6 +1920,38 @@ export interface PrivateEndpointConnection extends ProxyResourceAutoGenerated { properties?: PrivateEndpointConnectionProperties; } +/** Defines the HybridIdentityMetadata. */ +export interface HybridIdentityMetadata extends ProxyResourceAutoGenerated { + /** The unique identifier for the resource. */ + vmId?: string; + /** The Public Key. */ + publicKey?: string; + /** + * Identity for the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identity?: Identity; +} + +export interface NetworkConfiguration extends ProxyResourceAutoGenerated { + /** Resource location */ + location?: string; + /** + * Azure resource tenant Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Associated Network Configuration Scope Id (GUID) */ + networkConfigurationScopeId?: string; + /** Associated Network Configuration Scope Resource Id */ + networkConfigurationScopeResourceId?: string; + /** + * Public key information for client authentication + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly keyProperties?: KeyProperties; +} + /** Properties for the Machine ESU profile. */ export interface LicenseProfileMachineInstanceViewEsuProperties extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { @@ -1675,6 +1987,29 @@ export interface ExtensionValue extends ProxyResource { readonly publisher?: string; } +/** Describes an Arc Gateway. */ +export interface Gateway extends TrackedResourceAutoGenerated { + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * A unique, immutable, identifier for the Gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayId?: string; + /** The type of the Gateway resource. */ + gatewayType?: GatewayType; + /** + * The endpoint fqdn for the Gateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayEndpoint?: string; + /** Specifies the list of features that are enabled for this Gateway. */ + allowedFeatures?: string[]; +} + /** Defines headers for Machines_assessPatches operation. */ export interface MachinesAssessPatchesHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ @@ -1747,6 +2082,46 @@ export interface HybridComputeManagementClientUpgradeExtensionsHeaders { azureAsyncOperation?: string; } +/** Defines headers for MachineRunCommands_createOrUpdate operation. */ +export interface MachineRunCommandsCreateOrUpdateHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for MachineRunCommands_delete operation. */ +export interface MachineRunCommandsDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Gateways_createOrUpdate operation. */ +export interface GatewaysCreateOrUpdateHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Gateways_delete operation. */ +export interface GatewaysDeleteHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + /** Defines headers for PrivateLinkScopes_delete operation. */ export interface PrivateLinkScopesDeleteHeaders { /** The URL of the resource used to check the status of the asynchronous operation. */ @@ -2515,6 +2890,54 @@ export enum KnownVMGuestPatchRebootStatus { */ export type VMGuestPatchRebootStatus = string; +/** Known values of {@link ExecutionState} that the service accepts. */ +export enum KnownExecutionState { + /** Unknown */ + Unknown = "Unknown", + /** Pending */ + Pending = "Pending", + /** Running */ + Running = "Running", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** TimedOut */ + TimedOut = "TimedOut", + /** Canceled */ + Canceled = "Canceled", +} + +/** + * Defines values for ExecutionState. \ + * {@link KnownExecutionState} can be used interchangeably with ExecutionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Pending** \ + * **Running** \ + * **Failed** \ + * **Succeeded** \ + * **TimedOut** \ + * **Canceled** + */ +export type ExecutionState = string; + +/** Known values of {@link GatewayType} that the service accepts. */ +export enum KnownGatewayType { + /** Public */ + Public = "Public", +} + +/** + * Defines values for GatewayType. \ + * {@link KnownGatewayType} can be used interchangeably with GatewayType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Public** + */ +export type GatewayType = string; + /** Known values of {@link PublicNetworkAccessType} that the service accepts. */ export enum KnownPublicNetworkAccessType { /** Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. */ @@ -2918,6 +3341,141 @@ export interface NetworkProfileGetOptionalParams /** Contains response data for the get operation. */ export type NetworkProfileGetResponse = NetworkProfile; +/** Optional parameters. */ +export interface MachineRunCommandsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type MachineRunCommandsCreateOrUpdateResponse = MachineRunCommand; + +/** Optional parameters. */ +export interface MachineRunCommandsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type MachineRunCommandsDeleteResponse = MachineRunCommandsDeleteHeaders; + +/** Optional parameters. */ +export interface MachineRunCommandsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MachineRunCommandsGetResponse = MachineRunCommand; + +/** Optional parameters. */ +export interface MachineRunCommandsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} + +/** Contains response data for the list operation. */ +export type MachineRunCommandsListResponse = MachineRunCommandsListResult; + +/** Optional parameters. */ +export interface MachineRunCommandsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MachineRunCommandsListNextResponse = MachineRunCommandsListResult; + +/** Optional parameters. */ +export interface GatewaysCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type GatewaysCreateOrUpdateResponse = Gateway; + +/** Optional parameters. */ +export interface GatewaysUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type GatewaysUpdateResponse = Gateway; + +/** Optional parameters. */ +export interface GatewaysGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type GatewaysGetResponse = Gateway; + +/** Optional parameters. */ +export interface GatewaysDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type GatewaysDeleteResponse = GatewaysDeleteHeaders; + +/** Optional parameters. */ +export interface GatewaysListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type GatewaysListByResourceGroupResponse = GatewaysListResult; + +/** Optional parameters. */ +export interface GatewaysListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type GatewaysListBySubscriptionResponse = GatewaysListResult; + +/** Optional parameters. */ +export interface GatewaysListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type GatewaysListByResourceGroupNextResponse = GatewaysListResult; + +/** Optional parameters. */ +export interface GatewaysListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type GatewaysListBySubscriptionNextResponse = GatewaysListResult; + +/** Optional parameters. */ +export interface SettingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SettingsGetResponse = Settings; + +/** Optional parameters. */ +export interface SettingsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type SettingsUpdateResponse = Settings; + +/** Optional parameters. */ +export interface SettingsPatchOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the patch operation. */ +export type SettingsPatchResponse = Settings; + /** Optional parameters. */ export interface PrivateLinkScopesListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 851c60a1c50..536f96a10d0 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -507,6 +507,160 @@ export const ServiceStatus: coreClient.CompositeMapper = { }, }; +export const HardwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HardwareProfile", + modelProperties: { + totalPhysicalMemoryInBytes: { + serializedName: "totalPhysicalMemoryInBytes", + readOnly: true, + type: { + name: "Number", + }, + }, + numberOfCpuSockets: { + serializedName: "numberOfCpuSockets", + readOnly: true, + type: { + name: "Number", + }, + }, + processors: { + serializedName: "processors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Processor", + }, + }, + }, + }, + }, + }, +}; + +export const Processor: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Processor", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + numberOfCores: { + serializedName: "numberOfCores", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const StorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageProfile", + modelProperties: { + disks: { + serializedName: "disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Disk", + }, + }, + }, + }, + }, + }, +}; + +export const Disk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Disk", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String", + }, + }, + diskType: { + serializedName: "diskType", + type: { + name: "String", + }, + }, + generatedId: { + serializedName: "generatedId", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + maxSizeInBytes: { + serializedName: "maxSizeInBytes", + type: { + name: "Number", + }, + }, + usedSpaceInBytes: { + serializedName: "usedSpaceInBytes", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FirmwareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirmwareProfile", + modelProperties: { + serialNumber: { + serializedName: "serialNumber", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const CloudMetadata: coreClient.CompositeMapper = { type: { name: "Composite", @@ -999,6 +1153,24 @@ export const NetworkInterface: coreClient.CompositeMapper = { name: "Composite", className: "NetworkInterface", modelProperties: { + macAddress: { + serializedName: "macAddress", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, ipAddresses: { serializedName: "ipAddresses", type: { @@ -1852,6 +2024,314 @@ export const OperationValueDisplay: coreClient.CompositeMapper = { }, }; +export const MachineRunCommandScriptSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandScriptSource", + modelProperties: { + script: { + serializedName: "script", + type: { + name: "String", + }, + }, + scriptUri: { + serializedName: "scriptUri", + type: { + name: "String", + }, + }, + commandId: { + serializedName: "commandId", + type: { + name: "String", + }, + }, + scriptUriManagedIdentity: { + serializedName: "scriptUriManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + }, + }, + }, + }, +}; + +export const RunCommandManagedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String", + }, + }, + objectId: { + serializedName: "objectId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RunCommandInputParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandInputParameter", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MachineRunCommandInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandInstanceView", + modelProperties: { + executionState: { + serializedName: "executionState", + type: { + name: "String", + }, + }, + executionMessage: { + serializedName: "executionMessage", + type: { + name: "String", + }, + }, + exitCode: { + serializedName: "exitCode", + type: { + name: "Number", + }, + }, + output: { + serializedName: "output", + type: { + name: "String", + }, + }, + error: { + serializedName: "error", + type: { + name: "String", + }, + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime", + }, + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime", + }, + }, + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionsResourceStatus", + }, + }, + }, + }, + }, + }, +}; + +export const ExtensionsResourceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtensionsResourceStatus", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String", + }, + }, + level: { + serializedName: "level", + type: { + name: "Enum", + allowedValues: ["Info", "Warning", "Error"], + }, + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + type: { + name: "String", + }, + }, + time: { + serializedName: "time", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const MachineRunCommandsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineRunCommand", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + }, + }, + }, + }, +}; + +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const GatewaysListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewaysListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Gateway", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + export const HybridComputePrivateLinkScopeListResult: coreClient.CompositeMapper = { type: { @@ -2610,40 +3090,82 @@ export const NetworkSecurityPerimeterConfigurationReconcileResult: coreClient.Co }, }; -export const ExtensionsResourceStatus: coreClient.CompositeMapper = { +export const HybridIdentityMetadataList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtensionsResourceStatus", + className: "HybridIdentityMetadataList", modelProperties: { - code: { - serializedName: "code", + nextLink: { + serializedName: "nextLink", type: { name: "String", }, }, - level: { - serializedName: "level", + value: { + serializedName: "value", + required: true, type: { - name: "Enum", - allowedValues: ["Info", "Warning", "Error"], + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HybridIdentityMetadata", + }, + }, }, }, - displayStatus: { - serializedName: "displayStatus", + }, + }, +}; + +export const AgentVersionsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentVersionsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AgentVersion", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", type: { name: "String", }, }, - message: { - serializedName: "message", + }, + }, +}; + +export const AgentVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentVersion", + modelProperties: { + agentVersion: { + serializedName: "agentVersion", type: { name: "String", }, }, - time: { - serializedName: "time", + downloadLink: { + serializedName: "downloadLink", type: { - name: "DateTime", + name: "String", + }, + }, + osType: { + serializedName: "osType", + type: { + name: "String", }, }, }, @@ -2890,6 +3412,27 @@ export const MachineExtensionUpdate: coreClient.CompositeMapper = { }, }; +export const GatewayUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + allowedFeatures: { + serializedName: "properties.allowedFeatures", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + export const MachineUpdate: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2953,6 +3496,16 @@ export const MachineUpdate: coreClient.CompositeMapper = { }, }; +export const MachineRunCommandUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandUpdate", + modelProperties: { + ...ResourceUpdate.type.modelProperties, + }, + }, +}; + export const LicenseProfileArmEsuPropertiesWithoutAssignedLicense: coreClient.CompositeMapper = { type: { @@ -2995,6 +3548,30 @@ export const ProxyResource: coreClient.CompositeMapper = { }, }; +export const TrackedResourceAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResourceAutoGenerated", + modelProperties: { + ...ResourceAutoGenerated.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const HybridComputePrivateLinkScope: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3125,6 +3702,27 @@ export const Machine: coreClient.CompositeMapper = { className: "ServiceStatuses", }, }, + hardwareProfile: { + serializedName: "properties.hardwareProfile", + type: { + name: "Composite", + className: "HardwareProfile", + }, + }, + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "StorageProfile", + }, + }, + firmwareProfile: { + serializedName: "properties.firmwareProfile", + type: { + name: "Composite", + className: "FirmwareProfile", + }, + }, cloudMetadata: { serializedName: "properties.cloudMetadata", type: { @@ -3461,6 +4059,135 @@ export const LicenseProfile: coreClient.CompositeMapper = { }, }; +export const MachineRunCommand: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommand", + modelProperties: { + ...TrackedResource.type.modelProperties, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "MachineRunCommandScriptSource", + }, + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter", + }, + }, + }, + }, + protectedParameters: { + serializedName: "properties.protectedParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter", + }, + }, + }, + }, + asyncExecution: { + defaultValue: false, + serializedName: "properties.asyncExecution", + type: { + name: "Boolean", + }, + }, + runAsUser: { + serializedName: "properties.runAsUser", + type: { + name: "String", + }, + }, + runAsPassword: { + serializedName: "properties.runAsPassword", + type: { + name: "String", + }, + }, + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", + type: { + name: "Number", + }, + }, + outputBlobUri: { + serializedName: "properties.outputBlobUri", + type: { + name: "String", + }, + }, + errorBlobUri: { + serializedName: "properties.errorBlobUri", + type: { + name: "String", + }, + }, + outputBlobManagedIdentity: { + serializedName: "properties.outputBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + }, + }, + errorBlobManagedIdentity: { + serializedName: "properties.errorBlobManagedIdentity", + type: { + name: "Composite", + className: "RunCommandManagedIdentity", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "MachineRunCommandInstanceView", + }, + }, + }, + }, +}; + +export const Settings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Settings", + modelProperties: { + ...ProxyResourceAutoGenerated.type.modelProperties, + tenantId: { + serializedName: "properties.tenantId", + readOnly: true, + type: { + name: "String", + }, + }, + gatewayResourceId: { + serializedName: "properties.gatewayProperties.gatewayResourceId", + type: { + name: "String", + }, + }, + }, + }, +}; + export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3495,6 +4222,77 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { }, }; +export const HybridIdentityMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HybridIdentityMetadata", + modelProperties: { + ...ProxyResourceAutoGenerated.type.modelProperties, + vmId: { + serializedName: "properties.vmId", + type: { + name: "String", + }, + }, + publicKey: { + serializedName: "properties.publicKey", + type: { + name: "String", + }, + }, + identity: { + serializedName: "properties.identity", + type: { + name: "Composite", + className: "Identity", + }, + }, + }, + }, +}; + +export const NetworkConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkConfiguration", + modelProperties: { + ...ProxyResourceAutoGenerated.type.modelProperties, + location: { + serializedName: "properties.location", + type: { + name: "String", + }, + }, + tenantId: { + serializedName: "properties.tenantId", + readOnly: true, + type: { + name: "String", + }, + }, + networkConfigurationScopeId: { + serializedName: "properties.networkConfigurationScopeId", + type: { + name: "String", + }, + }, + networkConfigurationScopeResourceId: { + serializedName: "properties.networkConfigurationScopeResourceId", + type: { + name: "String", + }, + }, + keyProperties: { + serializedName: "properties.keyProperties", + type: { + name: "Composite", + className: "KeyProperties", + }, + }, + }, + }, +}; + export const LicenseProfileMachineInstanceViewEsuProperties: coreClient.CompositeMapper = { type: { @@ -3568,6 +4366,54 @@ export const ExtensionValue: coreClient.CompositeMapper = { }, }; +export const Gateway: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Gateway", + modelProperties: { + ...TrackedResourceAutoGenerated.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + gatewayId: { + serializedName: "properties.gatewayId", + readOnly: true, + type: { + name: "String", + }, + }, + gatewayType: { + serializedName: "properties.gatewayType", + type: { + name: "String", + }, + }, + gatewayEndpoint: { + serializedName: "properties.gatewayEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + allowedFeatures: { + serializedName: "properties.allowedFeatures", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + export const MachinesAssessPatchesHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3762,6 +4608,115 @@ export const HybridComputeManagementClientUpgradeExtensionsHeaders: coreClient.C }, }; +export const MachineRunCommandsCreateOrUpdateHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MachineRunCommandsCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const MachineRunCommandsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MachineRunCommandsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GatewaysCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewaysCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GatewaysDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewaysDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + export const PrivateLinkScopesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 8b97d87b591..4820870804e 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -20,6 +20,10 @@ import { MachineExtension as MachineExtensionMapper, MachineExtensionUpdate as MachineExtensionUpdateMapper, MachineExtensionUpgrade as MachineExtensionUpgradeMapper, + MachineRunCommand as MachineRunCommandMapper, + Gateway as GatewayMapper, + GatewayUpdate as GatewayUpdateMapper, + Settings as SettingsMapper, HybridComputePrivateLinkScope as HybridComputePrivateLinkScopeMapper, TagsResource as TagsResourceMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, @@ -69,7 +73,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-07-10", + defaultValue: "2024-07-31-preview", isConstant: true, serializedName: "api-version", type: { @@ -307,6 +311,110 @@ export const version: OperationURLParameter = { }, }; +export const runCommandProperties: OperationParameter = { + parameterPath: "runCommandProperties", + mapper: MachineRunCommandMapper, +}; + +export const runCommandName: OperationURLParameter = { + parameterPath: "runCommandName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+"), + }, + serializedName: "runCommandName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: GatewayMapper, +}; + +export const gatewayName: OperationURLParameter = { + parameterPath: "gatewayName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+"), + }, + serializedName: "gatewayName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: GatewayUpdateMapper, +}; + +export const baseProvider: OperationURLParameter = { + parameterPath: "baseProvider", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+"), + }, + serializedName: "baseProvider", + required: true, + type: { + name: "String", + }, + }, +}; + +export const baseResourceType: OperationURLParameter = { + parameterPath: "baseResourceType", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+"), + }, + serializedName: "baseResourceType", + required: true, + type: { + name: "String", + }, + }, +}; + +export const baseResourceName: OperationURLParameter = { + parameterPath: "baseResourceName", + mapper: { + constraints: { + Pattern: new RegExp("[a-zA-Z0-9-_\\.]+"), + }, + serializedName: "baseResourceName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const settingsResourceName: OperationURLParameter = { + parameterPath: "settingsResourceName", + mapper: { + constraints: { + Pattern: new RegExp("default"), + }, + serializedName: "settingsResourceName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: SettingsMapper, +}; + export const scopeName: OperationURLParameter = { parameterPath: "scopeName", mapper: { @@ -321,7 +429,7 @@ export const scopeName: OperationURLParameter = { }, }; -export const parameters4: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: HybridComputePrivateLinkScopeMapper, }; @@ -360,6 +468,7 @@ export const machineName2: OperationURLParameter = { parameterPath: "machineName", mapper: { constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-_\\.]{1,54}$"), MinLength: 1, }, serializedName: "machineName", @@ -392,7 +501,7 @@ export const privateEndpointConnectionName: OperationURLParameter = { }, }; -export const parameters5: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper, }; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/gateways.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/gateways.ts new file mode 100644 index 00000000000..0952484b6ff --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/gateways.ts @@ -0,0 +1,641 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Gateways } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Gateway, + GatewaysListByResourceGroupNextOptionalParams, + GatewaysListByResourceGroupOptionalParams, + GatewaysListByResourceGroupResponse, + GatewaysListBySubscriptionNextOptionalParams, + GatewaysListBySubscriptionOptionalParams, + GatewaysListBySubscriptionResponse, + GatewaysCreateOrUpdateOptionalParams, + GatewaysCreateOrUpdateResponse, + GatewayUpdate, + GatewaysUpdateOptionalParams, + GatewaysUpdateResponse, + GatewaysGetOptionalParams, + GatewaysGetResponse, + GatewaysDeleteOptionalParams, + GatewaysDeleteResponse, + GatewaysListByResourceGroupNextResponse, + GatewaysListBySubscriptionNextResponse, +} from "../models"; + +/// +/** Class containing Gateways operations. */ +export class GatewaysImpl implements Gateways { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class Gateways class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get all gateways of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: GatewaysListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: GatewaysListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: GatewaysListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: GatewaysListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * The operation to get all gateways of a non-Azure machine + * @param options The options parameters. + */ + public listBySubscription( + options?: GatewaysListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: GatewaysListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: GatewaysListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: GatewaysListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * The operation to create or update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + gatewayName: string, + parameters: Gateway, + options?: GatewaysCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GatewaysCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, gatewayName, parameters, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + GatewaysCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + gatewayName: string, + parameters: Gateway, + options?: GatewaysCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + gatewayName, + parameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * The operation to update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + gatewayName: string, + parameters: GatewayUpdate, + options?: GatewaysUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, gatewayName, parameters, options }, + updateOperationSpec, + ); + } + + /** + * Retrieves information about the view of a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, gatewayName, options }, + getOperationSpec, + ); + } + + /** + * The operation to delete a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GatewaysDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, gatewayName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + GatewaysDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + gatewayName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get all gateways of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: GatewaysListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * The operation to get all gateways of a non-Azure machine + * @param options The options parameters. + */ + private _listBySubscription( + options?: GatewaysListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: GatewaysListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: GatewaysListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Gateway, + }, + 201: { + bodyMapper: Mappers.Gateway, + }, + 202: { + bodyMapper: Mappers.Gateway, + }, + 204: { + bodyMapper: Mappers.Gateway, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.gatewayName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Gateway, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.gatewayName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Gateway, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.gatewayName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.GatewaysDeleteHeaders, + }, + 201: { + headersMapper: Mappers.GatewaysDeleteHeaders, + }, + 202: { + headersMapper: Mappers.GatewaysDeleteHeaders, + }, + 204: { + headersMapper: Mappers.GatewaysDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.gatewayName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewaysListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewaysListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewaysListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GatewaysListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index 82a706e6698..37d17a5cf6a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -13,6 +13,9 @@ export * from "./machineExtensions"; export * from "./extensionMetadata"; export * from "./operations"; export * from "./networkProfileOperations"; +export * from "./machineRunCommands"; +export * from "./gateways"; +export * from "./settingsOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index 866ee4d1bf7..606c2bb29e7 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts @@ -230,7 +230,7 @@ export class MachineExtensionsImpl implements MachineExtensions { } /** - * The operation to update the extension. + * The operation to create or update the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -310,7 +310,7 @@ export class MachineExtensionsImpl implements MachineExtensions { } /** - * The operation to update the extension. + * The operation to create or update the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts new file mode 100644 index 00000000000..78ea0d9e4ca --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineRunCommands.ts @@ -0,0 +1,511 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { MachineRunCommands } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + MachineRunCommand, + MachineRunCommandsListNextOptionalParams, + MachineRunCommandsListOptionalParams, + MachineRunCommandsListResponse, + MachineRunCommandsCreateOrUpdateOptionalParams, + MachineRunCommandsCreateOrUpdateResponse, + MachineRunCommandsDeleteOptionalParams, + MachineRunCommandsDeleteResponse, + MachineRunCommandsGetOptionalParams, + MachineRunCommandsGetResponse, + MachineRunCommandsListNextResponse, +} from "../models"; + +/// +/** Class containing MachineRunCommands operations. */ +export class MachineRunCommandsImpl implements MachineRunCommands { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class MachineRunCommands class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + machineName: string, + options?: MachineRunCommandsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, machineName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + machineName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + machineName: string, + options?: MachineRunCommandsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: MachineRunCommandsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, machineName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + machineName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + machineName: string, + options?: MachineRunCommandsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + machineName, + options, + )) { + yield* page; + } + } + + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + machineName, + runCommandName, + runCommandProperties, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + MachineRunCommandsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + machineName, + runCommandName, + runCommandProperties, + options, + ); + return poller.pollUntilDone(); + } + + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, machineName, runCommandName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + MachineRunCommandsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + machineName, + runCommandName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, runCommandName, options }, + getOperationSpec, + ); + } + + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + machineName: string, + options?: MachineRunCommandsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + machineName: string, + nextLink: string, + options?: MachineRunCommandsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, machineName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommand, + }, + 201: { + bodyMapper: Mappers.MachineRunCommand, + }, + 202: { + bodyMapper: Mappers.MachineRunCommand, + }, + 204: { + bodyMapper: Mappers.MachineRunCommand, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.runCommandProperties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.MachineRunCommandsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.MachineRunCommandsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.MachineRunCommandsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.MachineRunCommandsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommand, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + Parameters.runCommandName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommandsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.machineName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MachineRunCommandsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.machineName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts index 212af096839..d6f1089dd6d 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -427,7 +427,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts index a8364837762..b4b146df8ab 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -505,7 +505,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse, }, }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/settingsOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/settingsOperations.ts new file mode 100644 index 00000000000..6ab0fb86335 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/settingsOperations.ts @@ -0,0 +1,213 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SettingsOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClient } from "../hybridComputeManagementClient"; +import { + SettingsGetOptionalParams, + SettingsGetResponse, + Settings, + SettingsUpdateOptionalParams, + SettingsUpdateResponse, + SettingsPatchOptionalParams, + SettingsPatchResponse, +} from "../models"; + +/** Class containing SettingsOperations operations. */ +export class SettingsOperationsImpl implements SettingsOperations { + private readonly client: HybridComputeManagementClient; + + /** + * Initialize a new instance of the class SettingsOperations class. + * @param client Reference to the service client + */ + constructor(client: HybridComputeManagementClient) { + this.client = client; + } + + /** + * Returns the base Settings for the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + options?: SettingsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + options, + }, + getOperationSpec, + ); + } + + /** + * Updates the base Settings of the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details + * @param options The options parameters. + */ + update( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + parameters: Settings, + options?: SettingsUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + options, + }, + updateOperationSpec, + ); + } + + /** + * Update the base Settings of the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details + * @param options The options parameters. + */ + patch( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + parameters: Settings, + options?: SettingsPatchOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + baseProvider, + baseResourceType, + baseResourceName, + settingsResourceName, + parameters, + options, + }, + patchOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Settings, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.baseProvider, + Parameters.baseResourceType, + Parameters.baseResourceName, + Parameters.settingsResourceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Settings, + }, + 201: { + bodyMapper: Mappers.Settings, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.baseProvider, + Parameters.baseResourceType, + Parameters.baseResourceName, + Parameters.settingsResourceName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const patchOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Settings, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.baseProvider, + Parameters.baseResourceType, + Parameters.baseResourceName, + Parameters.settingsResourceName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/gateways.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/gateways.ts new file mode 100644 index 00000000000..fe6fd1da2a2 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/gateways.ts @@ -0,0 +1,127 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Gateway, + GatewaysListByResourceGroupOptionalParams, + GatewaysListBySubscriptionOptionalParams, + GatewaysCreateOrUpdateOptionalParams, + GatewaysCreateOrUpdateResponse, + GatewayUpdate, + GatewaysUpdateOptionalParams, + GatewaysUpdateResponse, + GatewaysGetOptionalParams, + GatewaysGetResponse, + GatewaysDeleteOptionalParams, + GatewaysDeleteResponse, +} from "../models"; + +/// +/** Interface representing a Gateways. */ +export interface Gateways { + /** + * The operation to get all gateways of a non-Azure machine + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: GatewaysListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * The operation to get all gateways of a non-Azure machine + * @param options The options parameters. + */ + listBySubscription( + options?: GatewaysListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + gatewayName: string, + parameters: Gateway, + options?: GatewaysCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GatewaysCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + gatewayName: string, + parameters: Gateway, + options?: GatewaysCreateOrUpdateOptionalParams, + ): Promise; + /** + * The operation to update a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + gatewayName: string, + parameters: GatewayUpdate, + options?: GatewaysUpdateOptionalParams, + ): Promise; + /** + * Retrieves information about the view of a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysGetOptionalParams, + ): Promise; + /** + * The operation to delete a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GatewaysDeleteResponse + > + >; + /** + * The operation to delete a gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + gatewayName: string, + options?: GatewaysDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts index 82a706e6698..37d17a5cf6a 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/index.ts @@ -13,6 +13,9 @@ export * from "./machineExtensions"; export * from "./extensionMetadata"; export * from "./operations"; export * from "./networkProfileOperations"; +export * from "./machineRunCommands"; +export * from "./gateways"; +export * from "./settingsOperations"; export * from "./privateLinkScopes"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts index 03bb7f196ec..4fe917df0bb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineExtensions.ts @@ -71,7 +71,7 @@ export interface MachineExtensions { options?: MachineExtensionsCreateOrUpdateOptionalParams, ): Promise; /** - * The operation to update the extension. + * The operation to create or update the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -91,7 +91,7 @@ export interface MachineExtensions { > >; /** - * The operation to update the extension. + * The operation to create or update the extension. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts new file mode 100644 index 00000000000..3420ebbfdca --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/machineRunCommands.ts @@ -0,0 +1,115 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + MachineRunCommand, + MachineRunCommandsListOptionalParams, + MachineRunCommandsCreateOrUpdateOptionalParams, + MachineRunCommandsCreateOrUpdateResponse, + MachineRunCommandsDeleteOptionalParams, + MachineRunCommandsDeleteResponse, + MachineRunCommandsGetOptionalParams, + MachineRunCommandsGetResponse, +} from "../models"; + +/// +/** Interface representing a MachineRunCommands. */ +export interface MachineRunCommands { + /** + * The operation to get all the run commands of a non-Azure machine. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + machineName: string, + options?: MachineRunCommandsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + machineName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param runCommandProperties Parameters supplied to the Create Run Command. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + machineName: string, + runCommandName: string, + runCommandProperties: MachineRunCommand, + options?: MachineRunCommandsCreateOrUpdateOptionalParams, + ): Promise; + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MachineRunCommandsDeleteResponse + > + >; + /** + * The operation to delete a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsDeleteOptionalParams, + ): Promise; + /** + * The operation to get a run command. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + machineName: string, + runCommandName: string, + options?: MachineRunCommandsGetOptionalParams, + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/settingsOperations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/settingsOperations.ts new file mode 100644 index 00000000000..e3573d89b76 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operationsInterfaces/settingsOperations.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + SettingsGetOptionalParams, + SettingsGetResponse, + Settings, + SettingsUpdateOptionalParams, + SettingsUpdateResponse, + SettingsPatchOptionalParams, + SettingsPatchResponse, +} from "../models"; + +/** Interface representing a SettingsOperations. */ +export interface SettingsOperations { + /** + * Returns the base Settings for the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + options?: SettingsGetOptionalParams, + ): Promise; + /** + * Updates the base Settings of the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details + * @param options The options parameters. + */ + update( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + parameters: Settings, + options?: SettingsUpdateOptionalParams, + ): Promise; + /** + * Update the base Settings of the target resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details + * @param options The options parameters. + */ + patch( + resourceGroupName: string, + baseProvider: string, + baseResourceType: string, + baseResourceName: string, + settingsResourceName: string, + parameters: Settings, + options?: SettingsPatchOptionalParams, + ): Promise; +} diff --git a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json index a87ba17ac14..284dd00b1dd 100644 --- a/sdk/hybridcompute/arm-hybridcompute/tsconfig.json +++ b/sdk/hybridcompute/arm-hybridcompute/tsconfig.json @@ -23,8 +23,8 @@ } }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", + "src/**/*.ts", + "test/**/*.ts", "samples-dev/**/*.ts" ], "exclude": [