* cosmosdb

* customer-insights

* databox

* databoxedge

* databricks

* update sample-dev

* update

* update

* update

* update

* update
This commit is contained in:
colawwj 2022-04-18 11:02:34 +08:00 коммит произвёл GitHub
Родитель 286e2f9ab6
Коммит 03a407331a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
444 изменённых файлов: 16573 добавлений и 730 удалений

Просмотреть файл

@ -10085,7 +10085,7 @@ packages:
dev: false dev: false
file:projects/arm-cosmosdb.tgz: file:projects/arm-cosmosdb.tgz:
resolution: {integrity: sha512-OP4+f3Ecd0Ix+6YOLUhueJClbVOWRncbHN4VmJ5b2BzW64Ui/j9m3chqAAQHUyYNBNBsbiKSM7Fva1SLmCpfCQ==, tarball: file:projects/arm-cosmosdb.tgz} resolution: {integrity: sha512-ccYAABzHBd1z9k6CRvCvejrtFCor3dx4BtgD2Kp5kYC10NCgix44mJDK+JKizxW5xOKnQzeAkUtX8WEKpbxkaQ==, tarball: file:projects/arm-cosmosdb.tgz}
name: '@rush-temp/arm-cosmosdb' name: '@rush-temp/arm-cosmosdb'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
@ -10113,27 +10113,28 @@ packages:
dev: false dev: false
file:projects/arm-customerinsights.tgz: file:projects/arm-customerinsights.tgz:
resolution: {integrity: sha512-0e7MjJl5ksl4SxdhU/yFmqosyG1DNYthE3jsUqy71XalRP3V3Hq1OI0aIujwzuoL9lGFsCbeHBcnB1GdoOZuPQ==, tarball: file:projects/arm-customerinsights.tgz} resolution: {integrity: sha512-JMFKoFT8xCCEwiqAmcOe/HoRNVUbabcHLoLoMDh/R8ggL+IWiuRyCUtPtEY3CXpkTBVHJeqjaVBrfcIsxDjzSw==, tarball: file:projects/arm-customerinsights.tgz}
name: '@rush-temp/arm-customerinsights' name: '@rush-temp/arm-customerinsights'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
'@azure-tools/test-recorder': 1.0.2 '@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4 '@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1 '@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3 cross-env: 7.0.3
mkdirp: 1.0.4 mkdirp: 1.0.4
mocha: 7.2.0 mocha: 7.2.0
rimraf: 3.0.2 rimraf: 3.0.2
rollup: 1.32.1 rollup: 2.70.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1 tslib: 2.3.1
typescript: 4.2.4 typescript: 4.2.4
uglify-js: 3.15.4 uglify-js: 3.15.4
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node'
- debug - debug
- encoding - encoding
- supports-color - supports-color
@ -10168,27 +10169,28 @@ packages:
dev: false dev: false
file:projects/arm-databox.tgz: file:projects/arm-databox.tgz:
resolution: {integrity: sha512-xt/1SjsT2CIDzxfmcmO2WnbgXH70/zG3iqB/aN9r31uhW75GEeC4B7x7U/h79V8lZ1BTBs/UnoAOQgn52GCfgA==, tarball: file:projects/arm-databox.tgz} resolution: {integrity: sha512-iUm9In3daBfAFf1GVWA7tn9KcTI2Rkv/cQ1DFQqbkbKkm2RY96P/8KzYexjzkHUWzKPJEw6ZmCDTwRMFz/jttQ==, tarball: file:projects/arm-databox.tgz}
name: '@rush-temp/arm-databox' name: '@rush-temp/arm-databox'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
'@azure-tools/test-recorder': 1.0.2 '@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4 '@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1 '@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3 cross-env: 7.0.3
mkdirp: 1.0.4 mkdirp: 1.0.4
mocha: 7.2.0 mocha: 7.2.0
rimraf: 3.0.2 rimraf: 3.0.2
rollup: 1.32.1 rollup: 2.70.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1 tslib: 2.3.1
typescript: 4.2.4 typescript: 4.2.4
uglify-js: 3.15.4 uglify-js: 3.15.4
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node'
- debug - debug
- encoding - encoding
- supports-color - supports-color
@ -10223,34 +10225,35 @@ packages:
dev: false dev: false
file:projects/arm-databoxedge.tgz: file:projects/arm-databoxedge.tgz:
resolution: {integrity: sha512-kNfcboC76r1zKltjFmM5Azjf/Zd1gfFXXCzZFfI3pjNMaNo0p2BVNLS5nC6fRIGdI2Rd2E16cQ7zf+SjtnDA2A==, tarball: file:projects/arm-databoxedge.tgz} resolution: {integrity: sha512-K4oSUJE0P5WUoe12ffXR06xe2zMHutY2tVRneK14j9b+PTLL+Av0NWJR05M2kEuprOrGIcW3gqL0xnk0LF85mA==, tarball: file:projects/arm-databoxedge.tgz}
name: '@rush-temp/arm-databoxedge' name: '@rush-temp/arm-databoxedge'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
'@azure-tools/test-recorder': 1.0.2 '@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4 '@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1 '@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 '@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3 cross-env: 7.0.3
mkdirp: 1.0.4 mkdirp: 1.0.4
mocha: 7.2.0 mocha: 7.2.0
rimraf: 3.0.2 rimraf: 3.0.2
rollup: 1.32.1 rollup: 2.70.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1 tslib: 2.3.1
typescript: 4.2.4 typescript: 4.2.4
uglify-js: 3.15.4 uglify-js: 3.15.4
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node'
- debug - debug
- encoding - encoding
- supports-color - supports-color
dev: false dev: false
file:projects/arm-databricks.tgz: file:projects/arm-databricks.tgz:
resolution: {integrity: sha512-XqSqvTvkq0eYJg/2pIWqIZd1jAD5wlUJlg55Z4Hozn/wzx/3+ykgfBF3v6Cdzuj8wTnubV8VOU4luoqua0XUUg==, tarball: file:projects/arm-databricks.tgz} resolution: {integrity: sha512-4VOt/m2ZeYSms0Fs2LX1PZTenOg9nl7r0J6KhzFnFjE8+4Bgnel0FZluj53pPVID+0Dk/RmVels1TLuTz8QAoQ==, tarball: file:projects/arm-databricks.tgz}
name: '@rush-temp/arm-databricks' name: '@rush-temp/arm-databricks'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
@ -10259,18 +10262,19 @@ packages:
'@microsoft/api-extractor': 7.22.1 '@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1 '@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.1 '@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3 cross-env: 7.0.3
mkdirp: 1.0.4 mkdirp: 1.0.4
mocha: 7.2.0 mocha: 7.2.0
rimraf: 3.0.2 rimraf: 3.0.2
rollup: 2.70.1 rollup: 2.70.1
rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1 tslib: 2.3.1
typescript: 4.2.4 typescript: 4.2.4
uglify-js: 3.15.4 uglify-js: 3.15.4
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node'
- debug - debug
- encoding - encoding
- supports-color - supports-color
@ -16098,7 +16102,7 @@ packages:
dev: false dev: false
file:projects/perf-eventgrid.tgz: file:projects/perf-eventgrid.tgz:
resolution: {integrity: sha512-xZEKu3aE6Hkt6dwHFG0AhSvy3ckK6GMgKPzXbfuk1CXxIUnDmFq8MzclLNVzyjVDXNtMmyqv3seBpd+2SLHV0Q==, tarball: file:projects/perf-eventgrid.tgz} resolution: {integrity: sha512-GAlXNvlXjweEKtCQ2VWR1aTnpyfkL2oqOPAfTT57pgVIu2KzUwnOpbkw/xVEJAL9yuLoJikmaFUN9qqylJgo5w==, tarball: file:projects/perf-eventgrid.tgz}
name: '@rush-temp/perf-eventgrid' name: '@rush-temp/perf-eventgrid'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
@ -16901,7 +16905,7 @@ packages:
dev: false dev: false
file:projects/storage-file-datalake.tgz: file:projects/storage-file-datalake.tgz:
resolution: {integrity: sha512-6+gtsXHsjNFYtXySI3zLAZlzdZQ8B9f+P94mYZmsfPrU1n8xwv9f5g9a0gWf0CJFKLmqrOJcVwPJJcgRzeKVxQ==, tarball: file:projects/storage-file-datalake.tgz} resolution: {integrity: sha512-MEul5fHWS6WAUHpmjEMzHwBEHfk1PL6BvDeNIR9PjbvAvPQSDYi4eImkpy+v26FC0/LrLL0IC2wfYxcSG05b/g==, tarball: file:projects/storage-file-datalake.tgz}
name: '@rush-temp/storage-file-datalake' name: '@rush-temp/storage-file-datalake'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:

Просмотреть файл

@ -8,30 +8,6 @@ https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-cha
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/typescript https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/samples/typescript
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/test/ https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-changefeed/test/
https://github.com/Azure/azure-digital-twins/blob/private-preview/Documentation/how-to-manage-routes.md https://github.com/Azure/azure-digital-twins/blob/private-preview/Documentation/how-to-manage-routes.md
https://docs.microsoft.com/javascript/api/@azure/arm-dnsresolver?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview
https://docs.microsoft.com/en-us/azure/service-health/resource-health-overview
https://docs.microsoft.com/javascript/api/@azure/arm-resources-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-locks-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-dns-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-policy-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-subscriptions-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-storage-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-keyvault-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-network-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-commerce-profile-2020-09-01-hybrid?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-compute-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-eventhub-profile-2020-09-01-hybrid?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-authorization-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-iothub-profile-2020-09-01-hybrid?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-monitor-profile-2020-09-01-hybrid?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-databoxedge-profile-2020-09-01-hybrid
https://docs.microsoft.com/javascript/api/@azure/arm-appservice-profile-2020-09-01-hybrid
https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network
https://docs.microsoft.com/en-us/azure/service-health/resource-health-overview
https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-mysql-flexible
https://docs.microsoft.com/javascript/api/@azure/arm-mysql-flexible?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-hardwaresecuritymodules
https://docs.microsoft.com/javascript/api/@azure/arm-hardwaresecuritymodules?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-dashboard?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-dashboard?view=azure-node-preview
https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr

