[mgmt] devcenter release (#29308)
https://github.com/Azure/sdk-release-request/issues/5103
This commit is contained in:
Родитель
7291119826
Коммит
d67190a251
|
@ -13469,7 +13469,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-devcenter.tgz:
|
||||
resolution: {integrity: sha512-D3CQgL/68UIFhwq5n5/JZC0LfK/8Yy3IrfF8dWiTUd7cljQwHuoS4vN9EJvO4uP2M4GZ3KjCQJxmZaa0Rcokxg==, tarball: file:projects/arm-devcenter.tgz}
|
||||
resolution: {integrity: sha512-j/touibV664hGm+62LyDOUU6me3caDr+EOQCan+kgisnFBjLRqDBXrc/BE+hRwwNK/y+6n8/Q/nR5KNZuQmcoQ==, tarball: file:projects/arm-devcenter.tgz}
|
||||
name: '@rush-temp/arm-devcenter'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -13484,6 +13484,7 @@ packages:
|
|||
chai: 4.3.10
|
||||
cross-env: 7.0.3
|
||||
dotenv: 16.4.5
|
||||
esm: 3.2.25
|
||||
mkdirp: 3.0.1
|
||||
mocha: 10.4.0
|
||||
rimraf: 5.0.5
|
||||
|
|
|
@ -1,15 +1,187 @@
|
|||
# Release History
|
||||
|
||||
## 1.1.0 (2024-04-22)
|
||||
|
||||
**Features**
|
||||
|
||||
## 1.1.0-beta.2 (Unreleased)
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Added operation group CheckScopedNameAvailability
|
||||
- Added operation group EnvironmentDefinitions
|
||||
- Added operation group ProjectCatalogEnvironmentDefinitions
|
||||
- Added operation group ProjectCatalogs
|
||||
- Added operation Catalogs.beginConnect
|
||||
- Added operation Catalogs.beginConnectAndWait
|
||||
- Added operation Catalogs.getSyncErrorDetails
|
||||
- Added Interface AttachedNetworksDeleteHeaders
|
||||
- Added Interface CatalogConflictError
|
||||
- Added Interface CatalogErrorDetails
|
||||
- Added Interface CatalogResourceValidationErrorDetails
|
||||
- Added Interface CatalogsConnectHeaders
|
||||
- Added Interface CatalogsConnectOptionalParams
|
||||
- Added Interface CatalogsDeleteHeaders
|
||||
- Added Interface CatalogsGetSyncErrorDetailsOptionalParams
|
||||
- Added Interface CatalogsSyncHeaders
|
||||
- Added Interface CatalogsUpdateHeaders
|
||||
- Added Interface CatalogSyncError
|
||||
- Added Interface CheckScopedNameAvailabilityExecuteOptionalParams
|
||||
- Added Interface CheckScopedNameAvailabilityRequest
|
||||
- Added Interface CustomerManagedKeyEncryption
|
||||
- Added Interface CustomerManagedKeyEncryptionKeyIdentity
|
||||
- Added Interface DevBoxDefinitionsDeleteHeaders
|
||||
- Added Interface DevBoxDefinitionsUpdateHeaders
|
||||
- Added Interface DevCenterProjectCatalogSettings
|
||||
- Added Interface DevCenterProperties
|
||||
- Added Interface DevCentersDeleteHeaders
|
||||
- Added Interface DevCentersUpdateHeaders
|
||||
- Added Interface DevCenterUpdateProperties
|
||||
- Added Interface Encryption
|
||||
- Added Interface EnvironmentDefinition
|
||||
- Added Interface EnvironmentDefinitionListResult
|
||||
- Added Interface EnvironmentDefinitionParameter
|
||||
- Added Interface EnvironmentDefinitionsGetByProjectCatalogOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsGetErrorDetailsOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsGetOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsListByCatalogNextOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsListByCatalogOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsListByProjectCatalogNextOptionalParams
|
||||
- Added Interface EnvironmentDefinitionsListByProjectCatalogOptionalParams
|
||||
- Added Interface EnvironmentTypeProperties
|
||||
- Added Interface EnvironmentTypeUpdateProperties
|
||||
- Added Interface GalleriesDeleteHeaders
|
||||
- Added Interface NetworkConnectionsDeleteHeaders
|
||||
- Added Interface NetworkConnectionsRunHealthChecksHeaders
|
||||
- Added Interface NetworkConnectionsUpdateHeaders
|
||||
- Added Interface OperationStatusesGetHeaders
|
||||
- Added Interface PoolsDeleteHeaders
|
||||
- Added Interface PoolsRunHealthChecksHeaders
|
||||
- Added Interface PoolsUpdateHeaders
|
||||
- Added Interface ProjectCatalogEnvironmentDefinitionsGetErrorDetailsOptionalParams
|
||||
- Added Interface ProjectCatalogsConnectHeaders
|
||||
- Added Interface ProjectCatalogsConnectOptionalParams
|
||||
- Added Interface ProjectCatalogsCreateOrUpdateOptionalParams
|
||||
- Added Interface ProjectCatalogsDeleteHeaders
|
||||
- Added Interface ProjectCatalogsDeleteOptionalParams
|
||||
- Added Interface ProjectCatalogSettings
|
||||
- Added Interface ProjectCatalogsGetOptionalParams
|
||||
- Added Interface ProjectCatalogsGetSyncErrorDetailsOptionalParams
|
||||
- Added Interface ProjectCatalogsListNextOptionalParams
|
||||
- Added Interface ProjectCatalogsListOptionalParams
|
||||
- Added Interface ProjectCatalogsPatchHeaders
|
||||
- Added Interface ProjectCatalogsPatchOptionalParams
|
||||
- Added Interface ProjectCatalogsSyncHeaders
|
||||
- Added Interface ProjectCatalogsSyncOptionalParams
|
||||
- Added Interface ProjectsDeleteHeaders
|
||||
- Added Interface ProjectsUpdateHeaders
|
||||
- Added Interface SchedulesDeleteHeaders
|
||||
- Added Interface SchedulesUpdateHeaders
|
||||
- Added Interface SyncErrorDetails
|
||||
- Added Interface SyncStats
|
||||
- Added Type Alias AttachedNetworksDeleteResponse
|
||||
- Added Type Alias CatalogConnectionState
|
||||
- Added Type Alias CatalogItemSyncEnableStatus
|
||||
- Added Type Alias CatalogItemType
|
||||
- Added Type Alias CatalogResourceValidationStatus
|
||||
- Added Type Alias CatalogsConnectResponse
|
||||
- Added Type Alias CatalogsDeleteResponse
|
||||
- Added Type Alias CatalogsGetSyncErrorDetailsResponse
|
||||
- Added Type Alias CatalogsSyncResponse
|
||||
- Added Type Alias CatalogSyncType
|
||||
- Added Type Alias CheckScopedNameAvailabilityExecuteResponse
|
||||
- Added Type Alias DevBoxDefinitionsDeleteResponse
|
||||
- Added Type Alias DevCentersDeleteResponse
|
||||
- Added Type Alias EnvironmentDefinitionsGetByProjectCatalogResponse
|
||||
- Added Type Alias EnvironmentDefinitionsGetErrorDetailsResponse
|
||||
- Added Type Alias EnvironmentDefinitionsGetResponse
|
||||
- Added Type Alias EnvironmentDefinitionsListByCatalogNextResponse
|
||||
- Added Type Alias EnvironmentDefinitionsListByCatalogResponse
|
||||
- Added Type Alias EnvironmentDefinitionsListByProjectCatalogNextResponse
|
||||
- Added Type Alias EnvironmentDefinitionsListByProjectCatalogResponse
|
||||
- Added Type Alias GalleriesDeleteResponse
|
||||
- Added Type Alias IdentityType
|
||||
- Added Type Alias NetworkConnectionsDeleteResponse
|
||||
- Added Type Alias NetworkConnectionsRunHealthChecksResponse
|
||||
- Added Type Alias ParameterType
|
||||
- Added Type Alias PoolsDeleteResponse
|
||||
- Added Type Alias PoolsRunHealthChecksResponse
|
||||
- Added Type Alias ProjectCatalogEnvironmentDefinitionsGetErrorDetailsResponse
|
||||
- Added Type Alias ProjectCatalogsConnectResponse
|
||||
- Added Type Alias ProjectCatalogsCreateOrUpdateResponse
|
||||
- Added Type Alias ProjectCatalogsDeleteResponse
|
||||
- Added Type Alias ProjectCatalogsGetResponse
|
||||
- Added Type Alias ProjectCatalogsGetSyncErrorDetailsResponse
|
||||
- Added Type Alias ProjectCatalogsListNextResponse
|
||||
- Added Type Alias ProjectCatalogsListResponse
|
||||
- Added Type Alias ProjectCatalogsPatchResponse
|
||||
- Added Type Alias ProjectCatalogsSyncResponse
|
||||
- Added Type Alias ProjectsDeleteResponse
|
||||
- Added Type Alias SchedulesDeleteResponse
|
||||
- Added Type Alias SingleSignOnStatus
|
||||
- Added Type Alias VirtualNetworkType
|
||||
- Interface AllowedEnvironmentType has a new optional parameter displayName
|
||||
- Interface Catalog has a new optional parameter connectionState
|
||||
- Interface Catalog has a new optional parameter lastConnectionTime
|
||||
- Interface Catalog has a new optional parameter lastSyncStats
|
||||
- Interface Catalog has a new optional parameter syncType
|
||||
- Interface Catalog has a new optional parameter tags
|
||||
- Interface CatalogProperties has a new optional parameter connectionState
|
||||
- Interface CatalogProperties has a new optional parameter lastConnectionTime
|
||||
- Interface CatalogProperties has a new optional parameter lastSyncStats
|
||||
- Interface CatalogUpdate has a new optional parameter syncType
|
||||
- Interface CatalogUpdateProperties has a new optional parameter syncType
|
||||
- Interface CatalogUpdateProperties has a new optional parameter tags
|
||||
- Interface DevBoxDefinition has a new optional parameter validationStatus
|
||||
- Interface DevBoxDefinitionProperties has a new optional parameter validationStatus
|
||||
- Interface DevCenter has a new optional parameter displayName
|
||||
- Interface DevCenter has a new optional parameter encryption
|
||||
- Interface DevCenter has a new optional parameter projectCatalogSettings
|
||||
- Interface DevCenterUpdate has a new optional parameter displayName
|
||||
- Interface DevCenterUpdate has a new optional parameter encryption
|
||||
- Interface DevCenterUpdate has a new optional parameter projectCatalogSettings
|
||||
- Interface EnvironmentType has a new optional parameter displayName
|
||||
- Interface EnvironmentTypeUpdate has a new optional parameter displayName
|
||||
- Interface OperationStatusResult has a new optional parameter resourceId
|
||||
- Interface Pool has a new optional parameter devBoxCount
|
||||
- Interface Pool has a new optional parameter displayName
|
||||
- Interface Pool has a new optional parameter managedVirtualNetworkRegions
|
||||
- Interface Pool has a new optional parameter singleSignOnStatus
|
||||
- Interface Pool has a new optional parameter virtualNetworkType
|
||||
- Interface PoolProperties has a new optional parameter devBoxCount
|
||||
- Interface PoolUpdate has a new optional parameter displayName
|
||||
- Interface PoolUpdate has a new optional parameter managedVirtualNetworkRegions
|
||||
- Interface PoolUpdate has a new optional parameter singleSignOnStatus
|
||||
- Interface PoolUpdate has a new optional parameter virtualNetworkType
|
||||
- Interface PoolUpdateProperties has a new optional parameter displayName
|
||||
- Interface PoolUpdateProperties has a new optional parameter managedVirtualNetworkRegions
|
||||
- Interface PoolUpdateProperties has a new optional parameter singleSignOnStatus
|
||||
- Interface PoolUpdateProperties has a new optional parameter virtualNetworkType
|
||||
- Interface Project has a new optional parameter catalogSettings
|
||||
- Interface Project has a new optional parameter displayName
|
||||
- Interface Project has a new optional parameter identity
|
||||
- Interface ProjectEnvironmentType has a new optional parameter displayName
|
||||
- Interface ProjectEnvironmentType has a new optional parameter environmentCount
|
||||
- Interface ProjectEnvironmentTypeProperties has a new optional parameter environmentCount
|
||||
- Interface ProjectEnvironmentTypeUpdate has a new optional parameter displayName
|
||||
- Interface ProjectEnvironmentTypeUpdateProperties has a new optional parameter displayName
|
||||
- Interface ProjectUpdate has a new optional parameter catalogSettings
|
||||
- Interface ProjectUpdate has a new optional parameter displayName
|
||||
- Interface ProjectUpdate has a new optional parameter identity
|
||||
- Interface ProjectUpdateProperties has a new optional parameter catalogSettings
|
||||
- Interface ProjectUpdateProperties has a new optional parameter displayName
|
||||
- Interface Schedule has a new optional parameter location
|
||||
- Interface Schedule has a new optional parameter tags
|
||||
- Interface ScheduleUpdate has a new optional parameter location
|
||||
- Interface ScheduleUpdate has a new optional parameter tags
|
||||
- Interface Usage has a new optional parameter id
|
||||
- Added Enum KnownCatalogConnectionState
|
||||
- Added Enum KnownCatalogItemSyncEnableStatus
|
||||
- Added Enum KnownCatalogItemType
|
||||
- Added Enum KnownCatalogResourceValidationStatus
|
||||
- Added Enum KnownCatalogSyncType
|
||||
- Added Enum KnownIdentityType
|
||||
- Added Enum KnownParameterType
|
||||
- Added Enum KnownSingleSignOnStatus
|
||||
- Added Enum KnownVirtualNetworkType
|
||||
|
||||
|
||||
## 1.1.0-beta.1 (2023-10-17)
|
||||
|
||||
**Features**
|
||||
|
@ -122,8 +294,8 @@
|
|||
- Added Enum KnownParameterType
|
||||
- Added Enum KnownSingleSignOnStatus
|
||||
- Added Enum KnownVirtualNetworkType
|
||||
|
||||
|
||||
|
||||
|
||||
## 1.0.0 (2023-05-12)
|
||||
|
||||
The package of @azure/arm-devcenter is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 Microsoft
|
||||
Copyright (c) 2024 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -6,7 +6,7 @@ DevCenter Management API
|
|||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devcenter/arm-devcenter) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-devcenter) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-devcenter?view=azure-node-preview) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-devcenter) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"commit": "0a25ea9680cf080b7d34e8c5f35f564425c6b1f7",
|
||||
"commit": "106483d9f698ac3b6c0d481ab0c5fab14152e21f",
|
||||
"readme": "specification/devcenter/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\\devcenter\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --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\\devcenter\\resource-manager\\readme.md --use=@autorest/typescript@6.0.20 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.2",
|
||||
"use": "@autorest/typescript@6.0.9"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.5",
|
||||
"use": "@autorest/typescript@6.0.20"
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for DevCenterClient.",
|
||||
"version": "1.1.0-beta.2",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -12,8 +12,8 @@
|
|||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.12.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-rest-pipeline": "^1.14.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -34,17 +34,18 @@
|
|||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^5.0.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/identity": "^4.0.1",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"@azure-tools/test-credential": "^1.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"esm": "^3.2.18",
|
||||
"@types/chai": "^4.2.8",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"@types/node": "^18.0.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@types/mocha": "^10.0.0"
|
||||
"ts-node": "^10.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -77,7 +78,6 @@
|
|||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"lint": "echo skipped",
|
||||
"audit": "echo skipped",
|
||||
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
AttachedNetworkConnection,
|
||||
DevCenterClient
|
||||
DevCenterClient,
|
||||
} from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates an attached NetworkConnection.
|
||||
*
|
||||
* @summary Creates or updates an attached NetworkConnection.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_Create.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_Create.json
|
||||
*/
|
||||
async function attachedNetworksCreate() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function attachedNetworksCreate() {
|
|||
const attachedNetworkConnectionName = "network-uswest3";
|
||||
const body: AttachedNetworkConnection = {
|
||||
networkConnectionId:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -40,7 +40,7 @@ async function attachedNetworksCreate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
attachedNetworkConnectionName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Un-attach a NetworkConnection.
|
||||
*
|
||||
* @summary Un-attach a NetworkConnection.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_Delete.json
|
||||
*/
|
||||
async function attachedNetworksDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function attachedNetworksDelete() {
|
|||
const result = await client.attachedNetworks.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
attachedNetworkConnectionName
|
||||
attachedNetworkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an attached NetworkConnection.
|
||||
*
|
||||
* @summary Gets an attached NetworkConnection.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_GetByDevCenter.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_GetByDevCenter.json
|
||||
*/
|
||||
async function attachedNetworksGetByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function attachedNetworksGetByDevCenter() {
|
|||
const result = await client.attachedNetworks.getByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
attachedNetworkConnectionName
|
||||
attachedNetworkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an attached NetworkConnection.
|
||||
*
|
||||
* @summary Gets an attached NetworkConnection.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_GetByProject.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_GetByProject.json
|
||||
*/
|
||||
async function attachedNetworksGetByProject() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function attachedNetworksGetByProject() {
|
|||
const result = await client.attachedNetworks.getByProject(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
attachedNetworkConnectionName
|
||||
attachedNetworkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists the attached NetworkConnections for a DevCenter.
|
||||
*
|
||||
* @summary Lists the attached NetworkConnections for a DevCenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_ListByDevCenter.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_ListByDevCenter.json
|
||||
*/
|
||||
async function attachedNetworksListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function attachedNetworksListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.attachedNetworks.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists the attached NetworkConnections for a Project.
|
||||
*
|
||||
* @summary Lists the attached NetworkConnections for a Project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/AttachedNetworks_ListByProject.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_ListByProject.json
|
||||
*/
|
||||
async function attachedNetworksListByProject() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function attachedNetworksListByProject() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.attachedNetworks.listByProject(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Connects a catalog to enable syncing.
|
||||
*
|
||||
* @summary Connects a catalog to enable syncing.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_Connect.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Connect.json
|
||||
*/
|
||||
async function catalogsConnect() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function catalogsConnect() {
|
|||
const result = await client.catalogs.beginConnectAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a catalog.
|
||||
*
|
||||
* @summary Creates or updates a catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_CreateAdo.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_CreateAdo.json
|
||||
*/
|
||||
async function catalogsCreateOrUpdateAdo() {
|
||||
const subscriptionId =
|
||||
|
@ -33,10 +33,9 @@ async function catalogsCreateOrUpdateAdo() {
|
|||
branch: "main",
|
||||
secretIdentifier:
|
||||
"https://contosokv.vault.azure.net/secrets/CentralRepoPat",
|
||||
uri:
|
||||
"https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"
|
||||
uri: "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso",
|
||||
},
|
||||
syncType: "Scheduled"
|
||||
syncType: "Scheduled",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -44,7 +43,7 @@ async function catalogsCreateOrUpdateAdo() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -53,7 +52,7 @@ async function catalogsCreateOrUpdateAdo() {
|
|||
* This sample demonstrates how to Creates or updates a catalog.
|
||||
*
|
||||
* @summary Creates or updates a catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_CreateGitHub.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_CreateGitHub.json
|
||||
*/
|
||||
async function catalogsCreateOrUpdateGitHub() {
|
||||
const subscriptionId =
|
||||
|
@ -68,9 +67,9 @@ async function catalogsCreateOrUpdateGitHub() {
|
|||
branch: "main",
|
||||
secretIdentifier:
|
||||
"https://contosokv.vault.azure.net/secrets/CentralRepoPat",
|
||||
uri: "https://github.com/Contoso/centralrepo-fake.git"
|
||||
uri: "https://github.com/Contoso/centralrepo-fake.git",
|
||||
},
|
||||
syncType: "Manual"
|
||||
syncType: "Manual",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -78,7 +77,7 @@ async function catalogsCreateOrUpdateGitHub() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a catalog resource.
|
||||
*
|
||||
* @summary Deletes a catalog resource.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Delete.json
|
||||
*/
|
||||
async function catalogsDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function catalogsDelete() {
|
|||
const result = await client.catalogs.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a catalog
|
||||
*
|
||||
* @summary Gets a catalog
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Get.json
|
||||
*/
|
||||
async function catalogsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function catalogsGet() {
|
|||
const result = await client.catalogs.get(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets catalog synchronization error details
|
||||
*
|
||||
* @summary Gets catalog synchronization error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_GetSyncErrorDetails.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_GetSyncErrorDetails.json
|
||||
*/
|
||||
async function catalogsGetSyncErrorDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function catalogsGetSyncErrorDetails() {
|
|||
const result = await client.catalogs.getSyncErrorDetails(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists catalogs for a devcenter.
|
||||
*
|
||||
* @summary Lists catalogs for a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_List.json
|
||||
*/
|
||||
async function catalogsListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function catalogsListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.catalogs.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Syncs templates for a template source.
|
||||
*
|
||||
* @summary Syncs templates for a template source.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_Sync.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Sync.json
|
||||
*/
|
||||
async function catalogsSync() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function catalogsSync() {
|
|||
const result = await client.catalogs.beginSyncAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a catalog.
|
||||
*
|
||||
* @summary Partially updates a catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Catalogs_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Patch.json
|
||||
*/
|
||||
async function catalogsUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function catalogsUpdate() {
|
|||
const catalogName = "CentralCatalog";
|
||||
const body: CatalogUpdate = {
|
||||
gitHub: { path: "/environments" },
|
||||
syncType: "Scheduled"
|
||||
syncType: "Scheduled",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -37,7 +37,7 @@ async function catalogsUpdate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
CheckNameAvailabilityRequest,
|
||||
DevCenterClient
|
||||
DevCenterClient,
|
||||
} from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Check the availability of name for resource
|
||||
*
|
||||
* @summary Check the availability of name for resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckNameAvailability.json
|
||||
*/
|
||||
async function nameAvailability() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function nameAvailability() {
|
|||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const nameAvailabilityRequest: CheckNameAvailabilityRequest = {
|
||||
name: "name1",
|
||||
type: "Microsoft.DevCenter/devcenters"
|
||||
type: "Microsoft.DevCenter/devcenters",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.checkNameAvailability.execute(
|
||||
nameAvailabilityRequest
|
||||
nameAvailabilityRequest,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code 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 {
|
||||
CheckScopedNameAvailabilityRequest,
|
||||
DevCenterClient,
|
||||
} from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check the availability of name for resource
|
||||
*
|
||||
* @summary Check the availability of name for resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckScopedNameAvailability_DevCenterCatalog.json
|
||||
*/
|
||||
async function devcenterCatalogNameAvailability() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const nameAvailabilityRequest: CheckScopedNameAvailabilityRequest = {
|
||||
name: "name1",
|
||||
type: "Microsoft.DevCenter/devcenters/catalogs",
|
||||
scope:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.checkScopedNameAvailability.execute(
|
||||
nameAvailabilityRequest,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check the availability of name for resource
|
||||
*
|
||||
* @summary Check the availability of name for resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckScopedNameAvailability_ProjectCatalog.json
|
||||
*/
|
||||
async function projectCatalogNameAvailability() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const nameAvailabilityRequest: CheckScopedNameAvailabilityRequest = {
|
||||
name: "name1",
|
||||
type: "Microsoft.DevCenter/projects/catalogs",
|
||||
scope:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.checkScopedNameAvailability.execute(
|
||||
nameAvailabilityRequest,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
devcenterCatalogNameAvailability();
|
||||
projectCatalogNameAvailability();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a Dev Box definition.
|
||||
*
|
||||
* @summary Creates or updates a Dev Box definition.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_Create.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Create.json
|
||||
*/
|
||||
async function devBoxDefinitionsCreate() {
|
||||
const subscriptionId =
|
||||
|
@ -30,11 +30,10 @@ async function devBoxDefinitionsCreate() {
|
|||
const body: DevBoxDefinition = {
|
||||
hibernateSupport: "Enabled",
|
||||
imageReference: {
|
||||
id:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"
|
||||
id: "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0",
|
||||
},
|
||||
location: "centralus",
|
||||
sku: { name: "Preview" }
|
||||
sku: { name: "Preview" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -42,7 +41,7 @@ async function devBoxDefinitionsCreate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
devBoxDefinitionName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a Dev Box definition
|
||||
*
|
||||
* @summary Deletes a Dev Box definition
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Delete.json
|
||||
*/
|
||||
async function devBoxDefinitionsDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function devBoxDefinitionsDelete() {
|
|||
const result = await client.devBoxDefinitions.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
devBoxDefinitionName
|
||||
devBoxDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a Dev Box definition configured for a project
|
||||
*
|
||||
* @summary Gets a Dev Box definition configured for a project
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_GetByProject.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_GetByProject.json
|
||||
*/
|
||||
async function devBoxDefinitionsGetByProject() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function devBoxDefinitionsGetByProject() {
|
|||
const result = await client.devBoxDefinitions.getByProject(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
devBoxDefinitionName
|
||||
devBoxDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a Dev Box definition
|
||||
*
|
||||
* @summary Gets a Dev Box definition
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Get.json
|
||||
*/
|
||||
async function devBoxDefinitionsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function devBoxDefinitionsGet() {
|
|||
const result = await client.devBoxDefinitions.get(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
devBoxDefinitionName
|
||||
devBoxDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List Dev Box definitions for a devcenter.
|
||||
*
|
||||
* @summary List Dev Box definitions for a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_ListByDevCenter.json
|
||||
*/
|
||||
async function devBoxDefinitionsListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function devBoxDefinitionsListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.devBoxDefinitions.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List Dev Box definitions configured for a project.
|
||||
*
|
||||
* @summary List Dev Box definitions configured for a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_ListByProject.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_ListByProject.json
|
||||
*/
|
||||
async function devBoxDefinitionsListByProject() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function devBoxDefinitionsListByProject() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.devBoxDefinitions.listByProject(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a Dev Box definition.
|
||||
*
|
||||
* @summary Partially updates a Dev Box definition.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevBoxDefinitions_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Patch.json
|
||||
*/
|
||||
async function devBoxDefinitionsPatch() {
|
||||
const subscriptionId =
|
||||
|
@ -29,9 +29,8 @@ async function devBoxDefinitionsPatch() {
|
|||
const devBoxDefinitionName = "WebDevBox";
|
||||
const body: DevBoxDefinitionUpdate = {
|
||||
imageReference: {
|
||||
id:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"
|
||||
}
|
||||
id: "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -39,7 +38,7 @@ async function devBoxDefinitionsPatch() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
devBoxDefinitionName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a devcenter resource
|
||||
*
|
||||
* @summary Creates or updates a devcenter resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_Create.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Create.json
|
||||
*/
|
||||
async function devCentersCreate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,14 +29,14 @@ async function devCentersCreate() {
|
|||
const body: DevCenter = {
|
||||
displayName: "ContosoDevCenter",
|
||||
location: "centralus",
|
||||
tags: { costCode: "12345" }
|
||||
tags: { costCode: "12345" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.devCenters.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ async function devCentersCreate() {
|
|||
* This sample demonstrates how to Creates or updates a devcenter resource
|
||||
*
|
||||
* @summary Creates or updates a devcenter resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_CreateWithEncryption.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_CreateWithEncryption.json
|
||||
*/
|
||||
async function devCentersCreateWithEncryption() {
|
||||
const subscriptionId =
|
||||
|
@ -60,27 +60,28 @@ async function devCentersCreateWithEncryption() {
|
|||
keyEncryptionKeyIdentity: {
|
||||
identityType: "userAssignedIdentity",
|
||||
userAssignedIdentityResourceId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1"
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1",
|
||||
},
|
||||
keyEncryptionKeyUrl:
|
||||
"https://contosovault.vault.azure.net/keys/contosokek"
|
||||
}
|
||||
"https://contosovault.vault.azure.net/keys/contosokek",
|
||||
},
|
||||
},
|
||||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/00000000000000000000000000000000/resourceGroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1": {}
|
||||
}
|
||||
"/subscriptions/00000000000000000000000000000000/resourceGroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1":
|
||||
{},
|
||||
},
|
||||
},
|
||||
location: "centralus",
|
||||
tags: { costCode: "12345" }
|
||||
tags: { costCode: "12345" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.devCenters.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -89,7 +90,7 @@ async function devCentersCreateWithEncryption() {
|
|||
* This sample demonstrates how to Creates or updates a devcenter resource
|
||||
*
|
||||
* @summary Creates or updates a devcenter resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_CreateWithUserIdentity.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_CreateWithUserIdentity.json
|
||||
*/
|
||||
async function devCentersCreateWithUserIdentity() {
|
||||
const subscriptionId =
|
||||
|
@ -102,18 +103,19 @@ async function devCentersCreateWithUserIdentity() {
|
|||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/00000000000000000000000000000000/resourceGroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1": {}
|
||||
}
|
||||
"/subscriptions/00000000000000000000000000000000/resourceGroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1":
|
||||
{},
|
||||
},
|
||||
},
|
||||
location: "centralus",
|
||||
tags: { costCode: "12345" }
|
||||
tags: { costCode: "12345" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.devCenters.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a devcenter
|
||||
*
|
||||
* @summary Deletes a devcenter
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Delete.json
|
||||
*/
|
||||
async function devCentersDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function devCentersDelete() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.devCenters.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a devcenter.
|
||||
*
|
||||
* @summary Gets a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Get.json
|
||||
*/
|
||||
async function devCentersGet() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all devcenters in a resource group.
|
||||
*
|
||||
* @summary Lists all devcenters in a resource group.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_ListByResourceGroup.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_ListByResourceGroup.json
|
||||
*/
|
||||
async function devCentersListByResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function devCentersListByResourceGroup() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.devCenters.listByResourceGroup(
|
||||
resourceGroupName
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all devcenters in a subscription.
|
||||
*
|
||||
* @summary Lists all devcenters in a subscription.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_ListBySubscription.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_ListBySubscription.json
|
||||
*/
|
||||
async function devCentersListBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a devcenter.
|
||||
*
|
||||
* @summary Partially updates a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/DevCenters_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Patch.json
|
||||
*/
|
||||
async function devCentersUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function devCentersUpdate() {
|
|||
const result = await client.devCenters.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -15,32 +15,32 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets Catalog Devbox Definition error details
|
||||
* This sample demonstrates how to Gets an environment definition from the catalog.
|
||||
*
|
||||
* @summary Gets Catalog Devbox Definition error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CatalogDevBoxDefinitions_GetErrorDetails.json
|
||||
* @summary Gets an environment definition from the catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_GetByProjectCatalog.json
|
||||
*/
|
||||
async function catalogDevBoxDefinitionsGetErrorDetails() {
|
||||
async function environmentDefinitionsGetByProjectCatalog() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const catalogName = "CentralCatalog";
|
||||
const devBoxDefinitionName = "WebDevBox";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "myCatalog";
|
||||
const environmentDefinitionName = "myEnvironmentDefinition";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.catalogDevBoxDefinitions.getErrorDetails(
|
||||
const result = await client.environmentDefinitions.getByProjectCatalog(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
projectName,
|
||||
catalogName,
|
||||
devBoxDefinitionName
|
||||
environmentDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
catalogDevBoxDefinitionsGetErrorDetails();
|
||||
environmentDefinitionsGetByProjectCatalog();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets Environment Definition error details
|
||||
*
|
||||
* @summary Gets Environment Definition error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentDefinitions_GetErrorDetails.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_GetErrorDetails.json
|
||||
*/
|
||||
async function environmentDefinitionsGetErrorDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function environmentDefinitionsGetErrorDetails() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName,
|
||||
environmentDefinitionName
|
||||
environmentDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an environment definition from the catalog.
|
||||
*
|
||||
* @summary Gets an environment definition from the catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentDefinitions_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_Get.json
|
||||
*/
|
||||
async function environmentDefinitionsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function environmentDefinitionsGet() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName,
|
||||
environmentDefinitionName
|
||||
environmentDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List environment definitions in the catalog.
|
||||
*
|
||||
* @summary List environment definitions in the catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentDefinitions_ListByCatalog.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_ListByCatalog.json
|
||||
*/
|
||||
async function environmentDefinitionsListByCatalog() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function environmentDefinitionsListByCatalog() {
|
|||
for await (let item of client.environmentDefinitions.listByCatalog(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
catalogName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -15,25 +15,25 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Dev Box definitions in the catalog.
|
||||
* This sample demonstrates how to Lists the environment definitions in this project catalog.
|
||||
*
|
||||
* @summary List Dev Box definitions in the catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CatalogDevBoxDefinitions_ListByCatalog.json
|
||||
* @summary Lists the environment definitions in this project catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_ListByProjectCatalog.json
|
||||
*/
|
||||
async function catalogDevBoxDefinitionsListByCatalog() {
|
||||
async function environmentDefinitionsListByProjectCatalog() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const catalogName = "CentralCatalog";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "myCatalog";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.catalogDevBoxDefinitions.listByCatalog(
|
||||
for await (let item of client.environmentDefinitions.listByProjectCatalog(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
projectName,
|
||||
catalogName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ async function catalogDevBoxDefinitionsListByCatalog() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
catalogDevBoxDefinitionsListByCatalog();
|
||||
environmentDefinitionsListByProjectCatalog();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates an environment type.
|
||||
*
|
||||
* @summary Creates or updates an environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentTypes_Put.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Put.json
|
||||
*/
|
||||
async function environmentTypesCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function environmentTypesCreateOrUpdate() {
|
|||
const environmentTypeName = "DevTest";
|
||||
const body: EnvironmentType = {
|
||||
displayName: "Dev",
|
||||
tags: { owner: "superuser" }
|
||||
tags: { owner: "superuser" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -37,7 +37,7 @@ async function environmentTypesCreateOrUpdate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
environmentTypeName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes an environment type.
|
||||
*
|
||||
* @summary Deletes an environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentTypes_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Delete.json
|
||||
*/
|
||||
async function environmentTypesDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function environmentTypesDelete() {
|
|||
const result = await client.environmentTypes.delete(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
environmentTypeName
|
||||
environmentTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an environment type.
|
||||
*
|
||||
* @summary Gets an environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentTypes_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Get.json
|
||||
*/
|
||||
async function environmentTypesGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function environmentTypesGet() {
|
|||
const result = await client.environmentTypes.get(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
environmentTypeName
|
||||
environmentTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists environment types for the devcenter.
|
||||
*
|
||||
* @summary Lists environment types for the devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentTypes_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_List.json
|
||||
*/
|
||||
async function environmentTypesListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function environmentTypesListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.environmentTypes.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates an environment type.
|
||||
*
|
||||
* @summary Partially updates an environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/EnvironmentTypes_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Patch.json
|
||||
*/
|
||||
async function environmentTypesUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function environmentTypesUpdate() {
|
|||
const environmentTypeName = "DevTest";
|
||||
const body: EnvironmentTypeUpdate = {
|
||||
displayName: "Dev",
|
||||
tags: { owner: "superuser" }
|
||||
tags: { owner: "superuser" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -37,7 +37,7 @@ async function environmentTypesUpdate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
environmentTypeName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a gallery.
|
||||
*
|
||||
* @summary Creates or updates a gallery.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Galleries_Create.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Create.json
|
||||
*/
|
||||
async function galleriesCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function galleriesCreateOrUpdate() {
|
|||
const galleryName = "StandardGallery";
|
||||
const body: Gallery = {
|
||||
galleryResourceId:
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery"
|
||||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -37,7 +37,7 @@ async function galleriesCreateOrUpdate() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a gallery resource.
|
||||
*
|
||||
* @summary Deletes a gallery resource.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Galleries_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Delete.json
|
||||
*/
|
||||
async function galleriesDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function galleriesDelete() {
|
|||
const result = await client.galleries.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName
|
||||
galleryName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a gallery
|
||||
*
|
||||
* @summary Gets a gallery
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Galleries_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Get.json
|
||||
*/
|
||||
async function galleriesGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function galleriesGet() {
|
|||
const result = await client.galleries.get(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName
|
||||
galleryName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists galleries for a devcenter.
|
||||
*
|
||||
* @summary Lists galleries for a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Galleries_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_List.json
|
||||
*/
|
||||
async function galleriesListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function galleriesListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.galleries.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an image version.
|
||||
*
|
||||
* @summary Gets an image version.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ImageVersions_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ImageVersions_Get.json
|
||||
*/
|
||||
async function versionsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function versionsGet() {
|
|||
devCenterName,
|
||||
galleryName,
|
||||
imageName,
|
||||
versionName
|
||||
versionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists versions for an image.
|
||||
*
|
||||
* @summary Lists versions for an image.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ImageVersions_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ImageVersions_List.json
|
||||
*/
|
||||
async function imageVersionsListByImage() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function imageVersionsListByImage() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName,
|
||||
imageName
|
||||
imageName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a gallery image.
|
||||
*
|
||||
* @summary Gets a gallery image.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Images_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_Get.json
|
||||
*/
|
||||
async function imagesGet() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function imagesGet() {
|
|||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName,
|
||||
imageName
|
||||
imageName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists images for a devcenter.
|
||||
*
|
||||
* @summary Lists images for a devcenter.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Images_ListByDevCenter.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_ListByDevCenter.json
|
||||
*/
|
||||
async function imagesListByDevCenter() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function imagesListByDevCenter() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.images.listByDevCenter(
|
||||
resourceGroupName,
|
||||
devCenterName
|
||||
devCenterName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists images for a gallery.
|
||||
*
|
||||
* @summary Lists images for a gallery.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Images_ListByGallery.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_ListByGallery.json
|
||||
*/
|
||||
async function imagesListByGallery() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function imagesListByGallery() {
|
|||
for await (let item of client.images.listByGallery(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
galleryName
|
||||
galleryName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a Network Connections resource
|
||||
*
|
||||
* @summary Creates or updates a Network Connections resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_Put.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Put.json
|
||||
*/
|
||||
async function networkConnectionsCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -34,14 +34,14 @@ async function networkConnectionsCreateOrUpdate() {
|
|||
location: "centralus",
|
||||
networkingResourceGroupName: "NetworkInterfaces",
|
||||
subnetId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
networkConnectionName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a Network Connections resource
|
||||
*
|
||||
* @summary Deletes a Network Connections resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Delete.json
|
||||
*/
|
||||
async function networkConnectionsDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function networkConnectionsDelete() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets health check status details.
|
||||
*
|
||||
* @summary Gets health check status details.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_GetHealthDetails.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_GetHealthDetails.json
|
||||
*/
|
||||
async function networkConnectionsGetHealthDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function networkConnectionsGetHealthDetails() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.getHealthDetails(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a network connection resource
|
||||
*
|
||||
* @summary Gets a network connection resource
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Get.json
|
||||
*/
|
||||
async function networkConnectionsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function networkConnectionsGet() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.get(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists network connections in a resource group
|
||||
*
|
||||
* @summary Lists network connections in a resource group
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_ListByResourceGroup.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListByResourceGroup.json
|
||||
*/
|
||||
async function networkConnectionsListByResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function networkConnectionsListByResourceGroup() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.networkConnections.listByResourceGroup(
|
||||
resourceGroupName
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists network connections in a subscription
|
||||
*
|
||||
* @summary Lists network connections in a subscription
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_ListBySubscription.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListBySubscription.json
|
||||
*/
|
||||
async function networkConnectionsListBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists health check status details
|
||||
*
|
||||
* @summary Lists health check status details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_ListHealthDetails.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListHealthDetails.json
|
||||
*/
|
||||
async function networkConnectionsListHealthDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function networkConnectionsListHealthDetails() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.networkConnections.listHealthDetails(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function.
|
||||
*
|
||||
* @summary Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json
|
||||
*/
|
||||
async function listOutboundNetworkDependencies() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function listOutboundNetworkDependencies() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.networkConnections.listOutboundNetworkDependenciesEndpoints(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details
|
||||
*
|
||||
* @summary Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_RunHealthChecks.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_RunHealthChecks.json
|
||||
*/
|
||||
async function networkConnectionsRunHealthChecks() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function networkConnectionsRunHealthChecks() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.beginRunHealthChecksAndWait(
|
||||
resourceGroupName,
|
||||
networkConnectionName
|
||||
networkConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a Network Connection
|
||||
*
|
||||
* @summary Partially updates a Network Connection
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/NetworkConnections_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Patch.json
|
||||
*/
|
||||
async function networkConnectionsUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -27,14 +27,14 @@ async function networkConnectionsUpdate() {
|
|||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const networkConnectionName = "uswest3network";
|
||||
const body: NetworkConnectionUpdate = {
|
||||
domainPassword: "New Password value for user"
|
||||
domainPassword: "New Password value for user",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.networkConnections.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
networkConnectionName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets the current status of an async operation.
|
||||
*
|
||||
* @summary Gets the current status of an async operation.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/OperationStatus_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/OperationStatus_Get.json
|
||||
*/
|
||||
async function getOperationStatus() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all of the available resource provider operations.
|
||||
*
|
||||
* @summary Lists all of the available resource provider operations.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Operations_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Operations_Get.json
|
||||
*/
|
||||
async function operationsGet() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a machine pool
|
||||
*
|
||||
* @summary Creates or updates a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_Put.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Put.json
|
||||
*/
|
||||
async function poolsCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function poolsCreateOrUpdate() {
|
|||
networkConnectionName: "Network1-westus2",
|
||||
singleSignOnStatus: "Disabled",
|
||||
stopOnDisconnect: { gracePeriodMinutes: 60, status: "Enabled" },
|
||||
virtualNetworkType: "Unmanaged"
|
||||
virtualNetworkType: "Unmanaged",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -44,7 +44,7 @@ async function poolsCreateOrUpdate() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
poolName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ async function poolsCreateOrUpdate() {
|
|||
* This sample demonstrates how to Creates or updates a machine pool
|
||||
*
|
||||
* @summary Creates or updates a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_PutWithManagedNetwork.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_PutWithManagedNetwork.json
|
||||
*/
|
||||
async function poolsCreateOrUpdateWithManagedNetwork() {
|
||||
const subscriptionId =
|
||||
|
@ -72,7 +72,7 @@ async function poolsCreateOrUpdateWithManagedNetwork() {
|
|||
networkConnectionName: "managedNetwork",
|
||||
singleSignOnStatus: "Disabled",
|
||||
stopOnDisconnect: { gracePeriodMinutes: 60, status: "Enabled" },
|
||||
virtualNetworkType: "Managed"
|
||||
virtualNetworkType: "Managed",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -80,7 +80,7 @@ async function poolsCreateOrUpdateWithManagedNetwork() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
poolName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a machine pool
|
||||
*
|
||||
* @summary Deletes a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Delete.json
|
||||
*/
|
||||
async function poolsDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function poolsDelete() {
|
|||
const result = await client.pools.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
poolName
|
||||
poolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a machine pool
|
||||
*
|
||||
* @summary Gets a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Get.json
|
||||
*/
|
||||
async function poolsGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function poolsGet() {
|
|||
const result = await client.pools.get(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
poolName
|
||||
poolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ async function poolsGet() {
|
|||
* This sample demonstrates how to Gets a machine pool
|
||||
*
|
||||
* @summary Gets a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_GetUnhealthyStatus.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_GetUnhealthyStatus.json
|
||||
*/
|
||||
async function poolsGetUnhealthyStatus() {
|
||||
const subscriptionId =
|
||||
|
@ -55,7 +55,7 @@ async function poolsGetUnhealthyStatus() {
|
|||
const result = await client.pools.get(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
poolName
|
||||
poolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists pools for a project
|
||||
*
|
||||
* @summary Lists pools for a project
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_List.json
|
||||
*/
|
||||
async function poolsListByProject() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function poolsListByProject() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.pools.listByProject(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Triggers a refresh of the pool status.
|
||||
*
|
||||
* @summary Triggers a refresh of the pool status.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_RunHealthChecks.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_RunHealthChecks.json
|
||||
*/
|
||||
async function poolsRefreshStatus() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function poolsRefreshStatus() {
|
|||
const result = await client.pools.beginRunHealthChecksAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
poolName
|
||||
poolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a machine pool
|
||||
*
|
||||
* @summary Partially updates a machine pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Pools_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Patch.json
|
||||
*/
|
||||
async function poolsUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function poolsUpdate() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
poolName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets an allowed environment type.
|
||||
*
|
||||
* @summary Gets an allowed environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectAllowedEnvironmentTypes_Get.json
|
||||
*/
|
||||
async function projectAllowedEnvironmentTypesGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function projectAllowedEnvironmentTypesGet() {
|
|||
const result = await client.projectAllowedEnvironmentTypes.get(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
environmentTypeName
|
||||
environmentTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists allowed environment types for a project.
|
||||
*
|
||||
* @summary Lists allowed environment types for a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectAllowedEnvironmentTypes_List.json
|
||||
*/
|
||||
async function projectAllowedEnvironmentTypesList() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function projectAllowedEnvironmentTypesList() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.projectAllowedEnvironmentTypes.list(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code 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 { DevCenterClient } from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets Environment Definition error details
|
||||
*
|
||||
* @summary Gets Environment Definition error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogEnvironmentDefinitions_GetErrorDetails.json
|
||||
*/
|
||||
async function projectCatalogEnvironmentDefinitionsGetErrorDetails() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "myCatalog";
|
||||
const environmentDefinitionName = "myEnvironmentDefinition";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result =
|
||||
await client.projectCatalogEnvironmentDefinitions.getErrorDetails(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
environmentDefinitionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
projectCatalogEnvironmentDefinitionsGetErrorDetails();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -15,32 +15,30 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a Task from the catalog
|
||||
* This sample demonstrates how to Connects a project catalog to enable syncing.
|
||||
*
|
||||
* @summary Gets a Task from the catalog
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CustomizationTasks_Get.json
|
||||
* @summary Connects a project catalog to enable syncing.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Connect.json
|
||||
*/
|
||||
async function customizationTasksGet() {
|
||||
async function projectCatalogsConnect() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const taskName = "SampleTask";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.customizationTasks.get(
|
||||
const result = await client.projectCatalogs.beginConnectAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
projectName,
|
||||
catalogName,
|
||||
taskName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
customizationTasksGet();
|
||||
projectCatalogsConnect();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code 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 { Catalog, DevCenterClient } from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a project catalog.
|
||||
*
|
||||
* @summary Creates or updates a project catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_CreateAdo.json
|
||||
*/
|
||||
async function projectCatalogsCreateOrUpdateAdo() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const body: Catalog = {
|
||||
adoGit: {
|
||||
path: "/templates",
|
||||
branch: "main",
|
||||
secretIdentifier:
|
||||
"https://contosokv.vault.azure.net/secrets/CentralRepoPat",
|
||||
uri: "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projectCatalogs.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a project catalog.
|
||||
*
|
||||
* @summary Creates or updates a project catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_CreateGitHub.json
|
||||
*/
|
||||
async function projectCatalogsCreateOrUpdateGitHub() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const body: Catalog = {
|
||||
gitHub: {
|
||||
path: "/templates",
|
||||
branch: "main",
|
||||
secretIdentifier:
|
||||
"https://contosokv.vault.azure.net/secrets/CentralRepoPat",
|
||||
uri: "https://github.com/Contoso/centralrepo-fake.git",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projectCatalogs.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
projectCatalogsCreateOrUpdateAdo();
|
||||
projectCatalogsCreateOrUpdateGitHub();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -15,32 +15,30 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a Task from the catalog
|
||||
* This sample demonstrates how to Deletes a project catalog resource.
|
||||
*
|
||||
* @summary Gets a Task from the catalog
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CustomizationTasks_Get.json
|
||||
* @summary Deletes a project catalog resource.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Delete.json
|
||||
*/
|
||||
async function customizationTasksGet() {
|
||||
async function projectCatalogsDelete() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const taskName = "SampleTask";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.customizationTasks.get(
|
||||
const result = await client.projectCatalogs.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
projectName,
|
||||
catalogName,
|
||||
taskName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
customizationTasksGet();
|
||||
projectCatalogsDelete();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -15,32 +15,30 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets Customization Task error details
|
||||
* This sample demonstrates how to Gets an associated project catalog.
|
||||
*
|
||||
* @summary Gets Customization Task error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CustomizationTasks_GetErrorDetails.json
|
||||
* @summary Gets an associated project catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Get.json
|
||||
*/
|
||||
async function customizationTasksGetErrorDetails() {
|
||||
async function projectCatalogsGet() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const taskName = "SampleTask";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.customizationTasks.getErrorDetails(
|
||||
const result = await client.projectCatalogs.get(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
projectName,
|
||||
catalogName,
|
||||
taskName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
customizationTasksGetErrorDetails();
|
||||
projectCatalogsGet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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 { DevCenterClient } from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets project catalog synchronization error details
|
||||
*
|
||||
* @summary Gets project catalog synchronization error details
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_GetSyncErrorDetails.json
|
||||
*/
|
||||
async function projectCatalogsGetSyncErrorDetails() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projectCatalogs.getSyncErrorDetails(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
projectCatalogsGetSyncErrorDetails();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -15,25 +15,23 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Tasks in the catalog.
|
||||
* This sample demonstrates how to Lists the catalogs associated with a project.
|
||||
*
|
||||
* @summary List Tasks in the catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/CustomizationTasks_ListByCatalog.json
|
||||
* @summary Lists the catalogs associated with a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_List.json
|
||||
*/
|
||||
async function customizationTasksListByCatalog() {
|
||||
async function projectCatalogsList() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const devCenterName = "Contoso";
|
||||
const catalogName = "CentralCatalog";
|
||||
const projectName = "DevProject";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.customizationTasks.listByCatalog(
|
||||
for await (let item of client.projectCatalogs.list(
|
||||
resourceGroupName,
|
||||
devCenterName,
|
||||
catalogName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
@ -41,7 +39,7 @@ async function customizationTasksListByCatalog() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
customizationTasksListByCatalog();
|
||||
projectCatalogsList();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code 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 { CatalogUpdate, DevCenterClient } from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Partially updates a project catalog.
|
||||
*
|
||||
* @summary Partially updates a project catalog.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Patch.json
|
||||
*/
|
||||
async function projectCatalogsPatch() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const body: CatalogUpdate = { gitHub: { path: "/environments" } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projectCatalogs.beginPatchAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
projectCatalogsPatch();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -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 { DevCenterClient } from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Syncs templates for a template source.
|
||||
*
|
||||
* @summary Syncs templates for a template source.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Sync.json
|
||||
*/
|
||||
async function projectCatalogsSync() {
|
||||
const subscriptionId =
|
||||
process.env["DEVCENTER_SUBSCRIPTION_ID"] ||
|
||||
"0ac520ee-14c0-480f-b6c9-0a90c58ffff";
|
||||
const resourceGroupName = process.env["DEVCENTER_RESOURCE_GROUP"] || "rg1";
|
||||
const projectName = "DevProject";
|
||||
const catalogName = "CentralCatalog";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projectCatalogs.beginSyncAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
catalogName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
projectCatalogsSync();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a project environment type.
|
||||
*
|
||||
* @summary Creates or updates a project environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectEnvironmentTypes_Put.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Put.json
|
||||
*/
|
||||
async function projectEnvironmentTypesCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -29,22 +29,23 @@ async function projectEnvironmentTypesCreateOrUpdate() {
|
|||
const environmentTypeName = "DevTest";
|
||||
const body: ProjectEnvironmentType = {
|
||||
creatorRoleAssignment: {
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} }
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} },
|
||||
},
|
||||
deploymentTargetId: "/subscriptions/00000000-0000-0000-0000-000000000000",
|
||||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/00000000000000000000000000000000/resourcegroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1": {}
|
||||
}
|
||||
"/subscriptions/00000000000000000000000000000000/resourcegroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1":
|
||||
{},
|
||||
},
|
||||
},
|
||||
status: "Enabled",
|
||||
tags: { costCenter: "RnD" },
|
||||
userRoleAssignments: {
|
||||
e45e3m7c176e416aB4660c5ec8298f8a: {
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} }
|
||||
}
|
||||
}
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} },
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -52,7 +53,7 @@ async function projectEnvironmentTypesCreateOrUpdate() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
environmentTypeName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a project environment type.
|
||||
*
|
||||
* @summary Deletes a project environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectEnvironmentTypes_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Delete.json
|
||||
*/
|
||||
async function projectEnvironmentTypesDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function projectEnvironmentTypesDelete() {
|
|||
const result = await client.projectEnvironmentTypes.delete(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
environmentTypeName
|
||||
environmentTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a project environment type.
|
||||
*
|
||||
* @summary Gets a project environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectEnvironmentTypes_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Get.json
|
||||
*/
|
||||
async function projectEnvironmentTypesGet() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function projectEnvironmentTypesGet() {
|
|||
const result = await client.projectEnvironmentTypes.get(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
environmentTypeName
|
||||
environmentTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists environment types for a project.
|
||||
*
|
||||
* @summary Lists environment types for a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectEnvironmentTypes_List.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_List.json
|
||||
*/
|
||||
async function projectEnvironmentTypesList() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function projectEnvironmentTypesList() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.projectEnvironmentTypes.list(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ProjectEnvironmentTypeUpdate,
|
||||
DevCenterClient
|
||||
DevCenterClient,
|
||||
} from "@azure/arm-devcenter";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a project environment type.
|
||||
*
|
||||
* @summary Partially updates a project environment type.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/ProjectEnvironmentTypes_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Patch.json
|
||||
*/
|
||||
async function projectEnvironmentTypesUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -35,16 +35,17 @@ async function projectEnvironmentTypesUpdate() {
|
|||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/00000000000000000000000000000000/resourcegroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1": {}
|
||||
}
|
||||
"/subscriptions/00000000000000000000000000000000/resourcegroups/identityGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/testidentity1":
|
||||
{},
|
||||
},
|
||||
},
|
||||
status: "Enabled",
|
||||
tags: { costCenter: "RnD" },
|
||||
userRoleAssignments: {
|
||||
e45e3m7c176e416aB4660c5ec8298f8a: {
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} }
|
||||
}
|
||||
}
|
||||
roles: { "4cbf0b6cE750441c98a710da8387e4d6": {} },
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -52,7 +53,7 @@ async function projectEnvironmentTypesUpdate() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
environmentTypeName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a project.
|
||||
*
|
||||
* @summary Creates or updates a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_Put.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Put.json
|
||||
*/
|
||||
async function projectsCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -32,14 +32,14 @@ async function projectsCreateOrUpdate() {
|
|||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso",
|
||||
displayName: "Dev",
|
||||
location: "centralus",
|
||||
tags: { costCenter: "R&D" }
|
||||
tags: { costCenter: "R&D" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projects.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ async function projectsCreateOrUpdate() {
|
|||
* This sample demonstrates how to Creates or updates a project.
|
||||
*
|
||||
* @summary Creates or updates a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_PutWithMaxDevBoxPerUser.json
|
||||
*/
|
||||
async function projectsCreateOrUpdateWithLimitsPerDev() {
|
||||
const subscriptionId =
|
||||
|
@ -62,14 +62,14 @@ async function projectsCreateOrUpdateWithLimitsPerDev() {
|
|||
"/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso",
|
||||
location: "centralus",
|
||||
maxDevBoxesPerUser: 3,
|
||||
tags: { costCenter: "R&D" }
|
||||
tags: { costCenter: "R&D" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projects.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a project resource.
|
||||
*
|
||||
* @summary Deletes a project resource.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Delete.json
|
||||
*/
|
||||
async function projectsDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function projectsDelete() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projects.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
projectName
|
||||
projectName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a specific project.
|
||||
*
|
||||
* @summary Gets a specific project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Get.json
|
||||
*/
|
||||
async function projectsGet() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all projects in the resource group.
|
||||
*
|
||||
* @summary Lists all projects in the resource group.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_ListByResourceGroup.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_ListByResourceGroup.json
|
||||
*/
|
||||
async function projectsListByResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function projectsListByResourceGroup() {
|
|||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.projects.listByResourceGroup(
|
||||
resourceGroupName
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all projects in the subscription.
|
||||
*
|
||||
* @summary Lists all projects in the subscription.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_ListBySubscription.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_ListBySubscription.json
|
||||
*/
|
||||
async function projectsListBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a project.
|
||||
*
|
||||
* @summary Partially updates a project.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Projects_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Patch.json
|
||||
*/
|
||||
async function projectsUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -28,15 +28,16 @@ async function projectsUpdate() {
|
|||
const projectName = "DevProject";
|
||||
const body: ProjectUpdate = {
|
||||
description: "This is my first project.",
|
||||
catalogSettings: { catalogItemSyncTypes: ["EnvironmentDefinition"] },
|
||||
displayName: "Dev",
|
||||
tags: { costCenter: "R&D" }
|
||||
tags: { costCenter: "R&D" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
const result = await client.projects.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a Schedule.
|
||||
*
|
||||
* @summary Creates or updates a Schedule.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json
|
||||
*/
|
||||
async function schedulesCreateDailyShutdownPoolSchedule() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function schedulesCreateDailyShutdownPoolSchedule() {
|
|||
frequency: "Daily",
|
||||
state: "Enabled",
|
||||
time: "17:30",
|
||||
timeZone: "America/Los_Angeles"
|
||||
timeZone: "America/Los_Angeles",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new DevCenterClient(credential, subscriptionId);
|
||||
|
@ -42,7 +42,7 @@ async function schedulesCreateDailyShutdownPoolSchedule() {
|
|||
projectName,
|
||||
poolName,
|
||||
scheduleName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a Scheduled.
|
||||
*
|
||||
* @summary Deletes a Scheduled.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Schedules_Delete.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Delete.json
|
||||
*/
|
||||
async function schedulesDelete() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function schedulesDelete() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
poolName,
|
||||
scheduleName
|
||||
scheduleName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a schedule resource.
|
||||
*
|
||||
* @summary Gets a schedule resource.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Schedules_Get.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Get.json
|
||||
*/
|
||||
async function schedulesGetByPool() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function schedulesGetByPool() {
|
|||
resourceGroupName,
|
||||
projectName,
|
||||
poolName,
|
||||
scheduleName
|
||||
scheduleName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists schedules for a pool
|
||||
*
|
||||
* @summary Lists schedules for a pool
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Schedules_ListByPool.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_ListByPool.json
|
||||
*/
|
||||
async function schedulesListByPool() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function schedulesListByPool() {
|
|||
for await (let item of client.schedules.listByPool(
|
||||
resourceGroupName,
|
||||
projectName,
|
||||
poolName
|
||||
poolName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Partially updates a Scheduled.
|
||||
*
|
||||
* @summary Partially updates a Scheduled.
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-10-01-preview/examples/Schedules_Patch.json
|
||||
* x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Patch.json
|
||||
*/
|
||||
async function schedulesUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function schedulesUpdate() {
|
|||
projectName,
|
||||
poolName,
|
||||
scheduleName,
|
||||
body
|
||||
body,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче