* datacatalog

* datadog

* datalake-analytics

* datamigration

* depolymentmanager

* desktopvirtualization

* deviceprovisioningservices

* devtestlabs

* update

* update

* update

* refresh-7

* update

* update

* update

* update

* update
This commit is contained in:
colawwj 2022-04-19 17:05:19 +08:00 коммит произвёл GitHub
Родитель edb15690f9
Коммит df9f6dc804
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1211 изменённых файлов: 45308 добавлений и 1124 удалений

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

@ -10359,27 +10359,28 @@ packages:
dev: false
file:projects/arm-datadog.tgz:
resolution: {integrity: sha512-Mu0ZwZaebu/4yUhSNx7kt4vWKh8U1n8nZxcdcYIJjwPJ8guiqeThOp6d3vsFTFs8j39TnIbN6zkfJH4BxoIKlw==, tarball: file:projects/arm-datadog.tgz}
resolution: {integrity: sha512-Z10P9RO6y7Li7Td8oDSx/mxgbo2jTarZoyB0dPw52L8EdHA0rGVuSl17Vrn9F9Aj7YhEVcelXJebFjwxxHVdow==, tarball: file:projects/arm-datadog.tgz}
name: '@rush-temp/arm-datadog'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.70.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
@ -10414,7 +10415,7 @@ packages:
dev: false
file:projects/arm-datalake-analytics.tgz:
resolution: {integrity: sha512-k2svYF3XklL1EG3I2ychc1nfN8vpJ/Zw/qyBAYP32l5Q/GkHesow+0uczzikvpHCMOEFpX2qnDjSEFZRDil2jg==, tarball: file:projects/arm-datalake-analytics.tgz}
resolution: {integrity: sha512-+htKFj3R6NXBtF5Yb/2VVzU2c1E+9fi+7XAIsrGreH+ATnGFCYgNA5r9yhze4S6ZKvS4bOUftCzk1XmMIKpBzQ==, tarball: file:projects/arm-datalake-analytics.tgz}
name: '@rush-temp/arm-datalake-analytics'
version: 0.0.0
dependencies:
@ -10423,79 +10424,82 @@ packages:
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 21.0.3_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-node-resolve': 8.4.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
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
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
dev: false
file:projects/arm-datamigration.tgz:
resolution: {integrity: sha512-CeZIZm5itafVdwULmzvL8KxfsvwTXA66FZ8TjamHR9AlN++67+SEvlgbY7yffbLfaNg/fbAu2G5w+6W4hORhxA==, tarball: file:projects/arm-datamigration.tgz}
resolution: {integrity: sha512-VWRlzlw9qHLqnlqB5qJaLAWfg4F9oqvUzmGu29UaqRBIdMV3JwlqlgbAY6BhQDigcGYySGNV5e/gnyK3yjgNog==, tarball: file:projects/arm-datamigration.tgz}
name: '@rush-temp/arm-datamigration'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.70.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
dev: false
file:projects/arm-deploymentmanager.tgz:
resolution: {integrity: sha512-3qBWLOJC4MIXY97IjYjkIaozKwRv9P74Ylj6t6XAM9mQKBnFZ+hxz6vuB/dnsAnQdlSzd1ZqRmqzrnN2O7Ce+Q==, tarball: file:projects/arm-deploymentmanager.tgz}
resolution: {integrity: sha512-qEwSNomthp4lttQkfZhmZnOYCJVf4mICD3J5JU7HQb4YgV1Li8pcFOUQLT6QPlagTjRWgd1BwNocwfVazgHMBw==, tarball: file:projects/arm-deploymentmanager.tgz}
name: '@rush-temp/arm-deploymentmanager'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.70.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
dev: false
file:projects/arm-desktopvirtualization.tgz:
resolution: {integrity: sha512-bSFk78nXBlqu+Qcuq3tg6k8CEOho44S20tq87GU1Kec3WrT5zv14vem7hf64j5MDdjz9cRi5YQHa9Y439T+TqA==, tarball: file:projects/arm-desktopvirtualization.tgz}
resolution: {integrity: sha512-h2UL1dyc63hoY2aeGrqAS54mZgdexrVPCx+rFnycB4d5YJHBlHwHbOrh2bA5qiTCdFQGkepbedm74t2v/5ElpQ==, tarball: file:projects/arm-desktopvirtualization.tgz}
name: '@rush-temp/arm-desktopvirtualization'
version: 0.0.0
dependencies:
@ -10504,45 +10508,47 @@ packages:
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 21.0.3_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-node-resolve': 8.4.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
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
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
dev: false
file:projects/arm-deviceprovisioningservices.tgz:
resolution: {integrity: sha512-+mZUHYK1KgZzdi0Oemfac3JDyIXl7KEo+DXL/ke1sv8VPOx9M+LdFrtoe5L0wRyd63AuUQPY1BD5zCb0vSCncQ==, tarball: file:projects/arm-deviceprovisioningservices.tgz}
resolution: {integrity: sha512-b/2nLVG1BCHXMdqczl4C8sgqTEtn1zSsyxPEDS9G8aBEO8mfAtqzoTfoujkHDqBC/D5G+h0rIMs0k7otXq0smw==, tarball: file:projects/arm-deviceprovisioningservices.tgz}
name: '@rush-temp/arm-deviceprovisioningservices'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.70.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
@ -10576,7 +10582,7 @@ packages:
dev: false
file:projects/arm-devtestlabs.tgz:
resolution: {integrity: sha512-+LGTok5vU7pX/LWuxG4Zk3CsnyHxloE5rY25uVVy43VkQeLHkzk7dp3eDTd8HkhjQg+lNJFnDXGAAWWnSWj6Fg==, tarball: file:projects/arm-devtestlabs.tgz}
resolution: {integrity: sha512-COMNdrasm8+80B7JVw8OCCNLLK199AkNBVNbTm9rtTaQU1mADVydelb22vsrLhRR4liihv56UrKFwMN5iKPOnQ==, tarball: file:projects/arm-devtestlabs.tgz}
name: '@rush-temp/arm-devtestlabs'
version: 0.0.0
dependencies:
@ -10585,18 +10591,19 @@ packages:
'@microsoft/api-extractor': 7.22.1
'@rollup/plugin-commonjs': 21.0.3_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-node-resolve': 8.4.0_rollup@2.70.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
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
typescript: 4.2.4
uglify-js: 3.15.4
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color

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

@ -10,6 +10,7 @@ https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob-cha
https://github.com/Azure/azure-digital-twins/blob/private-preview/Documentation/how-to-manage-routes.md
https://docs.microsoft.com/javascript/api/@azure/arm-app?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-dashboard?view=azure-node-preview
https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview
https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr
https://docs.microsoft.com/javascript/api/@azure/arm-azureadexternalidentities
https://docs.microsoft.com/javascript/api/@azure/arm-azureadexternalidentities?view=azure-node-preview

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

@ -1,14 +1,10 @@
# Release History
## 3.0.1 (Unreleased)
## 3.0.1 (2022-04-18)
### Features Added
**features**
### Breaking Changes
### Bugs Fixed
### Other Changes
- bug fix
## 3.0.0 (2022-01-12)

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

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2021 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 @@ 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/)
- 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
- An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { MicrosoftDatadogClient } = require("@azure/arm-datadog");
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 client = new MicrosoftDatadogClient(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 MicrosoftDatadogClient(credential, subscriptionId);
```

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

@ -1,7 +1,8 @@
{
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
"readme": "specification/datadog/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/deviceprovisioningservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"readme": "specification\\datadog\\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:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datadog\\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",
"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",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-datadog.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}

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

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

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

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
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
/**
* 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.
*/
function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (
warning.code === "EVAL" &&
warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
);
}
function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true
);
}
const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
/**
* Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),
sourcemaps()
//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 },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};
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,28 @@
/*
* 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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create Datadog marketplace agreement in the subscription.
*
* @summary Create Datadog marketplace agreement in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json
*/
async function marketplaceAgreementsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.marketplaceAgreements.createOrUpdate();
console.log(result);
}
marketplaceAgreementsCreateOrUpdate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List Datadog marketplace agreements in the subscription.
*
* @summary List Datadog marketplace agreements in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json
*/
async function marketplaceAgreementsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.marketplaceAgreements.list()) {
resArray.push(item);
}
console.log(resArray);
}
marketplaceAgreementsList().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a monitor resource.
*
* @summary Create a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json
*/
async function monitorsCreate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginCreateAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsCreate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a monitor resource.
*
* @summary Delete a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json
*/
async function monitorsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginDeleteAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsDelete().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the default api key.
*
* @summary Get the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json
*/
async function monitorsGetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.getDefaultKey(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsGetDefaultKey().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the properties of a specific monitor resource.
*
* @summary Get the properties of a specific monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json
*/
async function monitorsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.get(resourceGroupName, monitorName);
console.log(result);
}
monitorsGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the api keys for a given monitor resource.
*
* @summary List the api keys for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json
*/
async function monitorsListApiKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listApiKeys(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListApiKeys().catch(console.error);

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

@ -0,0 +1,34 @@
/*
* 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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all monitors under the specified resource group.
*
* @summary List all monitors under the specified resource group.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json
*/
async function monitorsListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listByResourceGroup(
resourceGroupName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListByResourceGroup().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the hosts for a given monitor resource.
*
* @summary List the hosts for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json
*/
async function monitorsListHosts() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listHosts(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListHosts().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all Azure resources associated to the same Datadog organization as the target resource.
*
* @summary List all Azure resources associated to the same Datadog organization as the target resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json
*/
async function monitorsListLinkedResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listLinkedResources(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListLinkedResources().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the resources currently being monitored by the Datadog monitor resource.
*
* @summary List the resources currently being monitored by the Datadog monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json
*/
async function monitorsListMonitoredResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listMonitoredResources(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListMonitoredResources().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all monitors under the specified subscription.
*
* @summary List all monitors under the specified subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json
*/
async function monitorsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.list()) {
resArray.push(item);
}
console.log(resArray);
}
monitorsList().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Refresh the set password link and return a latest one.
*
* @summary Refresh the set password link and return a latest one.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json
*/
async function monitorsRefreshSetPasswordLink() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.refreshSetPasswordLink(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsRefreshSetPasswordLink().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Set the default api key.
*
* @summary Set the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json
*/
async function monitorsSetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.setDefaultKey(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsSetDefaultKey().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Update a monitor resource.
*
* @summary Update a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json
*/
async function monitorsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginUpdateAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsUpdate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
*
* @summary List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Configures single-sign-on for this resource.
*
* @summary Configures single-sign-on for this resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json
*/
async function singleSignOnConfigurationsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.beginCreateOrUpdateAndWait(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsCreateOrUpdate().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the datadog single sign-on resource for the given Monitor.
*
* @summary Gets the datadog single sign-on resource for the given Monitor.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json
*/
async function singleSignOnConfigurationsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.get(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the single sign-on configurations for a given monitor resource.
*
* @summary List the single sign-on configurations for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json
*/
async function singleSignOnConfigurationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.singleSignOnConfigurations.list(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
singleSignOnConfigurationsList().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a tag rule set for a given monitor resource.
*
* @summary Create or update a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json
*/
async function tagRulesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.createOrUpdate(
resourceGroupName,
monitorName,
ruleSetName
);
console.log(result);
}
tagRulesCreateOrUpdate().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a tag rule set for a given monitor resource.
*
* @summary Get a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json
*/
async function tagRulesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.get(
resourceGroupName,
monitorName,
ruleSetName
);
console.log(result);
}
tagRulesGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the tag rules for a given monitor resource.
*
* @summary List the tag rules for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json
*/
async function tagRulesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.tagRules.list(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
tagRulesList().catch(console.error);

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

@ -0,0 +1,92 @@
# client library samples for JavaScript
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [marketplaceAgreementsCreateOrUpdateSample.js][marketplaceagreementscreateorupdatesample] | Create Datadog marketplace agreement in the subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json |
| [marketplaceAgreementsListSample.js][marketplaceagreementslistsample] | List Datadog marketplace agreements in the subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json |
| [monitorsCreateSample.js][monitorscreatesample] | Create a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json |
| [monitorsDeleteSample.js][monitorsdeletesample] | Delete a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json |
| [monitorsGetDefaultKeySample.js][monitorsgetdefaultkeysample] | Get the default api key. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json |
| [monitorsGetSample.js][monitorsgetsample] | Get the properties of a specific monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json |
| [monitorsListApiKeysSample.js][monitorslistapikeyssample] | List the api keys for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json |
| [monitorsListByResourceGroupSample.js][monitorslistbyresourcegroupsample] | List all monitors under the specified resource group. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json |
| [monitorsListHostsSample.js][monitorslisthostssample] | List the hosts for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json |
| [monitorsListLinkedResourcesSample.js][monitorslistlinkedresourcessample] | List all Azure resources associated to the same Datadog organization as the target resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json |
| [monitorsListMonitoredResourcesSample.js][monitorslistmonitoredresourcessample] | List the resources currently being monitored by the Datadog monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json |
| [monitorsListSample.js][monitorslistsample] | List all monitors under the specified subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json |
| [monitorsRefreshSetPasswordLinkSample.js][monitorsrefreshsetpasswordlinksample] | Refresh the set password link and return a latest one. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json |
| [monitorsSetDefaultKeySample.js][monitorssetdefaultkeysample] | Set the default api key. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json |
| [monitorsUpdateSample.js][monitorsupdatesample] | Update a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json |
| [operationsListSample.js][operationslistsample] | List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json |
| [singleSignOnConfigurationsCreateOrUpdateSample.js][singlesignonconfigurationscreateorupdatesample] | Configures single-sign-on for this resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json |
| [singleSignOnConfigurationsGetSample.js][singlesignonconfigurationsgetsample] | Gets the datadog single sign-on resource for the given Monitor. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json |
| [singleSignOnConfigurationsListSample.js][singlesignonconfigurationslistsample] | List the single sign-on configurations for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json |
| [tagRulesCreateOrUpdateSample.js][tagrulescreateorupdatesample] | Create or update a tag rule set for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json |
| [tagRulesGetSample.js][tagrulesgetsample] | Get a tag rule set for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json |
| [tagRulesListSample.js][tagruleslistsample] | List the tag rules for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.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 marketplaceAgreementsCreateOrUpdateSample.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 marketplaceAgreementsCreateOrUpdateSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[marketplaceagreementscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/marketplaceAgreementsCreateOrUpdateSample.js
[marketplaceagreementslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/marketplaceAgreementsListSample.js
[monitorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsCreateSample.js
[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsDeleteSample.js
[monitorsgetdefaultkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsGetDefaultKeySample.js
[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsGetSample.js
[monitorslistapikeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListApiKeysSample.js
[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListByResourceGroupSample.js
[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListHostsSample.js
[monitorslistlinkedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListLinkedResourcesSample.js
[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListMonitoredResourcesSample.js
[monitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsListSample.js
[monitorsrefreshsetpasswordlinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsRefreshSetPasswordLinkSample.js
[monitorssetdefaultkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsSetDefaultKeySample.js
[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/monitorsUpdateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/operationsListSample.js
[singlesignonconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/singleSignOnConfigurationsCreateOrUpdateSample.js
[singlesignonconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/singleSignOnConfigurationsGetSample.js
[singlesignonconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/singleSignOnConfigurationsListSample.js
[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/tagRulesCreateOrUpdateSample.js
[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/tagRulesGetSample.js
[tagruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/javascript/tagRulesListSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-datadog?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datadog/arm-datadog/README.md

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

@ -0,0 +1,28 @@
/*
* 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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create Datadog marketplace agreement in the subscription.
*
* @summary Create Datadog marketplace agreement in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json
*/
async function marketplaceAgreementsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.marketplaceAgreements.createOrUpdate();
console.log(result);
}
marketplaceAgreementsCreateOrUpdate().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List Datadog marketplace agreements in the subscription.
*
* @summary List Datadog marketplace agreements in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json
*/
async function marketplaceAgreementsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.marketplaceAgreements.list()) {
resArray.push(item);
}
console.log(resArray);
}
marketplaceAgreementsList().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create a monitor resource.
*
* @summary Create a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json
*/
async function monitorsCreate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginCreateAndWait(resourceGroupName, monitorName);
console.log(result);
}
monitorsCreate().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete a monitor resource.
*
* @summary Delete a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json
*/
async function monitorsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginDeleteAndWait(resourceGroupName, monitorName);
console.log(result);
}
monitorsDelete().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the default api key.
*
* @summary Get the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json
*/
async function monitorsGetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.getDefaultKey(resourceGroupName, monitorName);
console.log(result);
}
monitorsGetDefaultKey().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the properties of a specific monitor resource.
*
* @summary Get the properties of a specific monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json
*/
async function monitorsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.get(resourceGroupName, monitorName);
console.log(result);
}
monitorsGet().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List the api keys for a given monitor resource.
*
* @summary List the api keys for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json
*/
async function monitorsListApiKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listApiKeys(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListApiKeys().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all monitors under the specified resource group.
*
* @summary List all monitors under the specified resource group.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json
*/
async function monitorsListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListByResourceGroup().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List the hosts for a given monitor resource.
*
* @summary List the hosts for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json
*/
async function monitorsListHosts() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listHosts(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListHosts().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all Azure resources associated to the same Datadog organization as the target resource.
*
* @summary List all Azure resources associated to the same Datadog organization as the target resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json
*/
async function monitorsListLinkedResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listLinkedResources(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListLinkedResources().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List the resources currently being monitored by the Datadog monitor resource.
*
* @summary List the resources currently being monitored by the Datadog monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json
*/
async function monitorsListMonitoredResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listMonitoredResources(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListMonitoredResources().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all monitors under the specified subscription.
*
* @summary List all monitors under the specified subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json
*/
async function monitorsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.list()) {
resArray.push(item);
}
console.log(resArray);
}
monitorsList().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Refresh the set password link and return a latest one.
*
* @summary Refresh the set password link and return a latest one.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json
*/
async function monitorsRefreshSetPasswordLink() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.refreshSetPasswordLink(resourceGroupName, monitorName);
console.log(result);
}
monitorsRefreshSetPasswordLink().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Set the default api key.
*
* @summary Set the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json
*/
async function monitorsSetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.setDefaultKey(resourceGroupName, monitorName);
console.log(result);
}
monitorsSetDefaultKey().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Update a monitor resource.
*
* @summary Update a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json
*/
async function monitorsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginUpdateAndWait(resourceGroupName, monitorName);
console.log(result);
}
monitorsUpdate().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
*
* @summary List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().catch(console.error);

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

@ -0,0 +1,32 @@
{
"name": "@azure-samples/arm-datadog-js",
"private": true,
"version": "1.0.0",
"description": " client library samples for JavaScript",
"engines": {
"node": ">=12.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
"directory": "sdk/datadog/arm-datadog"
},
"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/datadog/arm-datadog",
"dependencies": {
"@azure/arm-datadog": "latest",
"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,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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Configures single-sign-on for this resource.
*
* @summary Configures single-sign-on for this resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json
*/
async function singleSignOnConfigurationsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.beginCreateOrUpdateAndWait(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsCreateOrUpdate().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the datadog single sign-on resource for the given Monitor.
*
* @summary Gets the datadog single sign-on resource for the given Monitor.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json
*/
async function singleSignOnConfigurationsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.get(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsGet().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List the single sign-on configurations for a given monitor resource.
*
* @summary List the single sign-on configurations for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json
*/
async function singleSignOnConfigurationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.singleSignOnConfigurations.list(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
singleSignOnConfigurationsList().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update a tag rule set for a given monitor resource.
*
* @summary Create or update a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json
*/
async function tagRulesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.createOrUpdate(resourceGroupName, monitorName, ruleSetName);
console.log(result);
}
tagRulesCreateOrUpdate().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a tag rule set for a given monitor resource.
*
* @summary Get a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json
*/
async function tagRulesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.get(resourceGroupName, monitorName, ruleSetName);
console.log(result);
}
tagRulesGet().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 { MicrosoftDatadogClient } = require("@azure/arm-datadog");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List the tag rules for a given monitor resource.
*
* @summary List the tag rules for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json
*/
async function tagRulesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.tagRules.list(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
tagRulesList().catch(console.error);

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

@ -0,0 +1,105 @@
# client library samples for TypeScript
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [marketplaceAgreementsCreateOrUpdateSample.ts][marketplaceagreementscreateorupdatesample] | Create Datadog marketplace agreement in the subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json |
| [marketplaceAgreementsListSample.ts][marketplaceagreementslistsample] | List Datadog marketplace agreements in the subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json |
| [monitorsCreateSample.ts][monitorscreatesample] | Create a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json |
| [monitorsDeleteSample.ts][monitorsdeletesample] | Delete a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json |
| [monitorsGetDefaultKeySample.ts][monitorsgetdefaultkeysample] | Get the default api key. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json |
| [monitorsGetSample.ts][monitorsgetsample] | Get the properties of a specific monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json |
| [monitorsListApiKeysSample.ts][monitorslistapikeyssample] | List the api keys for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json |
| [monitorsListByResourceGroupSample.ts][monitorslistbyresourcegroupsample] | List all monitors under the specified resource group. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json |
| [monitorsListHostsSample.ts][monitorslisthostssample] | List the hosts for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json |
| [monitorsListLinkedResourcesSample.ts][monitorslistlinkedresourcessample] | List all Azure resources associated to the same Datadog organization as the target resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json |
| [monitorsListMonitoredResourcesSample.ts][monitorslistmonitoredresourcessample] | List the resources currently being monitored by the Datadog monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json |
| [monitorsListSample.ts][monitorslistsample] | List all monitors under the specified subscription. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json |
| [monitorsRefreshSetPasswordLinkSample.ts][monitorsrefreshsetpasswordlinksample] | Refresh the set password link and return a latest one. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json |
| [monitorsSetDefaultKeySample.ts][monitorssetdefaultkeysample] | Set the default api key. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json |
| [monitorsUpdateSample.ts][monitorsupdatesample] | Update a monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json |
| [operationsListSample.ts][operationslistsample] | List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json |
| [singleSignOnConfigurationsCreateOrUpdateSample.ts][singlesignonconfigurationscreateorupdatesample] | Configures single-sign-on for this resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json |
| [singleSignOnConfigurationsGetSample.ts][singlesignonconfigurationsgetsample] | Gets the datadog single sign-on resource for the given Monitor. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json |
| [singleSignOnConfigurationsListSample.ts][singlesignonconfigurationslistsample] | List the single sign-on configurations for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json |
| [tagRulesCreateOrUpdateSample.ts][tagrulescreateorupdatesample] | Create or update a tag rule set for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json |
| [tagRulesGetSample.ts][tagrulesgetsample] | Get a tag rule set for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json |
| [tagRulesListSample.ts][tagruleslistsample] | List the tag rules for a given monitor resource. x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.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/marketplaceAgreementsCreateOrUpdateSample.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/marketplaceAgreementsCreateOrUpdateSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[marketplaceagreementscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/marketplaceAgreementsCreateOrUpdateSample.ts
[marketplaceagreementslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/marketplaceAgreementsListSample.ts
[monitorscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsCreateSample.ts
[monitorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsDeleteSample.ts
[monitorsgetdefaultkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsGetDefaultKeySample.ts
[monitorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsGetSample.ts
[monitorslistapikeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListApiKeysSample.ts
[monitorslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListByResourceGroupSample.ts
[monitorslisthostssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListHostsSample.ts
[monitorslistlinkedresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListLinkedResourcesSample.ts
[monitorslistmonitoredresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListMonitoredResourcesSample.ts
[monitorslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsListSample.ts
[monitorsrefreshsetpasswordlinksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsRefreshSetPasswordLinkSample.ts
[monitorssetdefaultkeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsSetDefaultKeySample.ts
[monitorsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/monitorsUpdateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/operationsListSample.ts
[singlesignonconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/singleSignOnConfigurationsCreateOrUpdateSample.ts
[singlesignonconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/singleSignOnConfigurationsGetSample.ts
[singlesignonconfigurationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/singleSignOnConfigurationsListSample.ts
[tagrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/tagRulesCreateOrUpdateSample.ts
[tagrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/tagRulesGetSample.ts
[tagruleslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/datadog/arm-datadog/samples/v3/typescript/src/tagRulesListSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-datadog?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datadog/arm-datadog/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html

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

@ -0,0 +1,41 @@
{
"name": "@azure-samples/arm-datadog-ts",
"private": true,
"version": "1.0.0",
"description": " client library samples for TypeScript",
"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/datadog/arm-datadog"
},
"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/datadog/arm-datadog",
"dependencies": {
"@azure/arm-datadog": "latest",
"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,28 @@
/*
* 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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create Datadog marketplace agreement in the subscription.
*
* @summary Create Datadog marketplace agreement in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json
*/
async function marketplaceAgreementsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.marketplaceAgreements.createOrUpdate();
console.log(result);
}
marketplaceAgreementsCreateOrUpdate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List Datadog marketplace agreements in the subscription.
*
* @summary List Datadog marketplace agreements in the subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json
*/
async function marketplaceAgreementsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.marketplaceAgreements.list()) {
resArray.push(item);
}
console.log(resArray);
}
marketplaceAgreementsList().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a monitor resource.
*
* @summary Create a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json
*/
async function monitorsCreate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginCreateAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsCreate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a monitor resource.
*
* @summary Delete a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json
*/
async function monitorsDelete() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginDeleteAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsDelete().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the default api key.
*
* @summary Get the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json
*/
async function monitorsGetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.getDefaultKey(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsGetDefaultKey().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the properties of a specific monitor resource.
*
* @summary Get the properties of a specific monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json
*/
async function monitorsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.get(resourceGroupName, monitorName);
console.log(result);
}
monitorsGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the api keys for a given monitor resource.
*
* @summary List the api keys for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json
*/
async function monitorsListApiKeys() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listApiKeys(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListApiKeys().catch(console.error);

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

@ -0,0 +1,34 @@
/*
* 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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all monitors under the specified resource group.
*
* @summary List all monitors under the specified resource group.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json
*/
async function monitorsListByResourceGroup() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listByResourceGroup(
resourceGroupName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListByResourceGroup().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the hosts for a given monitor resource.
*
* @summary List the hosts for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json
*/
async function monitorsListHosts() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listHosts(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListHosts().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all Azure resources associated to the same Datadog organization as the target resource.
*
* @summary List all Azure resources associated to the same Datadog organization as the target resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json
*/
async function monitorsListLinkedResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listLinkedResources(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListLinkedResources().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the resources currently being monitored by the Datadog monitor resource.
*
* @summary List the resources currently being monitored by the Datadog monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json
*/
async function monitorsListMonitoredResources() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.listMonitoredResources(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
monitorsListMonitoredResources().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all monitors under the specified subscription.
*
* @summary List all monitors under the specified subscription.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json
*/
async function monitorsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.monitors.list()) {
resArray.push(item);
}
console.log(resArray);
}
monitorsList().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Refresh the set password link and return a latest one.
*
* @summary Refresh the set password link and return a latest one.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json
*/
async function monitorsRefreshSetPasswordLink() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.refreshSetPasswordLink(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsRefreshSetPasswordLink().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Set the default api key.
*
* @summary Set the default api key.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json
*/
async function monitorsSetDefaultKey() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.setDefaultKey(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsSetDefaultKey().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Update a monitor resource.
*
* @summary Update a monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json
*/
async function monitorsUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.monitors.beginUpdateAndWait(
resourceGroupName,
monitorName
);
console.log(result);
}
monitorsUpdate().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
*
* @summary List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json
*/
async function operationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationsList().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Configures single-sign-on for this resource.
*
* @summary Configures single-sign-on for this resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json
*/
async function singleSignOnConfigurationsCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.beginCreateOrUpdateAndWait(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsCreateOrUpdate().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the datadog single sign-on resource for the given Monitor.
*
* @summary Gets the datadog single sign-on resource for the given Monitor.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json
*/
async function singleSignOnConfigurationsGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const configurationName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.singleSignOnConfigurations.get(
resourceGroupName,
monitorName,
configurationName
);
console.log(result);
}
singleSignOnConfigurationsGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the single sign-on configurations for a given monitor resource.
*
* @summary List the single sign-on configurations for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json
*/
async function singleSignOnConfigurationsList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.singleSignOnConfigurations.list(
resourceGroupName,
monitorName
)) {
resArray.push(item);
}
console.log(resArray);
}
singleSignOnConfigurationsList().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update a tag rule set for a given monitor resource.
*
* @summary Create or update a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json
*/
async function tagRulesCreateOrUpdate() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.createOrUpdate(
resourceGroupName,
monitorName,
ruleSetName
);
console.log(result);
}
tagRulesCreateOrUpdate().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.
import { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a tag rule set for a given monitor resource.
*
* @summary Get a tag rule set for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json
*/
async function tagRulesGet() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const ruleSetName = "default";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const result = await client.tagRules.get(
resourceGroupName,
monitorName,
ruleSetName
);
console.log(result);
}
tagRulesGet().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 { MicrosoftDatadogClient } from "@azure/arm-datadog";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List the tag rules for a given monitor resource.
*
* @summary List the tag rules for a given monitor resource.
* x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json
*/
async function tagRulesList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const resourceGroupName = "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftDatadogClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.tagRules.list(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}
tagRulesList().catch(console.error);

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

@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "ES2018",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"alwaysStrict": true,
"outDir": "dist",
"rootDir": "src"
},
"include": [
"src/**.ts"
]
}

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

@ -7,6 +7,7 @@
*/
import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import {
MarketplaceAgreementsImpl,
@ -56,7 +57,7 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
credential: credentials
};
const packageDetails = `azsdk-js-arm-datadog/3.0.0`;
const packageDetails = `azsdk-js-arm-datadog/3.0.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@ -71,9 +72,33 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
userAgentOptions: {
userAgentPrefix
},
baseUri: options.endpoint || "https://management.azure.com"
baseUri:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
};
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
this.subscriptionId = subscriptionId;

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

@ -650,11 +650,13 @@ export class MonitorsImpl implements Monitors {
{ resourceGroupName, monitorName, options },
createOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "azure-async-operation"
});
await poller.poll();
return poller;
}
/**
@ -736,10 +738,12 @@ export class MonitorsImpl implements Monitors {
{ resourceGroupName, monitorName, options },
updateOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
@ -816,10 +820,12 @@ export class MonitorsImpl implements Monitors {
{ resourceGroupName, monitorName, options },
deleteOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**

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

@ -178,11 +178,13 @@ export class SingleSignOnConfigurationsImpl
{ resourceGroupName, monitorName, configurationName, options },
createOrUpdateOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "azure-async-operation"
});
await poller.poll();
return poller;
}
/**

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

@ -9,11 +9,25 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"],
"lib": [
"es6",
"dom"
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true
"importHelpers": true,
"paths": {
"@azure/arm-datadog": [
"./src/index"
]
}
},
"include": ["./src/**/*.ts", "./test/**/*.ts"],
"exclude": ["node_modules"]
}
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
],
"exclude": [
"node_modules"
]
}

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

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

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

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

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

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2021 Microsoft
Copyright (c) 2022 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

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

@ -16,6 +16,8 @@ Creates an Azure Data Lake Analytics account management client.
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- 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
- An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { DataLakeAnalyticsAccountManagementClient } = require("@azure/arm-datalake-analytics");
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 client = new DataLakeAnalyticsAccountManagementClient(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 DataLakeAnalyticsAccountManagementClient(credential, subscriptionId);
```

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

@ -1,7 +1,8 @@
{
"commit": "270ba8923ce458af2b59cd66b008355676bccd49",
"readme": "specification/datalake-analytics/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/datalake-analytics/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"readme": "specification\\datalake-analytics\\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:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datalake-analytics\\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",
"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",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-datalake-analytics.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}

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

@ -11,9 +11,9 @@
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.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-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
},
"keywords": [
@ -30,12 +30,12 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
@ -98,5 +98,21 @@
"docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
}
"//metadata": {
"constantPaths": [
{
"path": "src/dataLakeAnalyticsAccountManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datalake-analytics?view=azure-node-preview"
}
}

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

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
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
/**
* 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.
*/
function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (
warning.code === "EVAL" &&
warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
);
}
function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true
);
}
const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
/**
* Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),
sourcemaps()
//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 },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};
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 {
CheckNameAvailabilityParameters,
DataLakeAnalyticsAccountManagementClient
} from "@azure/arm-datalake-analytics";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Checks whether the specified account name is available or taken.
*
* @summary Checks whether the specified account name is available or taken.
* x-ms-original-file: specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/preview/2019-11-01-preview/examples/Accounts_CheckNameAvailability.json
*/
async function checksWhetherTheSpecifiedAccountNameIsAvailableOrTaken() {
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const location = "EastUS2";
const parameters: CheckNameAvailabilityParameters = {
name: "contosoadla",
type: "Microsoft.DataLakeAnalytics/accounts"
};
const credential = new DefaultAzureCredential();
const client = new DataLakeAnalyticsAccountManagementClient(
credential,
subscriptionId
);
const result = await client.accounts.checkNameAvailability(
location,
parameters
);
console.log(result);
}
checksWhetherTheSpecifiedAccountNameIsAvailableOrTaken().catch(console.error);

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

@ -0,0 +1,75 @@
/*
* 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 {
CreateDataLakeAnalyticsAccountParameters,
DataLakeAnalyticsAccountManagementClient
} from "@azure/arm-datalake-analytics";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads.
*
* @summary Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads.
* x-ms-original-file: specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/preview/2019-11-01-preview/examples/Accounts_Create.json
*/
async function createsTheSpecifiedDataLakeAnalyticsAccountThisSuppliesTheUserWithComputationServicesForDataLakeAnalyticsWorkloads() {
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const resourceGroupName = "contosorg";
const accountName = "contosoadla";
const parameters: CreateDataLakeAnalyticsAccountParameters = {
computePolicies: [
{
name: "test_policy",
maxDegreeOfParallelismPerJob: 1,
minPriorityPerJob: 1,
objectId: "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
objectType: "User"
}
],
dataLakeStoreAccounts: [{ name: "test_adls", suffix: "test_suffix" }],
defaultDataLakeStoreAccount: "test_adls",
firewallAllowAzureIps: "Enabled",
firewallRules: [
{ name: "test_rule", endIpAddress: "2.2.2.2", startIpAddress: "1.1.1.1" }
],
firewallState: "Enabled",
location: "eastus2",
maxDegreeOfParallelism: 30,
maxDegreeOfParallelismPerJob: 1,
maxJobCount: 3,
minPriorityPerJob: 1,
newTier: "Consumption",
queryStoreRetention: 30,
storageAccounts: [
{
name: "test_storage",
accessKey: "34adfa4f-cedf-4dc0-ba29-b6d1a69ab346",
suffix: "test_suffix"
}
],
tags: { testKey: "test_value" }
};
const credential = new DefaultAzureCredential();
const client = new DataLakeAnalyticsAccountManagementClient(
credential,
subscriptionId
);
const result = await client.accounts.beginCreateAndWait(
resourceGroupName,
accountName,
parameters
);
console.log(result);
}
createsTheSpecifiedDataLakeAnalyticsAccountThisSuppliesTheUserWithComputationServicesForDataLakeAnalyticsWorkloads().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 { DataLakeAnalyticsAccountManagementClient } from "@azure/arm-datalake-analytics";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Begins the delete process for the Data Lake Analytics account object specified by the account name.
*
* @summary Begins the delete process for the Data Lake Analytics account object specified by the account name.
* x-ms-original-file: specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/preview/2019-11-01-preview/examples/Accounts_Delete.json
*/
async function beginsTheDeleteProcessForTheDataLakeAnalyticsAccountObjectSpecifiedByTheAccountName() {
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const resourceGroupName = "contosorg";
const accountName = "contosoadla";
const credential = new DefaultAzureCredential();
const client = new DataLakeAnalyticsAccountManagementClient(
credential,
subscriptionId
);
const result = await client.accounts.beginDeleteAndWait(
resourceGroupName,
accountName
);
console.log(result);
}
beginsTheDeleteProcessForTheDataLakeAnalyticsAccountObjectSpecifiedByTheAccountName().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 { DataLakeAnalyticsAccountManagementClient } from "@azure/arm-datalake-analytics";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets details of the specified Data Lake Analytics account.
*
* @summary Gets details of the specified Data Lake Analytics account.
* x-ms-original-file: specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/preview/2019-11-01-preview/examples/Accounts_Get.json
*/
async function getsDetailsOfTheSpecifiedDataLakeAnalyticsAccount() {
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const resourceGroupName = "contosorg";
const accountName = "contosoadla";
const credential = new DefaultAzureCredential();
const client = new DataLakeAnalyticsAccountManagementClient(
credential,
subscriptionId
);
const result = await client.accounts.get(resourceGroupName, accountName);
console.log(result);
}
getsDetailsOfTheSpecifiedDataLakeAnalyticsAccount().catch(console.error);

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