Просмотреть файл

@ -1,16 +1,6 @@
# Release History # Release History
## 16.0.0-beta.2 (Unreleased) ## 16.0.0-beta.2 (2022-04-15)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
## 16.0.0-beta.1 (2022-02-21)
**Features** **Features**
@ -235,11 +225,7 @@
- Added Enum KnownServiceStatus - Added Enum KnownServiceStatus
- Added Enum KnownServiceType - Added Enum KnownServiceType
- Enum KnownAuthenticationMethod has a new value Ldap - Enum KnownAuthenticationMethod has a new value Ldap
- Bug fix
**Breaking Changes**
- Type Alias DatabaseAccountCreateUpdateParameters no longer has parameter identity
- Type Alias DatabaseAccountGetResults no longer has parameter identity
## 15.0.0 (2021-12-09) ## 15.0.0 (2021-12-09)

Просмотреть файл

@ -1,7 +1,8 @@
{ {
"commit": "bb9f1204f9a337404ff7e7b73b4c7b4ddde7f8f1", "commit": "bb9f1204f9a337404ff7e7b73b4c7b4ddde7f8f1",
"readme": "specification/cosmos-db/resource-manager/readme.md", "readme": "specification\\cosmos-db\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220217.1", "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220217.1" "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
} }

Просмотреть файл

@ -11,9 +11,9 @@
"@azure/core-lro": "^2.2.0", "@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0", "@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0", "@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0", "@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0", "@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0" "tslib": "^2.2.0"
}, },
"keywords": [ "keywords": [

Просмотреть файл

@ -7,6 +7,7 @@
*/ */
import * as coreClient from "@azure/core-client"; import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth"; import * as coreAuth from "@azure/core-auth";
import { import {
DatabaseAccountsImpl, DatabaseAccountsImpl,
@ -139,9 +140,33 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
userAgentOptions: { userAgentOptions: {
userAgentPrefix userAgentPrefix
}, },
baseUri: options.endpoint || "https://management.azure.com" baseUri:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
}; };
super(optionsWithDefaults); super(optionsWithDefaults);
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments // Parameter assignments
this.subscriptionId = subscriptionId; this.subscriptionId = subscriptionId;

Просмотреть файл

@ -293,10 +293,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, options }, { resourceGroupName, clusterName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -381,10 +383,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, body, options }, { resourceGroupName, clusterName, body, options },
createUpdateOperationSpec createUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -472,10 +476,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, body, options }, { resourceGroupName, clusterName, body, options },
updateOperationSpec updateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -562,10 +568,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, body, options }, { resourceGroupName, clusterName, body, options },
invokeCommandOperationSpec invokeCommandOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -683,10 +691,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, options }, { resourceGroupName, clusterName, options },
deallocateOperationSpec deallocateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -767,10 +777,12 @@ export class CassandraClustersImpl implements CassandraClusters {
{ resourceGroupName, clusterName, options }, { resourceGroupName, clusterName, options },
startOperationSpec startOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -181,10 +181,12 @@ export class CassandraDataCentersImpl implements CassandraDataCenters {
{ resourceGroupName, clusterName, dataCenterName, options }, { resourceGroupName, clusterName, dataCenterName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -274,10 +276,12 @@ export class CassandraDataCentersImpl implements CassandraDataCenters {
{ resourceGroupName, clusterName, dataCenterName, body, options }, { resourceGroupName, clusterName, dataCenterName, body, options },
createUpdateOperationSpec createUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -370,10 +374,12 @@ export class CassandraDataCentersImpl implements CassandraDataCenters {
{ resourceGroupName, clusterName, dataCenterName, body, options }, { resourceGroupName, clusterName, dataCenterName, body, options },
updateOperationSpec updateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -388,10 +388,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
createUpdateCassandraKeyspaceOperationSpec createUpdateCassandraKeyspaceOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -477,10 +479,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, options }, { resourceGroupName, accountName, keyspaceName, options },
deleteCassandraKeyspaceOperationSpec deleteCassandraKeyspaceOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -598,10 +602,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
updateCassandraKeyspaceThroughputOperationSpec updateCassandraKeyspaceThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -694,10 +700,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, options }, { resourceGroupName, accountName, keyspaceName, options },
migrateCassandraKeyspaceToAutoscaleOperationSpec migrateCassandraKeyspaceToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -786,10 +794,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, options }, { resourceGroupName, accountName, keyspaceName, options },
migrateCassandraKeyspaceToManualThroughputOperationSpec migrateCassandraKeyspaceToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -930,10 +940,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
createUpdateCassandraTableOperationSpec createUpdateCassandraTableOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1024,10 +1036,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, tableName, options }, { resourceGroupName, accountName, keyspaceName, tableName, options },
deleteCassandraTableOperationSpec deleteCassandraTableOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1153,10 +1167,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
updateCassandraTableThroughputOperationSpec updateCassandraTableThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1254,10 +1270,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, tableName, options }, { resourceGroupName, accountName, keyspaceName, tableName, options },
migrateCassandraTableToAutoscaleOperationSpec migrateCassandraTableToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1351,10 +1369,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, tableName, options }, { resourceGroupName, accountName, keyspaceName, tableName, options },
migrateCassandraTableToManualThroughputOperationSpec migrateCassandraTableToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1497,10 +1517,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
createUpdateCassandraViewOperationSpec createUpdateCassandraViewOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1590,10 +1612,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, viewName, options }, { resourceGroupName, accountName, keyspaceName, viewName, options },
deleteCassandraViewOperationSpec deleteCassandraViewOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1719,10 +1743,12 @@ export class CassandraResourcesImpl implements CassandraResources {
}, },
updateCassandraViewThroughputOperationSpec updateCassandraViewThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1820,10 +1846,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, viewName, options }, { resourceGroupName, accountName, keyspaceName, viewName, options },
migrateCassandraViewToAutoscaleOperationSpec migrateCassandraViewToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1917,10 +1945,12 @@ export class CassandraResourcesImpl implements CassandraResources {
{ resourceGroupName, accountName, keyspaceName, viewName, options }, { resourceGroupName, accountName, keyspaceName, viewName, options },
migrateCassandraViewToManualThroughputOperationSpec migrateCassandraViewToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -418,10 +418,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, updateParameters, options }, { resourceGroupName, accountName, updateParameters, options },
updateOperationSpec updateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -509,10 +511,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, createUpdateParameters, options }, { resourceGroupName, accountName, createUpdateParameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -593,10 +597,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, options }, { resourceGroupName, accountName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -678,10 +684,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, failoverParameters, options }, { resourceGroupName, accountName, failoverParameters, options },
failoverPriorityChangeOperationSpec failoverPriorityChangeOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -825,10 +833,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, regionParameterForOffline, options }, { resourceGroupName, accountName, regionParameterForOffline, options },
offlineRegionOperationSpec offlineRegionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -910,10 +920,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, regionParameterForOnline, options }, { resourceGroupName, accountName, regionParameterForOnline, options },
onlineRegionOperationSpec onlineRegionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1029,10 +1041,12 @@ export class DatabaseAccountsImpl implements DatabaseAccounts {
{ resourceGroupName, accountName, keyToRegenerate, options }, { resourceGroupName, accountName, keyToRegenerate, options },
regenerateKeyOperationSpec regenerateKeyOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -205,10 +205,12 @@ export class GraphResourcesImpl implements GraphResources {
}, },
createUpdateGraphOperationSpec createUpdateGraphOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -293,10 +295,12 @@ export class GraphResourcesImpl implements GraphResources {
{ resourceGroupName, accountName, graphName, options }, { resourceGroupName, accountName, graphName, options },
deleteGraphResourceOperationSpec deleteGraphResourceOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -304,10 +304,12 @@ export class GremlinResourcesImpl implements GremlinResources {
}, },
createUpdateGremlinDatabaseOperationSpec createUpdateGremlinDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -393,10 +395,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
deleteGremlinDatabaseOperationSpec deleteGremlinDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -514,10 +518,12 @@ export class GremlinResourcesImpl implements GremlinResources {
}, },
updateGremlinDatabaseThroughputOperationSpec updateGremlinDatabaseThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -610,10 +616,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateGremlinDatabaseToAutoscaleOperationSpec migrateGremlinDatabaseToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -702,10 +710,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateGremlinDatabaseToManualThroughputOperationSpec migrateGremlinDatabaseToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -843,10 +853,12 @@ export class GremlinResourcesImpl implements GremlinResources {
}, },
createUpdateGremlinGraphOperationSpec createUpdateGremlinGraphOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -936,10 +948,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, graphName, options }, { resourceGroupName, accountName, databaseName, graphName, options },
deleteGremlinGraphOperationSpec deleteGremlinGraphOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1063,10 +1077,12 @@ export class GremlinResourcesImpl implements GremlinResources {
}, },
updateGremlinGraphThroughputOperationSpec updateGremlinGraphThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1164,10 +1180,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, graphName, options }, { resourceGroupName, accountName, databaseName, graphName, options },
migrateGremlinGraphToAutoscaleOperationSpec migrateGremlinGraphToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1261,10 +1279,12 @@ export class GremlinResourcesImpl implements GremlinResources {
{ resourceGroupName, accountName, databaseName, graphName, options }, { resourceGroupName, accountName, databaseName, graphName, options },
migrateGremlinGraphToManualThroughputOperationSpec migrateGremlinGraphToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1367,11 +1387,13 @@ export class GremlinResourcesImpl implements GremlinResources {
}, },
retrieveContinuousBackupInformationOperationSpec retrieveContinuousBackupInformationOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs, intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location" lroResourceLocationConfig: "location"
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -442,10 +442,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
createUpdateMongoDBDatabaseOperationSpec createUpdateMongoDBDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -531,10 +533,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
deleteMongoDBDatabaseOperationSpec deleteMongoDBDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -652,10 +656,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
updateMongoDBDatabaseThroughputOperationSpec updateMongoDBDatabaseThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -748,10 +754,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateMongoDBDatabaseToAutoscaleOperationSpec migrateMongoDBDatabaseToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -840,10 +848,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateMongoDBDatabaseToManualThroughputOperationSpec migrateMongoDBDatabaseToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -982,10 +992,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
createUpdateMongoDBCollectionOperationSpec createUpdateMongoDBCollectionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1076,10 +1088,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, collectionName, options }, { resourceGroupName, accountName, databaseName, collectionName, options },
deleteMongoDBCollectionOperationSpec deleteMongoDBCollectionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1205,10 +1219,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
updateMongoDBCollectionThroughputOperationSpec updateMongoDBCollectionThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1306,10 +1322,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, collectionName, options }, { resourceGroupName, accountName, databaseName, collectionName, options },
migrateMongoDBCollectionToAutoscaleOperationSpec migrateMongoDBCollectionToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1403,10 +1421,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ resourceGroupName, accountName, databaseName, collectionName, options }, { resourceGroupName, accountName, databaseName, collectionName, options },
migrateMongoDBCollectionToManualThroughputOperationSpec migrateMongoDBCollectionToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1528,10 +1548,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
createUpdateMongoRoleDefinitionOperationSpec createUpdateMongoRoleDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1617,10 +1639,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ mongoRoleDefinitionId, resourceGroupName, accountName, options }, { mongoRoleDefinitionId, resourceGroupName, accountName, options },
deleteMongoRoleDefinitionOperationSpec deleteMongoRoleDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1754,10 +1778,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
createUpdateMongoUserDefinitionOperationSpec createUpdateMongoUserDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1843,10 +1869,12 @@ export class MongoDBResourcesImpl implements MongoDBResources {
{ mongoUserDefinitionId, resourceGroupName, accountName, options }, { mongoUserDefinitionId, resourceGroupName, accountName, options },
deleteMongoUserDefinitionOperationSpec deleteMongoUserDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1963,11 +1991,13 @@ export class MongoDBResourcesImpl implements MongoDBResources {
}, },
retrieveContinuousBackupInformationOperationSpec retrieveContinuousBackupInformationOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs, intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location" lroResourceLocationConfig: "location"
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -211,10 +211,12 @@ export class NotebookWorkspacesImpl implements NotebookWorkspaces {
}, },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -300,10 +302,12 @@ export class NotebookWorkspacesImpl implements NotebookWorkspaces {
{ resourceGroupName, accountName, notebookWorkspaceName, options }, { resourceGroupName, accountName, notebookWorkspaceName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -404,10 +408,12 @@ export class NotebookWorkspacesImpl implements NotebookWorkspaces {
{ resourceGroupName, accountName, notebookWorkspaceName, options }, { resourceGroupName, accountName, notebookWorkspaceName, options },
regenerateAuthTokenOperationSpec regenerateAuthTokenOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -489,10 +495,12 @@ export class NotebookWorkspacesImpl implements NotebookWorkspaces {
{ resourceGroupName, accountName, notebookWorkspaceName, options }, { resourceGroupName, accountName, notebookWorkspaceName, options },
startOperationSpec startOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -210,10 +210,12 @@ export class PrivateEndpointConnectionsImpl
}, },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -303,10 +305,12 @@ export class PrivateEndpointConnectionsImpl
}, },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -171,10 +171,12 @@ export class ServiceImpl implements Service {
}, },
createOperationSpec createOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -278,10 +280,12 @@ export class ServiceImpl implements Service {
{ resourceGroupName, accountName, serviceName, options }, { resourceGroupName, accountName, serviceName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -771,10 +771,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlDatabaseOperationSpec createUpdateSqlDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -859,10 +861,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
deleteSqlDatabaseOperationSpec deleteSqlDatabaseOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -978,10 +982,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
updateSqlDatabaseThroughputOperationSpec updateSqlDatabaseThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1072,10 +1078,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateSqlDatabaseToAutoscaleOperationSpec migrateSqlDatabaseToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1164,10 +1172,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, options }, { resourceGroupName, accountName, databaseName, options },
migrateSqlDatabaseToManualThroughputOperationSpec migrateSqlDatabaseToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1313,10 +1323,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateClientEncryptionKeyOperationSpec createUpdateClientEncryptionKeyOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1462,10 +1474,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlContainerOperationSpec createUpdateSqlContainerOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1555,10 +1569,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, containerName, options }, { resourceGroupName, accountName, databaseName, containerName, options },
deleteSqlContainerOperationSpec deleteSqlContainerOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1681,10 +1697,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
updateSqlContainerThroughputOperationSpec updateSqlContainerThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1780,10 +1798,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, containerName, options }, { resourceGroupName, accountName, databaseName, containerName, options },
migrateSqlContainerToAutoscaleOperationSpec migrateSqlContainerToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -1877,10 +1897,12 @@ export class SqlResourcesImpl implements SqlResources {
{ resourceGroupName, accountName, databaseName, containerName, options }, { resourceGroupName, accountName, databaseName, containerName, options },
migrateSqlContainerToManualThroughputOperationSpec migrateSqlContainerToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2036,10 +2058,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlStoredProcedureOperationSpec createUpdateSqlStoredProcedureOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2142,10 +2166,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
deleteSqlStoredProcedureOperationSpec deleteSqlStoredProcedureOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2306,10 +2332,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlUserDefinedFunctionOperationSpec createUpdateSqlUserDefinedFunctionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2412,10 +2440,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
deleteSqlUserDefinedFunctionOperationSpec deleteSqlUserDefinedFunctionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2573,10 +2603,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlTriggerOperationSpec createUpdateSqlTriggerOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2678,10 +2710,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
deleteSqlTriggerOperationSpec deleteSqlTriggerOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2802,10 +2836,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlRoleDefinitionOperationSpec createUpdateSqlRoleDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -2891,10 +2927,12 @@ export class SqlResourcesImpl implements SqlResources {
{ roleDefinitionId, resourceGroupName, accountName, options }, { roleDefinitionId, resourceGroupName, accountName, options },
deleteSqlRoleDefinitionOperationSpec deleteSqlRoleDefinitionOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -3026,10 +3064,12 @@ export class SqlResourcesImpl implements SqlResources {
}, },
createUpdateSqlRoleAssignmentOperationSpec createUpdateSqlRoleAssignmentOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -3115,10 +3155,12 @@ export class SqlResourcesImpl implements SqlResources {
{ roleAssignmentId, resourceGroupName, accountName, options }, { roleAssignmentId, resourceGroupName, accountName, options },
deleteSqlRoleAssignmentOperationSpec deleteSqlRoleAssignmentOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -3235,11 +3277,13 @@ export class SqlResourcesImpl implements SqlResources {
}, },
retrieveContinuousBackupInformationOperationSpec retrieveContinuousBackupInformationOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs, intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location" lroResourceLocationConfig: "location"
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -217,10 +217,12 @@ export class TableResourcesImpl implements TableResources {
}, },
createUpdateTableOperationSpec createUpdateTableOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -305,10 +307,12 @@ export class TableResourcesImpl implements TableResources {
{ resourceGroupName, accountName, tableName, options }, { resourceGroupName, accountName, tableName, options },
deleteTableOperationSpec deleteTableOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -424,10 +428,12 @@ export class TableResourcesImpl implements TableResources {
}, },
updateTableThroughputOperationSpec updateTableThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -518,10 +524,12 @@ export class TableResourcesImpl implements TableResources {
{ resourceGroupName, accountName, tableName, options }, { resourceGroupName, accountName, tableName, options },
migrateTableToAutoscaleOperationSpec migrateTableToAutoscaleOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -608,10 +616,12 @@ export class TableResourcesImpl implements TableResources {
{ resourceGroupName, accountName, tableName, options }, { resourceGroupName, accountName, tableName, options },
migrateTableToManualThroughputOperationSpec migrateTableToManualThroughputOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -702,11 +712,13 @@ export class TableResourcesImpl implements TableResources {
{ resourceGroupName, accountName, tableName, location, options }, { resourceGroupName, accountName, tableName, location, options },
retrieveContinuousBackupInformationOperationSpec retrieveContinuousBackupInformationOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs, intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location" lroResourceLocationConfig: "location"
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -1,5 +1,5 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger: trigger:
branches: branches:
include: include:
@ -8,9 +8,8 @@ trigger:
- hotfix/* - hotfix/*
paths: paths:
include: include:
- sdk/cosmosdb/arm-cosmosdb/
- sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/ci.mgmt.yml
- sdk/cosmosdb/arm-cosmosdb
pr: pr:
branches: branches:
include: include:
@ -19,16 +18,15 @@ pr:
- release/* - release/*
- hotfix/* - hotfix/*
exclude: exclude:
- feature/v4 - feature/v4
paths: paths:
include: include:
- sdk/cosmosdb/arm-cosmosdb/
- sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/ci.mgmt.yml
- sdk/cosmosdb/arm-cosmosdb
extends: extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters: parameters:
ServiceDirectory: cosmosdb ServiceDirectory: cosmosdb
Artifacts: Artifacts:
- name: azure-arm-cosmosdb - name: azure-arm-cosmosdb
safeName: azurearmcosmosdb safeName: azurearmcosmosdb

Просмотреть файл

@ -1,5 +1,5 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger: trigger:
branches: branches:
include: include:
@ -11,8 +11,8 @@ trigger:
- sdk/cosmosdb/cosmos/ - sdk/cosmosdb/cosmos/
- sdk/cosmosdb/ci.yml - sdk/cosmosdb/ci.yml
exclude: exclude:
- sdk/cosmosdb/arm-cosmosdb/
- sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/ci.mgmt.yml
- sdk/cosmosdb/arm-cosmosdb
pr: pr:
branches: branches:
include: include:
@ -25,14 +25,12 @@ pr:
- sdk/cosmosdb/cosmos/ - sdk/cosmosdb/cosmos/
- sdk/cosmosdb/ci.yml - sdk/cosmosdb/ci.yml
exclude: exclude:
- sdk/cosmosdb/arm-cosmosdb/
- sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/ci.mgmt.yml
- sdk/cosmosdb/arm-cosmosdb
extends: extends:
template: /eng/pipelines/templates/stages/cosmos-sdk-client.yml #NOTE: Non-standard template. template: /eng/pipelines/templates/stages/cosmos-sdk-client.yml
parameters: parameters:
ServiceDirectory: cosmosdb ServiceDirectory: cosmosdb
# Disable unit tests because they are no-op. Integration tests from the
# cosmos-specific template handle this testing.
RunUnitTests: false RunUnitTests: false
Artifacts: Artifacts:
- name: azure-cosmos - name: azure-cosmos

Просмотреть файл

@ -1,14 +1,10 @@
# Release History # Release History
## 4.0.1 (Unreleased) ## 4.0.1 (2022-04-15)
### Features Added **features**
### Breaking Changes - Bug fix
### Bugs Fixed
### Other Changes
## 4.0.0 (2022-01-12) ## 4.0.0 (2022-01-12)

Просмотреть файл

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -16,6 +16,8 @@ The Azure Customer Insights management API provides a RESTful set of web service
- [LTS versions of Node.js](https://nodejs.org/about/releases/) - [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox. - Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites ### Prerequisites
- An [Azure subscription][azure_sub]. - An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript ```javascript
const { CustomerInsightsManagementClient } = require("@azure/arm-customerinsights"); const { CustomerInsightsManagementClient } = require("@azure/arm-customerinsights");
const { DefaultAzureCredential } = require("@azure/identity"); const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000"; const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new CustomerInsightsManagementClient(new DefaultAzureCredential(), subscriptionId); const client = new CustomerInsightsManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new CustomerInsightsManagementClient(credential, subscriptionId);
``` ```

Просмотреть файл

@ -1,7 +1,8 @@
{ {
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247", "commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
"readme": "specification/customer-insights/resource-manager/readme.md", "readme": "specification\\customer-insights\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/customer-insights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\customer-insights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
} }

Просмотреть файл

@ -1,18 +1,31 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true }, "docModel": {
"apiReport": { "enabled": true, "reportFolder": "./review" }, "enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": { "dtsRollup": {
"enabled": true, "enabled": true,
"untrimmedFilePath": "", "untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-customerinsights.d.ts" "publicTrimmedFilePath": "./types/arm-customerinsights.d.ts"
}, },
"messages": { "messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } }, "tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": { "extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" }, "ae-missing-release-tag": {
"ae-unresolved-link": { "logLevel": "none" } "logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
} }
} }
} }

Просмотреть файл

@ -11,9 +11,9 @@
"@azure/core-lro": "^2.2.0", "@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0", "@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0", "@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0", "@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0", "@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0" "tslib": "^2.2.0"
}, },
"keywords": [ "keywords": [
@ -29,13 +29,13 @@
"types": "./types/arm-customerinsights.d.ts", "types": "./types/arm-customerinsights.d.ts",
"devDependencies": { "devDependencies": {
"@microsoft/api-extractor": "^7.18.11", "@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"rollup": "^1.16.3", "rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0", "typescript": "~4.2.0",
"uglify-js": "^3.4.9", "uglify-js": "^3.4.9",
"rimraf": "^3.0.0", "rimraf": "^3.0.0",
@ -98,5 +98,13 @@
"docs": "echo skipped" "docs": "echo skipped"
}, },
"sideEffects": false, "sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/customerInsightsManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true "autoPublish": true
} }

Просмотреть файл

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
import nodeBuiltins from "builtin-modules"; import nodeBuiltins from "builtin-modules";
/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler // #region Warning Handler
/** /**
* A function that can determine whether a rollupwarning should be ignored. If * A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed. * the function returns `true`, then the warning will not be displayed.
*/ */
function ignoreNiseSinonEvalWarnings(warning) { function ignoreNiseSinonEval(warning) {
return ( return (
warning.code === "EVAL" && warning.code === "EVAL" &&
warning.id && warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
); );
} }
function ignoreChaiCircularDependencyWarnings(warning) { function ignoreChaiCircularDependency(warning) {
return ( return (
warning.code === "CIRCULAR_DEPENDENCY" && warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true warning.importer && warning.importer.includes("node_modules/chai") === true
); );
} }
const warningInhibitors = [ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
/** /**
* Construct a warning handler for the shared rollup configuration * Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({ nodeResolve({
mainFields: ["module", "browser"] mainFields: ["module", "browser"]
}), }),
cjs({ cjs(),
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
json(), json(),
sourcemaps() sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
], ],
output: { file: "dist/index.js", format: "cjs", sourcemap: true }, output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false, preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()] plugins: [sourcemaps(), nodeResolve()]
}; };
const config = [baseConfig]; const config = [baseConfig];

Просмотреть файл

@ -7,6 +7,7 @@
*/ */
import * as coreClient from "@azure/core-client"; import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth"; import * as coreAuth from "@azure/core-auth";
import { import {
OperationsImpl, OperationsImpl,
@ -81,7 +82,7 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
credential: credentials credential: credentials
}; };
const packageDetails = `azsdk-js-arm-customerinsights/4.0.0`; const packageDetails = `azsdk-js-arm-customerinsights/4.0.1`;
const userAgentPrefix = const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@ -96,9 +97,33 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
userAgentOptions: { userAgentOptions: {
userAgentPrefix userAgentPrefix
}, },
baseUri: options.endpoint || "https://management.azure.com" baseUri:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
}; };
super(optionsWithDefaults); super(optionsWithDefaults);
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments // Parameter assignments
this.subscriptionId = subscriptionId; this.subscriptionId = subscriptionId;

Просмотреть файл

@ -163,10 +163,12 @@ export class ConnectorsImpl implements Connectors {
{ resourceGroupName, hubName, connectorName, parameters, options }, { resourceGroupName, hubName, connectorName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -270,10 +272,12 @@ export class ConnectorsImpl implements Connectors {
{ resourceGroupName, hubName, connectorName, options }, { resourceGroupName, hubName, connectorName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -234,10 +234,12 @@ export class HubsImpl implements Hubs {
{ resourceGroupName, hubName, options }, { resourceGroupName, hubName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -164,10 +164,12 @@ export class InteractionsImpl implements Interactions {
{ resourceGroupName, hubName, interactionName, parameters, options }, { resourceGroupName, hubName, interactionName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -164,10 +164,12 @@ export class KpiImpl implements Kpi {
{ resourceGroupName, hubName, kpiName, parameters, options }, { resourceGroupName, hubName, kpiName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -271,10 +273,12 @@ export class KpiImpl implements Kpi {
{ resourceGroupName, hubName, kpiName, options }, { resourceGroupName, hubName, kpiName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -163,10 +163,12 @@ export class LinksImpl implements Links {
{ resourceGroupName, hubName, linkName, parameters, options }, { resourceGroupName, hubName, linkName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -169,10 +169,12 @@ export class PredictionsImpl implements Predictions {
{ resourceGroupName, hubName, predictionName, parameters, options }, { resourceGroupName, hubName, predictionName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -276,10 +278,12 @@ export class PredictionsImpl implements Predictions {
{ resourceGroupName, hubName, predictionName, options }, { resourceGroupName, hubName, predictionName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -165,10 +165,12 @@ export class ProfilesImpl implements Profiles {
{ resourceGroupName, hubName, profileName, parameters, options }, { resourceGroupName, hubName, profileName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -272,10 +274,12 @@ export class ProfilesImpl implements Profiles {
{ resourceGroupName, hubName, profileName, options }, { resourceGroupName, hubName, profileName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -163,10 +163,12 @@ export class RelationshipLinksImpl implements RelationshipLinks {
{ resourceGroupName, hubName, relationshipLinkName, parameters, options }, { resourceGroupName, hubName, relationshipLinkName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -270,10 +272,12 @@ export class RelationshipLinksImpl implements RelationshipLinks {
{ resourceGroupName, hubName, relationshipLinkName, options }, { resourceGroupName, hubName, relationshipLinkName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -163,10 +163,12 @@ export class RelationshipsImpl implements Relationships {
{ resourceGroupName, hubName, relationshipName, parameters, options }, { resourceGroupName, hubName, relationshipName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**
@ -270,10 +272,12 @@ export class RelationshipsImpl implements Relationships {
{ resourceGroupName, hubName, relationshipName, options }, { resourceGroupName, hubName, relationshipName, options },
deleteOperationSpec deleteOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -180,10 +180,12 @@ export class RoleAssignmentsImpl implements RoleAssignments {
{ resourceGroupName, hubName, assignmentName, parameters, options }, { resourceGroupName, hubName, assignmentName, parameters, options },
createOrUpdateOperationSpec createOrUpdateOperationSpec
); );
return new LroEngine(lro, { const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom, resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs intervalInMs: options?.updateIntervalInMs
}); });
await poller.poll();
return poller;
} }
/** /**

Просмотреть файл

@ -9,11 +9,19 @@
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"], "lib": [
"es6",
"dom"
],
"declaration": true, "declaration": true,
"outDir": "./dist-esm", "outDir": "./dist-esm",
"importHelpers": true "importHelpers": true
}, },
"include": ["./src/**/*.ts", "./test/**/*.ts"], "include": [
"exclude": ["node_modules"] "./src/**/*.ts",
} "./test/**/*.ts"
],
"exclude": [
"node_modules"
]
}

Просмотреть файл

@ -1,5 +1,5 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger: trigger:
branches: branches:
include: include:
@ -9,7 +9,7 @@ trigger:
paths: paths:
include: include:
- sdk/customer-insights/ci.mgmt.yml - sdk/customer-insights/ci.mgmt.yml
- sdk/customer-insights/arm-customerinsights/ - sdk/customer-insights/arm-customerinsights
pr: pr:
branches: branches:
include: include:
@ -22,12 +22,11 @@ pr:
paths: paths:
include: include:
- sdk/customer-insights/ci.mgmt.yml - sdk/customer-insights/ci.mgmt.yml
- sdk/customer-insights/arm-customerinsights/ - sdk/customer-insights/arm-customerinsights
extends: extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters: parameters:
ServiceDirectory: customer-insights ServiceDirectory: customer-insights
Artifacts: Artifacts:
- name: azure-arm-customerinsights - name: azure-arm-customerinsights
safeName: azurearmcustomerinsights safeName: azurearmcustomerinsights

Просмотреть файл

@ -1,18 +1,8 @@
# Release History # Release History
## 5.0.0-beta.2 (2022-04-15)
## 5.0.0-beta.2 (Unreleased) The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.2, which contains breaking changes.
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
## 5.0.0-beta.1 (2022-01-12)
The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.1, which contains breaking changes.
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

Просмотреть файл

@ -16,6 +16,8 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
- [LTS versions of Node.js](https://nodejs.org/about/releases/) - [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox. - Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites ### Prerequisites
- An [Azure subscription][azure_sub]. - An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript ```javascript
const { DataBoxManagementClient } = require("@azure/arm-databox"); const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity"); const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000"; const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new DataBoxManagementClient(new DefaultAzureCredential(), subscriptionId); const client = new DataBoxManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new DataBoxManagementClient(credential, subscriptionId);
``` ```

Просмотреть файл

@ -1,7 +1,8 @@
{ {
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247", "commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
"readme": "specification/databox/resource-manager/readme.md", "readme": "specification\\databox\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/databox/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\databox\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
} }

Просмотреть файл

@ -1,18 +1,31 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true }, "docModel": {
"apiReport": { "enabled": true, "reportFolder": "./review" }, "enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": { "dtsRollup": {
"enabled": true, "enabled": true,
"untrimmedFilePath": "", "untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-databox.d.ts" "publicTrimmedFilePath": "./types/arm-databox.d.ts"
}, },
"messages": { "messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } }, "tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": { "extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" }, "ae-missing-release-tag": {
"ae-unresolved-link": { "logLevel": "none" } "logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
} }
} }
} }

Просмотреть файл

@ -11,9 +11,9 @@
"@azure/core-lro": "^2.2.0", "@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0", "@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0", "@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0", "@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0", "@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0" "tslib": "^2.2.0"
}, },
"keywords": [ "keywords": [
@ -29,13 +29,13 @@
"types": "./types/arm-databox.d.ts", "types": "./types/arm-databox.d.ts",
"devDependencies": { "devDependencies": {
"@microsoft/api-extractor": "^7.18.11", "@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"rollup": "^1.16.3", "rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0", "typescript": "~4.2.0",
"uglify-js": "^3.4.9", "uglify-js": "^3.4.9",
"rimraf": "^3.0.0", "rimraf": "^3.0.0",
@ -98,5 +98,21 @@
"docs": "echo skipped" "docs": "echo skipped"
}, },
"sideEffects": false, "sideEffects": false,
"autoPublish": true "//metadata": {
} "constantPaths": [
{
"path": "src/dataBoxManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview"
}
}

Просмотреть файл

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
import nodeBuiltins from "builtin-modules"; import nodeBuiltins from "builtin-modules";
/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler // #region Warning Handler
/** /**
* A function that can determine whether a rollupwarning should be ignored. If * A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed. * the function returns `true`, then the warning will not be displayed.
*/ */
function ignoreNiseSinonEvalWarnings(warning) { function ignoreNiseSinonEval(warning) {
return ( return (
warning.code === "EVAL" && warning.code === "EVAL" &&
warning.id && warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
); );
} }
function ignoreChaiCircularDependencyWarnings(warning) { function ignoreChaiCircularDependency(warning) {
return ( return (
warning.code === "CIRCULAR_DEPENDENCY" && warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true warning.importer && warning.importer.includes("node_modules/chai") === true
); );
} }
const warningInhibitors = [ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
/** /**
* Construct a warning handler for the shared rollup configuration * Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({ nodeResolve({
mainFields: ["module", "browser"] mainFields: ["module", "browser"]
}), }),
cjs({ cjs(),
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
json(), json(),
sourcemaps() sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
], ],
output: { file: "dist/index.js", format: "cjs", sourcemap: true }, output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false, preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()] plugins: [sourcemaps(), nodeResolve()]
}; };
const config = [baseConfig]; const config = [baseConfig];

Просмотреть файл

@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
ShipmentPickUpRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Book shipment pick up.
*
* @summary Book shipment pick up.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/BookShipmentPickupPost.json
*/
async function bookShipmentPickupPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const shipmentPickUpRequest: ShipmentPickUpRequest = {
endTime: new Date("2019-09-22T18:30:00Z"),
shipmentLocation: "Front desk",
startTime: new Date("2019-09-20T18:30:00Z")
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.bookShipmentPickUp(
resourceGroupName,
jobName,
shipmentPickUpRequest
);
console.log(result);
}
bookShipmentPickupPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CancellationReason,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to CancelJob.
*
* @summary CancelJob.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCancelPost.json
*/
async function jobsCancelPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const cancellationReason: CancellationReason = { reason: "CancelTest" };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.cancel(
resourceGroupName,
jobName,
cancellationReason
);
console.log(result);
}
jobsCancelPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,306 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { JobResource, DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreate.json
*/
async function jobsCreate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreate().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDevicePassword.json
*/
async function jobsCreateDevicePassword() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7478";
const jobName = "SdkJob9640";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
sharePassword: "<sharePassword>",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"
}
}
],
devicePassword: "<devicePassword>",
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateDevicePassword().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDoubleEncryption.json
*/
async function jobsCreateDoubleEncryption() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg608";
const jobName = "SdkJob6599";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
jobDetailsType: "DataBox",
preferences: { encryptionPreferences: { doubleEncryption: "Enabled" } },
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateDoubleEncryption().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateExport.json
*/
async function jobsCreateExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ExportFromAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataExportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2"
},
transferConfiguration: {
transferAllDetails: {
include: {
dataAccountType: "StorageAccount",
transferAllBlobs: true,
transferAllFiles: true
}
},
transferConfigurationType: "TransferAll"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateExport().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateWithUserAssignedIdentity.json
*/
async function jobsCreateWithUserAssignedIdentity() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7552";
const jobName = "SdkJob5337";
const jobResource: JobResource = {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity": {}
}
},
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateWithUserAssignedIdentity().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Deletes a job.
*
* @summary Deletes a job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsDelete.json
*/
async function jobsDelete() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginDeleteAndWait(
resourceGroupName,
jobName
);
console.log(result);
}
jobsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,115 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
JobsGetOptionalParams,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGet.json
*/
async function jobsGet() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGet().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCmk.json
*/
async function jobsGetCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCmk().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCopyStuck.json
*/
async function jobsGetCopyStuck() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCopyStuck().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetExport.json
*/
async function jobsGetExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetExport().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetWaitingForAction.json
*/
async function jobsGetWaitingForAction() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetWaitingForAction().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all the jobs available under the given resource group.
*
* @summary Lists all the jobs available under the given resource group.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListByResourceGroup.json
*/
async function jobsListByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method gets the unencrypted secrets related to the job.
*
* @summary This method gets the unencrypted secrets related to the job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListCredentials.json
*/
async function jobsListCredentials() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listCredentials(
resourceGroupName,
jobName
)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListCredentials().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all the jobs available under the subscription.
*
* @summary Lists all the jobs available under the subscription.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsList.json
*/
async function jobsList() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.list()) {
resArray.push(item);
}
console.log(resArray);
}
jobsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
MarkDevicesShippedRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Request to mark devices for a given job as shipped
*
* @summary Request to mark devices for a given job as shipped
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/MarkDevicesShipped.json
*/
async function markDevicesShipped() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const markDevicesShippedRequest: MarkDevicesShippedRequest = {
deliverToDcPackageDetails: { carrierName: "DHL", trackingId: "123456" }
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.markDevicesShipped(
jobName,
resourceGroupName,
markDevicesShippedRequest
);
console.log(result);
}
markDevicesShipped().catch(console.error);

Просмотреть файл

@ -0,0 +1,134 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 {
JobResourceUpdateParameter,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatch.json
*/
async function jobsPatch() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
details: {
contactDetails: {
contactName: "Update Job",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatch().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchCmk.json
*/
async function jobsPatchCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
details: {
keyEncryptionKey: {
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchCmk().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchSystemAssignedToUserAssigned.json
*/
async function jobsPatchSystemAssignedToUserAssigned() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg9765";
const jobName = "SdkJob2965";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
identity: {
type: "SystemAssigned,UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity": {}
}
},
details: {
keyEncryptionKey: {
identityProperties: {
type: "UserAssigned",
userAssigned: {
resourceId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity"
}
},
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchSystemAssignedToUserAssigned().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
MitigateJobRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Request to mitigate for a given job
*
* @summary Request to mitigate for a given job
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobMitigate.json
*/
async function mitigate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const mitigateJobRequest: MitigateJobRequest = {
customerResolutionCode: "MoveToCleanUpDevice"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.mitigate(
jobName,
resourceGroupName,
mitigateJobRequest
);
console.log(result);
}
mitigate().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method gets all the operations.
*
* @summary This method gets all the operations.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/OperationsGet.json
*/
async function operationsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AvailableSkuRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method provides the list of available skus for the given subscription, resource group and location.
*
* @summary This method provides the list of available skus for the given subscription, resource group and location.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/AvailableSkusPost.json
*/
async function availableSkusPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const location = "westus";
const availableSkuRequest: AvailableSkuRequest = {
country: "US",
location: "westus",
transferType: "ImportToAzure"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.service.listAvailableSkusByResourceGroup(
resourceGroupName,
location,
availableSkuRequest
)) {
resArray.push(item);
}
console.log(resArray);
}
availableSkusPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
RegionConfigurationRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This API provides configuration details specific to given region/location at Resource group level.
*
* @summary This API provides configuration details specific to given region/location at Resource group level.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfigurationByResourceGroup.json
*/
async function regionConfigurationByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg4981";
const location = "westus";
const regionConfigurationRequest: RegionConfigurationRequest = {
scheduleAvailabilityRequest: {
skuName: "DataBox",
storageLocation: "westus"
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.regionConfigurationByResourceGroup(
resourceGroupName,
location,
regionConfigurationRequest
);
console.log(result);
}
regionConfigurationByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 {
RegionConfigurationRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This API provides configuration details specific to given region/location at Subscription level.
*
* @summary This API provides configuration details specific to given region/location at Subscription level.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfiguration.json
*/
async function regionConfiguration() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const regionConfigurationRequest: RegionConfigurationRequest = {
scheduleAvailabilityRequest: {
skuName: "DataBox",
storageLocation: "westus"
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.regionConfiguration(
location,
regionConfigurationRequest
);
console.log(result);
}
regionConfiguration().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 { ValidateAddress, DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any.
*
* @summary [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateAddressPost.json
*/
async function validateAddressPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const validateAddress: ValidateAddress = {
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
},
validationType: "ValidateAddress"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateAddress(
location,
validateAddress
);
console.log(result);
}
validateAddressPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,87 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 {
CreateJobValidations,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method does all necessary pre-job creation validation under resource group.
*
* @summary This method does all necessary pre-job creation validation under resource group.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputsByResourceGroup.json
*/
async function validateInputsByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg6861";
const location = "westus";
const validationRequest: CreateJobValidations = {
individualRequestDetails: [
{
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
deviceType: "DataBox",
transferType: "ImportToAzure",
validationType: "ValidateDataTransferDetails"
},
{
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
},
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
validationType: "ValidateAddress"
},
{ validationType: "ValidateSubscriptionIsAllowedToCreateJob" },
{
country: "US",
deviceType: "DataBox",
location: "westus",
transferType: "ImportToAzure",
validationType: "ValidateSkuAvailability"
},
{ deviceType: "DataBox", validationType: "ValidateCreateOrderLimit" },
{
deviceType: "DataBox",
preference: {
transportPreferences: { preferredShipmentType: "MicrosoftManaged" }
},
validationType: "ValidatePreferences"
}
],
validationCategory: "JobCreationValidation"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateInputsByResourceGroup(
resourceGroupName,
location,
validationRequest
);
console.log(result);
}
validateInputsByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,85 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CreateJobValidations,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method does all necessary pre-job creation validation under subscription.
*
* @summary This method does all necessary pre-job creation validation under subscription.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputs.json
*/
async function validateInputs() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const validationRequest: CreateJobValidations = {
individualRequestDetails: [
{
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
deviceType: "DataBox",
transferType: "ImportToAzure",
validationType: "ValidateDataTransferDetails"
},
{
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
},
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
validationType: "ValidateAddress"
},
{ validationType: "ValidateSubscriptionIsAllowedToCreateJob" },
{
country: "US",
deviceType: "DataBox",
location: "westus",
transferType: "ImportToAzure",
validationType: "ValidateSkuAvailability"
},
{ deviceType: "DataBox", validationType: "ValidateCreateOrderLimit" },
{
deviceType: "DataBox",
preference: {
transportPreferences: { preferredShipmentType: "MicrosoftManaged" }
},
validationType: "ValidatePreferences"
}
],
validationCategory: "JobCreationValidation"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateInputs(
location,
validationRequest
);
console.log(result);
}
validateInputs().catch(console.error);

Просмотреть файл

@ -0,0 +1,84 @@
# client library samples for JavaScript (Beta)
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [jobsBookShipmentPickUpSample.js][jobsbookshipmentpickupsample] | Book shipment pick up. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/BookShipmentPickupPost.json |
| [jobsCancelSample.js][jobscancelsample] | CancelJob. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCancelPost.json |
| [jobsCreateSample.js][jobscreatesample] | Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreate.json |
| [jobsDeleteSample.js][jobsdeletesample] | Deletes a job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsDelete.json |
| [jobsGetSample.js][jobsgetsample] | Gets information about the specified job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGet.json |
| [jobsListByResourceGroupSample.js][jobslistbyresourcegroupsample] | Lists all the jobs available under the given resource group. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListByResourceGroup.json |
| [jobsListCredentialsSample.js][jobslistcredentialssample] | This method gets the unencrypted secrets related to the job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListCredentials.json |
| [jobsListSample.js][jobslistsample] | Lists all the jobs available under the subscription. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsList.json |
| [jobsMarkDevicesShippedSample.js][jobsmarkdevicesshippedsample] | Request to mark devices for a given job as shipped x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/MarkDevicesShipped.json |
| [jobsUpdateSample.js][jobsupdatesample] | Updates the properties of an existing job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatch.json |
| [mitigateSample.js][mitigatesample] | Request to mitigate for a given job x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobMitigate.json |
| [operationsListSample.js][operationslistsample] | This method gets all the operations. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/OperationsGet.json |
| [serviceListAvailableSkusByResourceGroupSample.js][servicelistavailableskusbyresourcegroupsample] | This method provides the list of available skus for the given subscription, resource group and location. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/AvailableSkusPost.json |
| [serviceRegionConfigurationByResourceGroupSample.js][serviceregionconfigurationbyresourcegroupsample] | This API provides configuration details specific to given region/location at Resource group level. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfigurationByResourceGroup.json |
| [serviceRegionConfigurationSample.js][serviceregionconfigurationsample] | This API provides configuration details specific to given region/location at Subscription level. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfiguration.json |
| [serviceValidateAddressSample.js][servicevalidateaddresssample] | [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateAddressPost.json |
| [serviceValidateInputsByResourceGroupSample.js][servicevalidateinputsbyresourcegroupsample] | This method does all necessary pre-job creation validation under resource group. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputsByResourceGroup.json |
| [serviceValidateInputsSample.js][servicevalidateinputssample] | This method does all necessary pre-job creation validation under subscription. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputs.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node jobsBookShipmentPickUpSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env node jobsBookShipmentPickUpSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[jobsbookshipmentpickupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsBookShipmentPickUpSample.js
[jobscancelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsCancelSample.js
[jobscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsCreateSample.js
[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsDeleteSample.js
[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsGetSample.js
[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsListByResourceGroupSample.js
[jobslistcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsListCredentialsSample.js
[jobslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsListSample.js
[jobsmarkdevicesshippedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsMarkDevicesShippedSample.js
[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/jobsUpdateSample.js
[mitigatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/mitigateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/operationsListSample.js
[servicelistavailableskusbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceListAvailableSkusByResourceGroupSample.js
[serviceregionconfigurationbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceRegionConfigurationByResourceGroupSample.js
[serviceregionconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceRegionConfigurationSample.js
[servicevalidateaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceValidateAddressSample.js
[servicevalidateinputsbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceValidateInputsByResourceGroupSample.js
[servicevalidateinputssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/javascript/serviceValidateInputsSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox/README.md

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Book shipment pick up.
*
* @summary Book shipment pick up.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/BookShipmentPickupPost.json
*/
async function bookShipmentPickupPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const shipmentPickUpRequest = {
endTime: new Date("2019-09-22T18:30:00Z"),
shipmentLocation: "Front desk",
startTime: new Date("2019-09-20T18:30:00Z"),
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.bookShipmentPickUp(
resourceGroupName,
jobName,
shipmentPickUpRequest
);
console.log(result);
}
bookShipmentPickupPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to CancelJob.
*
* @summary CancelJob.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCancelPost.json
*/
async function jobsCancelPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const cancellationReason = { reason: "CancelTest" };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.cancel(resourceGroupName, jobName, cancellationReason);
console.log(result);
}
jobsCancelPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,287 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreate.json
*/
async function jobsCreate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount",
},
},
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(resourceGroupName, jobName, jobResource);
console.log(result);
}
jobsCreate().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDevicePassword.json
*/
async function jobsCreateDevicePassword() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7478";
const jobName = "SdkJob9640";
const jobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
sharePassword: "<sharePassword>",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2",
},
},
],
devicePassword: "<devicePassword>",
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(resourceGroupName, jobName, jobResource);
console.log(result);
}
jobsCreateDevicePassword().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDoubleEncryption.json
*/
async function jobsCreateDoubleEncryption() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg608";
const jobName = "SdkJob6599";
const jobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount",
},
},
],
jobDetailsType: "DataBox",
preferences: { encryptionPreferences: { doubleEncryption: "Enabled" } },
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(resourceGroupName, jobName, jobResource);
console.log(result);
}
jobsCreateDoubleEncryption().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateExport.json
*/
async function jobsCreateExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const jobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ExportFromAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
dataExportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2",
},
transferConfiguration: {
transferAllDetails: {
include: {
dataAccountType: "StorageAccount",
transferAllBlobs: true,
transferAllFiles: true,
},
},
transferConfigurationType: "TransferAll",
},
},
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(resourceGroupName, jobName, jobResource);
console.log(result);
}
jobsCreateExport().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateWithUserAssignedIdentity.json
*/
async function jobsCreateWithUserAssignedIdentity() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7552";
const jobName = "SdkJob5337";
const jobResource = {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity":
{},
},
},
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2",
},
},
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(resourceGroupName, jobName, jobResource);
console.log(result);
}
jobsCreateWithUserAssignedIdentity().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a job.
*
* @summary Deletes a job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsDelete.json
*/
async function jobsDelete() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginDeleteAndWait(resourceGroupName, jobName);
console.log(result);
}
jobsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,112 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGet.json
*/
async function jobsGet() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const expand = "details";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGet().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCmk.json
*/
async function jobsGetCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const expand = "details";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCmk().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCopyStuck.json
*/
async function jobsGetCopyStuck() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCopyStuck().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetExport.json
*/
async function jobsGetExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const expand = "details";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetExport().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetWaitingForAction.json
*/
async function jobsGetWaitingForAction() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetWaitingForAction().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists all the jobs available under the given resource group.
*
* @summary Lists all the jobs available under the given resource group.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListByResourceGroup.json
*/
async function jobsListByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This method gets the unencrypted secrets related to the job.
*
* @summary This method gets the unencrypted secrets related to the job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListCredentials.json
*/
async function jobsListCredentials() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listCredentials(resourceGroupName, jobName)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListCredentials().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists all the jobs available under the subscription.
*
* @summary Lists all the jobs available under the subscription.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsList.json
*/
async function jobsList() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.list()) {
resArray.push(item);
}
console.log(resArray);
}
jobsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Request to mark devices for a given job as shipped
*
* @summary Request to mark devices for a given job as shipped
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/MarkDevicesShipped.json
*/
async function markDevicesShipped() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const markDevicesShippedRequest = {
deliverToDcPackageDetails: { carrierName: "DHL", trackingId: "123456" },
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.markDevicesShipped(
jobName,
resourceGroupName,
markDevicesShippedRequest
);
console.log(result);
}
markDevicesShipped().catch(console.error);

Просмотреть файл

@ -0,0 +1,132 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatch.json
*/
async function jobsPatch() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResourceUpdateParameter = {
details: {
contactDetails: {
contactName: "Update Job",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234",
},
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatch().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchCmk.json
*/
async function jobsPatchCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const jobResourceUpdateParameter = {
details: {
keyEncryptionKey: {
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchCmk().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchSystemAssignedToUserAssigned.json
*/
async function jobsPatchSystemAssignedToUserAssigned() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg9765";
const jobName = "SdkJob2965";
const jobResourceUpdateParameter = {
identity: {
type: "SystemAssigned,UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity":
{},
},
},
details: {
keyEncryptionKey: {
identityProperties: {
type: "UserAssigned",
userAssigned: {
resourceId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity",
},
},
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault",
},
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchSystemAssignedToUserAssigned().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Request to mitigate for a given job
*
* @summary Request to mitigate for a given job
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobMitigate.json
*/
async function mitigate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const mitigateJobRequest = {
customerResolutionCode: "MoveToCleanUpDevice",
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.mitigate(jobName, resourceGroupName, mitigateJobRequest);
console.log(result);
}
mitigate().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This method gets all the operations.
*
* @summary This method gets all the operations.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/OperationsGet.json
*/
async function operationsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
{
"name": "@azure-samples/arm-databox-js-beta",
"private": true,
"version": "1.0.0",
"description": " client library samples for JavaScript (Beta)",
"engines": {
"node": ">=12.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
"directory": "sdk/databox/arm-databox"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox",
"dependencies": {
"@azure/arm-databox": "next",
"dotenv": "latest",
"@azure/identity": "^2.0.1"
}
}

Просмотреть файл

@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This method provides the list of available skus for the given subscription, resource group and location.
*
* @summary This method provides the list of available skus for the given subscription, resource group and location.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/AvailableSkusPost.json
*/
async function availableSkusPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const location = "westus";
const availableSkuRequest = {
country: "US",
location: "westus",
transferType: "ImportToAzure",
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.service.listAvailableSkusByResourceGroup(
resourceGroupName,
location,
availableSkuRequest
)) {
resArray.push(item);
}
console.log(resArray);
}
availableSkusPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This API provides configuration details specific to given region/location at Resource group level.
*
* @summary This API provides configuration details specific to given region/location at Resource group level.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfigurationByResourceGroup.json
*/
async function regionConfigurationByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg4981";
const location = "westus";
const regionConfigurationRequest = {
scheduleAvailabilityRequest: {
skuName: "DataBox",
storageLocation: "westus",
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.regionConfigurationByResourceGroup(
resourceGroupName,
location,
regionConfigurationRequest
);
console.log(result);
}
regionConfigurationByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This API provides configuration details specific to given region/location at Subscription level.
*
* @summary This API provides configuration details specific to given region/location at Subscription level.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfiguration.json
*/
async function regionConfiguration() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const regionConfigurationRequest = {
scheduleAvailabilityRequest: {
skuName: "DataBox",
storageLocation: "westus",
},
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.regionConfiguration(location, regionConfigurationRequest);
console.log(result);
}
regionConfiguration().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any.
*
* @summary [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateAddressPost.json
*/
async function validateAddressPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const validateAddress = {
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
validationType: "ValidateAddress",
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateAddress(location, validateAddress);
console.log(result);
}
validateAddressPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,84 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This method does all necessary pre-job creation validation under resource group.
*
* @summary This method does all necessary pre-job creation validation under resource group.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputsByResourceGroup.json
*/
async function validateInputsByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg6861";
const location = "westus";
const validationRequest = {
individualRequestDetails: [
{
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount",
},
},
],
deviceType: "DataBox",
transferType: "ImportToAzure",
validationType: "ValidateDataTransferDetails",
},
{
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
validationType: "ValidateAddress",
},
{ validationType: "ValidateSubscriptionIsAllowedToCreateJob" },
{
country: "US",
deviceType: "DataBox",
location: "westus",
transferType: "ImportToAzure",
validationType: "ValidateSkuAvailability",
},
{ deviceType: "DataBox", validationType: "ValidateCreateOrderLimit" },
{
deviceType: "DataBox",
preference: {
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
},
validationType: "ValidatePreferences",
},
],
validationCategory: "JobCreationValidation",
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateInputsByResourceGroup(
resourceGroupName,
location,
validationRequest
);
console.log(result);
}
validateInputsByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,79 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DataBoxManagementClient } = require("@azure/arm-databox");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This method does all necessary pre-job creation validation under subscription.
*
* @summary This method does all necessary pre-job creation validation under subscription.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputs.json
*/
async function validateInputs() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const location = "westus";
const validationRequest = {
individualRequestDetails: [
{
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount",
},
},
],
deviceType: "DataBox",
transferType: "ImportToAzure",
validationType: "ValidateDataTransferDetails",
},
{
deviceType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1",
},
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
validationType: "ValidateAddress",
},
{ validationType: "ValidateSubscriptionIsAllowedToCreateJob" },
{
country: "US",
deviceType: "DataBox",
location: "westus",
transferType: "ImportToAzure",
validationType: "ValidateSkuAvailability",
},
{ deviceType: "DataBox", validationType: "ValidateCreateOrderLimit" },
{
deviceType: "DataBox",
preference: {
transportPreferences: { preferredShipmentType: "MicrosoftManaged" },
},
validationType: "ValidatePreferences",
},
],
validationCategory: "JobCreationValidation",
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.service.validateInputs(location, validationRequest);
console.log(result);
}
validateInputs().catch(console.error);

Просмотреть файл

@ -0,0 +1,97 @@
# client library samples for TypeScript (Beta)
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [jobsBookShipmentPickUpSample.ts][jobsbookshipmentpickupsample] | Book shipment pick up. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/BookShipmentPickupPost.json |
| [jobsCancelSample.ts][jobscancelsample] | CancelJob. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCancelPost.json |
| [jobsCreateSample.ts][jobscreatesample] | Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreate.json |
| [jobsDeleteSample.ts][jobsdeletesample] | Deletes a job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsDelete.json |
| [jobsGetSample.ts][jobsgetsample] | Gets information about the specified job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGet.json |
| [jobsListByResourceGroupSample.ts][jobslistbyresourcegroupsample] | Lists all the jobs available under the given resource group. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListByResourceGroup.json |
| [jobsListCredentialsSample.ts][jobslistcredentialssample] | This method gets the unencrypted secrets related to the job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListCredentials.json |
| [jobsListSample.ts][jobslistsample] | Lists all the jobs available under the subscription. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsList.json |
| [jobsMarkDevicesShippedSample.ts][jobsmarkdevicesshippedsample] | Request to mark devices for a given job as shipped x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/MarkDevicesShipped.json |
| [jobsUpdateSample.ts][jobsupdatesample] | Updates the properties of an existing job. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatch.json |
| [mitigateSample.ts][mitigatesample] | Request to mitigate for a given job x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobMitigate.json |
| [operationsListSample.ts][operationslistsample] | This method gets all the operations. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/OperationsGet.json |
| [serviceListAvailableSkusByResourceGroupSample.ts][servicelistavailableskusbyresourcegroupsample] | This method provides the list of available skus for the given subscription, resource group and location. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/AvailableSkusPost.json |
| [serviceRegionConfigurationByResourceGroupSample.ts][serviceregionconfigurationbyresourcegroupsample] | This API provides configuration details specific to given region/location at Resource group level. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfigurationByResourceGroup.json |
| [serviceRegionConfigurationSample.ts][serviceregionconfigurationsample] | This API provides configuration details specific to given region/location at Subscription level. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/RegionConfiguration.json |
| [serviceValidateAddressSample.ts][servicevalidateaddresssample] | [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and provide alternate addresses if any. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateAddressPost.json |
| [serviceValidateInputsByResourceGroupSample.ts][servicevalidateinputsbyresourcegroupsample] | This method does all necessary pre-job creation validation under resource group. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputsByResourceGroup.json |
| [serviceValidateInputsSample.ts][servicevalidateinputssample] | This method does all necessary pre-job creation validation under subscription. x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/ValidateInputs.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
```bash
npm install -g typescript
```
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Compile the samples:
```bash
npm run build
```
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node dist/jobsBookShipmentPickUpSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env node dist/jobsBookShipmentPickUpSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[jobsbookshipmentpickupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsBookShipmentPickUpSample.ts
[jobscancelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsCancelSample.ts
[jobscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsCreateSample.ts
[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsDeleteSample.ts
[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsGetSample.ts
[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsListByResourceGroupSample.ts
[jobslistcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsListCredentialsSample.ts
[jobslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsListSample.ts
[jobsmarkdevicesshippedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsMarkDevicesShippedSample.ts
[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/jobsUpdateSample.ts
[mitigatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/mitigateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/operationsListSample.ts
[servicelistavailableskusbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceListAvailableSkusByResourceGroupSample.ts
[serviceregionconfigurationbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceRegionConfigurationByResourceGroupSample.ts
[serviceregionconfigurationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceRegionConfigurationSample.ts
[servicevalidateaddresssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceValidateAddressSample.ts
[servicevalidateinputsbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceValidateInputsByResourceGroupSample.ts
[servicevalidateinputssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/databox/arm-databox/samples/v5-beta/typescript/src/serviceValidateInputsSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html

Просмотреть файл

@ -0,0 +1,41 @@
{
"name": "@azure-samples/arm-databox-ts-beta",
"private": true,
"version": "1.0.0",
"description": " client library samples for TypeScript (Beta)",
"engines": {
"node": ">=12.0.0"
},
"scripts": {
"build": "tsc",
"prebuild": "rimraf dist/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
"directory": "sdk/databox/arm-databox"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox",
"dependencies": {
"@azure/arm-databox": "next",
"dotenv": "latest",
"@azure/identity": "^2.0.1"
},
"devDependencies": {
"@types/node": "^12.0.0",
"typescript": "~4.4.0",
"rimraf": "latest"
}
}

Просмотреть файл

@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
ShipmentPickUpRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Book shipment pick up.
*
* @summary Book shipment pick up.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/BookShipmentPickupPost.json
*/
async function bookShipmentPickupPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const shipmentPickUpRequest: ShipmentPickUpRequest = {
endTime: new Date("2019-09-22T18:30:00Z"),
shipmentLocation: "Front desk",
startTime: new Date("2019-09-20T18:30:00Z")
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.bookShipmentPickUp(
resourceGroupName,
jobName,
shipmentPickUpRequest
);
console.log(result);
}
bookShipmentPickupPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CancellationReason,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to CancelJob.
*
* @summary CancelJob.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCancelPost.json
*/
async function jobsCancelPost() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const cancellationReason: CancellationReason = { reason: "CancelTest" };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.cancel(
resourceGroupName,
jobName,
cancellationReason
);
console.log(result);
}
jobsCancelPost().catch(console.error);

Просмотреть файл

@ -0,0 +1,306 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { JobResource, DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreate.json
*/
async function jobsCreate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreate().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDevicePassword.json
*/
async function jobsCreateDevicePassword() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7478";
const jobName = "SdkJob9640";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
sharePassword: "<sharePassword>",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"
}
}
],
devicePassword: "<devicePassword>",
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateDevicePassword().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateDoubleEncryption.json
*/
async function jobsCreateDoubleEncryption() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg608";
const jobName = "SdkJob6599";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"
}
}
],
jobDetailsType: "DataBox",
preferences: { encryptionPreferences: { doubleEncryption: "Enabled" } },
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateDoubleEncryption().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateExport.json
*/
async function jobsCreateExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const jobResource: JobResource = {
location: "westus",
sku: { name: "DataBox" },
transferType: "ExportFromAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataExportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2"
},
transferConfiguration: {
transferAllDetails: {
include: {
dataAccountType: "StorageAccount",
transferAllBlobs: true,
transferAllFiles: true
}
},
transferConfigurationType: "TransferAll"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateExport().catch(console.error);
/**
* This sample demonstrates how to Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
*
* @summary Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead be updated with the Update job API.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsCreateWithUserAssignedIdentity.json
*/
async function jobsCreateWithUserAssignedIdentity() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7552";
const jobName = "SdkJob5337";
const jobResource: JobResource = {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity": {}
}
},
location: "westus",
sku: { name: "DataBox" },
transferType: "ImportToAzure",
details: {
contactDetails: {
contactName: "Public SDK Test",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
dataImportDetails: [
{
accountDetails: {
dataAccountType: "StorageAccount",
storageAccountId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"
}
}
],
jobDetailsType: "DataBox",
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginCreateAndWait(
resourceGroupName,
jobName,
jobResource
);
console.log(result);
}
jobsCreateWithUserAssignedIdentity().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Deletes a job.
*
* @summary Deletes a job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsDelete.json
*/
async function jobsDelete() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginDeleteAndWait(
resourceGroupName,
jobName
);
console.log(result);
}
jobsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,115 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
JobsGetOptionalParams,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGet.json
*/
async function jobsGet() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGet().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCmk.json
*/
async function jobsGetCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCmk().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetCopyStuck.json
*/
async function jobsGetCopyStuck() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetCopyStuck().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetExport.json
*/
async function jobsGetExport() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg8091";
const jobName = "SdkJob6429";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetExport().catch(console.error);
/**
* This sample demonstrates how to Gets information about the specified job.
*
* @summary Gets information about the specified job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsGetWaitingForAction.json
*/
async function jobsGetWaitingForAction() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "dmstestresource";
const jobName = "TJx-637505258985313014";
const expand = "details";
const options: JobsGetOptionalParams = { expand };
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.get(resourceGroupName, jobName, options);
console.log(result);
}
jobsGetWaitingForAction().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all the jobs available under the given resource group.
*
* @summary Lists all the jobs available under the given resource group.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListByResourceGroup.json
*/
async function jobsListByResourceGroup() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListByResourceGroup().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to This method gets the unencrypted secrets related to the job.
*
* @summary This method gets the unencrypted secrets related to the job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsListCredentials.json
*/
async function jobsListCredentials() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "bvttoolrg6";
const jobName = "TJ-636646322037905056";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.listCredentials(
resourceGroupName,
jobName
)) {
resArray.push(item);
}
console.log(resArray);
}
jobsListCredentials().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 { DataBoxManagementClient } from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all the jobs available under the subscription.
*
* @summary Lists all the jobs available under the subscription.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsList.json
*/
async function jobsList() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.jobs.list()) {
resArray.push(item);
}
console.log(resArray);
}
jobsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
MarkDevicesShippedRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Request to mark devices for a given job as shipped
*
* @summary Request to mark devices for a given job as shipped
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/MarkDevicesShipped.json
*/
async function markDevicesShipped() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const markDevicesShippedRequest: MarkDevicesShippedRequest = {
deliverToDcPackageDetails: { carrierName: "DHL", trackingId: "123456" }
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.markDevicesShipped(
jobName,
resourceGroupName,
markDevicesShippedRequest
);
console.log(result);
}
markDevicesShipped().catch(console.error);

Просмотреть файл

@ -0,0 +1,134 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the 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 {
JobResourceUpdateParameter,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatch.json
*/
async function jobsPatch() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg5154";
const jobName = "SdkJob952";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
details: {
contactDetails: {
contactName: "Update Job",
emailList: ["testing@microsoft.com"],
phone: "1234567890",
phoneExtension: "1234"
},
shippingAddress: {
addressType: "Commercial",
city: "San Francisco",
companyName: "Microsoft",
country: "US",
postalCode: "94107",
stateOrProvince: "CA",
streetAddress1: "16 TOWNSEND ST",
streetAddress2: "Unit 1"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatch().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchCmk.json
*/
async function jobsPatchCmk() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg7937";
const jobName = "SdkJob1735";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
details: {
keyEncryptionKey: {
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchCmk().catch(console.error);
/**
* This sample demonstrates how to Updates the properties of an existing job.
*
* @summary Updates the properties of an existing job.
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobsPatchSystemAssignedToUserAssigned.json
*/
async function jobsPatchSystemAssignedToUserAssigned() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const resourceGroupName = "SdkRg9765";
const jobName = "SdkJob2965";
const jobResourceUpdateParameter: JobResourceUpdateParameter = {
identity: {
type: "SystemAssigned,UserAssigned",
userAssignedIdentities: {
"/subscriptions/fa68082f8ff74a2595c7Ce9da541242f/resourceGroups/akvenkat/providers/MicrosoftManagedIdentity/userAssignedIdentities/sdkIdentity": {}
}
},
details: {
keyEncryptionKey: {
identityProperties: {
type: "UserAssigned",
userAssigned: {
resourceId:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity"
}
},
kekType: "CustomerManaged",
kekUrl: "https://sdkkeyvault.vault.azure.net/keys/SSDKEY/",
kekVaultResourceID:
"/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault"
}
}
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.jobs.beginUpdateAndWait(
resourceGroupName,
jobName,
jobResourceUpdateParameter
);
console.log(result);
}
jobsPatchSystemAssignedToUserAssigned().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
MitigateJobRequest,
DataBoxManagementClient
} from "@azure/arm-databox";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Request to mitigate for a given job
*
* @summary Request to mitigate for a given job
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/preview/2021-08-01-preview/examples/JobMitigate.json
*/
async function mitigate() {
const subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f";
const jobName = "SdkJob8367";
const resourceGroupName = "SdkRg9836";
const mitigateJobRequest: MitigateJobRequest = {
customerResolutionCode: "MoveToCleanUpDevice"
};
const credential = new DefaultAzureCredential();
const client = new DataBoxManagementClient(credential, subscriptionId);
const result = await client.mitigate(
jobName,
resourceGroupName,
mitigateJobRequest
);
console.log(result);
}
mitigate().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше