refresh analysissercices package (#22395)

* refresh analysissercices package

* upload yaml

* Update ci.mgmt.yml

Co-authored-by: ZiWei Chen (WICRESOFT NORTH AMERICA LTD) <v-ziweichen@microsoft.com>
This commit is contained in:
kazrael2119 2022-06-29 11:13:05 +08:00 коммит произвёл GitHub
Родитель 0cdb39a0b1
Коммит 16d9ee9fdd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
18 изменённых файлов: 254 добавлений и 212 удалений

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

@ -3642,6 +3642,7 @@ packages:
/core-js/3.22.6:
resolution: {integrity: sha512-2IGcGH00z9I4twgNWU4uGCNEsBFG1s2JudVQrgSCoVhOfwoTwQjxC8aMo9exrpTMOxvobggEpaHnGMmQY4cfBQ==}
deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
requiresBuild: true
dev: false
@ -3940,7 +3941,7 @@ packages:
dependencies:
semver: 7.3.7
shelljs: 0.8.5
typescript: 4.8.0-dev.20220
typescript: 4.8.0-dev.20220628
dev: false
/downlevel-dts/0.4.0:
@ -8750,8 +8751,8 @@ packages:
hasBin: true
dev: false
/typescript/4.8.0-dev.20220627:
resolution: {integrity: sha512-AotGcCE4LR1khwUAONhErpEdikkPmmkibtbhakf8A6mfzTe7VxsUF8CVLbE4ZJlGkafl0TsWFi7mxvrv47Dq2w==}
/typescript/4.8.0-dev.20220628:
resolution: {integrity: sha512-89n1Fp/JQev/bPPuVferlfw0VguLxr0uFergLfPbhs+6Hlu3M5rLwplGLHL+JZ+0+BsTyWg779TmaMcqa5FB5Q==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: false
@ -9660,7 +9661,7 @@ packages:
dev: false
file:projects/arm-analysisservices.tgz:
resolution: {integrity: sha512-RISC51vMCbLqCgbL+K6tvS9SsZhQRYYbhR2i0tFyWLbA/uBYUU/o0t6lVAnhbMpJ7eQpb9HdY+x7JeIQBjKZYQ==, tarball: file:projects/arm-analysisservices.tgz}
resolution: {integrity: sha512-gtSzdcJMM+nPw03anc4RahwXcSU41cNNa2gxrQREZXwJMwjXRsWPRD1rvv+26eFwXej1grHgSx1GqcObHMaM1w==, tarball: file:projects/arm-analysisservices.tgz}
name: '@rush-temp/arm-analysisservices'
version: 0.0.0
dependencies:
@ -9670,20 +9671,22 @@ packages:
'@microsoft/api-extractor': 7.18.11
'@rollup/plugin-commonjs': 21.1.0_rollup@2.74.1
'@rollup/plugin-json': 4.1.0_rollup@2.74.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.74.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.74.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.74.1
'@rollup/plugin-node-resolve': 13.3.0_rollup@2.74.1
'@types/chai': 4.3.1
chai: 4.3.6
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 2.74.1
rollup-plugin-sourcemaps: 0.4.2_rollup@2.74.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.74.1
tslib: 2.4.0
typescript: 4.2.4
uglify-js: 3.15.5
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color
dev: false
@ -15730,7 +15733,7 @@ packages:
dev: false
file:projects/cosmos.tgz:
resolution: {integrity: sha512-WFROFTfIF7dWC6zyQcbcvmXRoV7h6IUrNqb0Z/CPnoULMJKQTCUAL253aGj/4HrUf3BE0LU+xLkOK+B6gSN8PA==, tarball: file:projects/cosmos.tgz}
resolution: {integrity: sha512-CtITkph7jz48HsNI/kTsOushqH3+fDwLm27HbpIVQ8GNLuxMk0Qyd5O+MeuirjngP1VJq0M4lq9AEfj41I4bAg==, tarball: file:projects/cosmos.tgz}
name: '@rush-temp/cosmos'
version: 0.0.0
dependencies:
@ -15867,7 +15870,7 @@ packages:
dev: false
file:projects/digital-twins-core.tgz:
resolution: {integrity: sha512-C3MJn479PjL1HtfGa1euqS9Deq2LHP10GIUlLsKcR/t7nU/x7qTxxtHJ9xY68bgmfDslUCSK6DasSxaE2ttsnA==, tarball: file:projects/digital-twins-core.tgz}
resolution: {integrity: sha512-kIKHHdoizneYXxt/04v8PPTIix3BRz3R+5W4IB4LPKxWyGbOcxCmmfMLJQR2qi21aodoUAVQlYXRh1Qx9oPNdw==, tarball: file:projects/digital-twins-core.tgz}
name: '@rush-temp/digital-twins-core'
version: 0.0.0
dependencies:
@ -16801,7 +16804,7 @@ packages:
dev: false
file:projects/monitor-opentelemetry-exporter.tgz:
resolution: {integrity: sha512-1dmSLd76k6lNZQ6TVkvh9LO2zx3hD1ZNRAbe0BbtCLwpm0WS4RsVhMsZMZjl3+qJFlIfw2gXCMWobZuhe/0Mgg==, tarball: file:projects/monitor-opentelemetry-exporter.tgz}
resolution: {integrity: sha512-ubHP0HYjZmKqD02JYENR0TlCMmn6DIbJqw24rQebJWWD38YkShWd+ajvMqfa0yItOYP/uZDYZXxrPuTpkx+VPA==, tarball: file:projects/monitor-opentelemetry-exporter.tgz}
name: '@rush-temp/monitor-opentelemetry-exporter'
version: 0.0.0
dependencies:

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

@ -1,15 +1,13 @@
# Release History
## 4.1.0 (2022-06-29)
**Features**
## 4.0.1 (Unreleased)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
- Added Interface AnalysisServicesServer
- Added Interface AnalysisServicesServerProperties
## 4.0.0 (2021-12-27)
The package of @azure/arm-analysisservices is using our next generation design principles since version 4.0.0, which contains breaking changes.

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

@ -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

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

@ -1,6 +1,6 @@
# Azure Service client library for JavaScript
# AzureAnalysisServices client library for JavaScript
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureAnalysisServices client.
The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers
@ -16,13 +16,15 @@ The Azure Analysis Services Web API provides a RESTful set of web services that
- [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].
### Install the `@azure/arm-analysisservices` package
Install the Azure Service client library for JavaScript with `npm`:
Install the AzureAnalysisServices client library for JavaScript with `npm`:
```bash
npm install @azure/arm-analysisservices
@ -30,8 +32,8 @@ npm install @azure/arm-analysisservices
### Create and authenticate a `AzureAnalysisServices`
To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal].
To create a client object to access the AzureAnalysisServices API, you will need the `endpoint` of your AzureAnalysisServices resource and a `credential`. The AzureAnalysisServices client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzureAnalysisServices resource in the [Azure Portal][azure_portal].
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
@ -41,7 +43,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```
You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to AzureAnalysisServices** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { AzureAnalysisServices } = require("@azure/arm-analysisservices");
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 AzureAnalysisServices(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 AzureAnalysisServices(credential, subscriptionId);
```
@ -61,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For
### AzureAnalysisServices
`AzureAnalysisServices` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access.
`AzureAnalysisServices` is the primary interface for developers using the AzureAnalysisServices client library. Explore the methods on this client object to understand the different features of the AzureAnalysisServices service that you can access.
## Troubleshooting

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

@ -1,7 +1,8 @@
{
"commit": "c77c6c634dc3644d65d3e35df5d73a9c34d3c956",
"readme": "specification/analysisservices/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/analysisservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"readme": "specification\\analysisservices\\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:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\analysisservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1",
"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.3.2",
"use": "@autorest/typescript@6.0.0-rc.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-analysisservices.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"
}
}
}
}
}

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

@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for AzureAnalysisServices.",
"version": "4.0.1",
"version": "4.1.0",
"engines": {
"node": ">=12.0.0"
},
@ -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,19 +30,23 @@
"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",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/analysisservices/arm-analysisservices",
"repository": {
@ -93,10 +97,17 @@
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/azureAnalysisServices.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true
}
}

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

@ -1,5 +0,0 @@
let nock = require('nock');
module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
module.exports.testInfo = {"uniqueName":{},"newDate":{}}

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

@ -0,0 +1,4 @@
{
"Entries": [],
"Variables": {}
}

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

@ -11,19 +11,19 @@ import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
// @public
export type AnalysisServicesServer = Resource & {
export interface AnalysisServicesServer extends Resource {
asAdministrators?: ServerAdministrators;
backupBlobContainerUri?: string;
gatewayDetails?: GatewayDetails;
ipV4FirewallSettings?: IPv4FirewallSettings;
querypoolConnectionMode?: ConnectionMode;
managedMode?: ManagedMode;
serverMonitorMode?: ServerMonitorMode;
readonly state?: State;
readonly provisioningState?: ProvisioningState;
querypoolConnectionMode?: ConnectionMode;
readonly serverFullName?: string;
serverMonitorMode?: ServerMonitorMode;
skuPropertiesSku?: ResourceSku;
};
readonly state?: State;
}
// @public
export interface AnalysisServicesServerMutableProperties {
@ -37,12 +37,12 @@ export interface AnalysisServicesServerMutableProperties {
}
// @public
export type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
readonly state?: State;
export interface AnalysisServicesServerProperties extends AnalysisServicesServerMutableProperties {
readonly provisioningState?: ProvisioningState;
readonly serverFullName?: string;
sku?: ResourceSku;
};
readonly state?: State;
}
// @public
export interface AnalysisServicesServers {
@ -139,7 +139,7 @@ export interface GatewayListStatusError {
// @public
export interface GatewayListStatusLive {
status?: "undefined";
status?: 0;
}
// @public
@ -157,67 +157,40 @@ export interface IPv4FirewallSettings {
// @public
export enum KnownProvisioningState {
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
Paused = "Paused",
// (undocumented)
Pausing = "Pausing",
// (undocumented)
Preparing = "Preparing",
// (undocumented)
Provisioning = "Provisioning",
// (undocumented)
Resuming = "Resuming",
// (undocumented)
Scaling = "Scaling",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Suspended = "Suspended",
// (undocumented)
Suspending = "Suspending",
// (undocumented)
Updating = "Updating"
}
// @public
export enum KnownSkuTier {
// (undocumented)
Basic = "Basic",
// (undocumented)
Development = "Development",
// (undocumented)
Standard = "Standard"
}
// @public
export enum KnownState {
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
Paused = "Paused",
// (undocumented)
Pausing = "Pausing",
// (undocumented)
Preparing = "Preparing",
// (undocumented)
Provisioning = "Provisioning",
// (undocumented)
Resuming = "Resuming",
// (undocumented)
Scaling = "Scaling",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Suspended = "Suspended",
// (undocumented)
Suspending = "Suspending",
// (undocumented)
Updating = "Updating"
}

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

@ -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=

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

@ -7,6 +7,12 @@
*/
import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import {
PipelineRequest,
PipelineResponse,
SendRequest
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import { ServersImpl, OperationsImpl } from "./operations";
import { Servers, Operations } from "./operationsInterfaces";
@ -45,24 +51,45 @@ export class AzureAnalysisServices extends coreClient.ServiceClient {
credential: credentials
};
const packageDetails = `azsdk-js-arm-analysisservices/4.0.0`;
const packageDetails = `azsdk-js-arm-analysisservices/4.1.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
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;
@ -71,6 +98,35 @@ export class AzureAnalysisServices extends coreClient.ServiceClient {
this.apiVersion = options.apiVersion || "2017-08-01";
this.servers = new ServersImpl(this);
this.operations = new OperationsImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
}
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
private addCustomApiVersionPolicy(apiVersion?: string) {
if (!apiVersion) {
return;
}
const apiVersionPolicy = {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
const newParams = param[1].split("&").map((item) => {
if (item.indexOf("api-version") > -1) {
return "api-version=" + apiVersion;
} else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}
servers: Servers;

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

@ -216,7 +216,7 @@ export interface SkuDetailsForExistingResource {
/** Status of gateway is live. */
export interface GatewayListStatusLive {
/** Live message of list gateway. Status: 0 - Live */
status?: "undefined";
status?: 0;
}
/** Status of gateway is error. */
@ -403,7 +403,8 @@ export interface LogSpecifications {
}
/** Properties of Analysis Services resource. */
export type AnalysisServicesServerProperties = AnalysisServicesServerMutableProperties & {
export interface AnalysisServicesServerProperties
extends AnalysisServicesServerMutableProperties {
/**
* The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.
* NOTE: This property will not be serialized. It can only be populated by the server.
@ -421,10 +422,10 @@ export type AnalysisServicesServerProperties = AnalysisServicesServerMutableProp
readonly serverFullName?: string;
/** The SKU of the Analysis Services resource. */
sku?: ResourceSku;
};
}
/** Represents an instance of an Analysis Services resource. */
export type AnalysisServicesServer = Resource & {
export interface AnalysisServicesServer extends Resource {
/** A collection of AS server administrators */
asAdministrators?: ServerAdministrators;
/** The SAS container URI to the backup container. */
@ -456,21 +457,33 @@ export type AnalysisServicesServer = Resource & {
readonly serverFullName?: string;
/** The SKU of the Analysis Services resource. */
skuPropertiesSku?: ResourceSku;
};
}
/** Known values of {@link State} that the service accepts. */
export enum KnownState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"
}
@ -496,17 +509,29 @@ export type State = string;
/** Known values of {@link ProvisioningState} that the service accepts. */
export enum KnownProvisioningState {
/** Deleting */
Deleting = "Deleting",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed",
/** Paused */
Paused = "Paused",
/** Suspended */
Suspended = "Suspended",
/** Provisioning */
Provisioning = "Provisioning",
/** Updating */
Updating = "Updating",
/** Suspending */
Suspending = "Suspending",
/** Pausing */
Pausing = "Pausing",
/** Resuming */
Resuming = "Resuming",
/** Preparing */
Preparing = "Preparing",
/** Scaling */
Scaling = "Scaling"
}
@ -532,8 +557,11 @@ export type ProvisioningState = string;
/** Known values of {@link SkuTier} that the service accepts. */
export enum KnownSkuTier {
/** Development */
Development = "Development",
/** Basic */
Basic = "Basic",
/** Standard */
Standard = "Standard"
}

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

@ -219,10 +219,12 @@ export class ServersImpl implements Servers {
{ resourceGroupName, serverName, serverParameters, options },
createOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
@ -307,10 +309,12 @@ export class ServersImpl implements Servers {
{ resourceGroupName, serverName, options },
deleteOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
@ -395,10 +399,12 @@ export class ServersImpl implements Servers {
{ resourceGroupName, serverName, serverUpdateParameters, options },
updateOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
@ -482,10 +488,12 @@ export class ServersImpl implements Servers {
{ resourceGroupName, serverName, options },
suspendOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
@ -566,10 +574,12 @@ export class ServersImpl implements Servers {
{ resourceGroupName, serverName, options },
resumeOperationSpec
);
return new LroEngine(lro, {
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**

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

@ -7,35 +7,30 @@
*/
import {
env,
record,
RecorderEnvironmentSetup,
Recorder
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import * as assert from "assert";
import { assert } from "chai";
import { Context } from "mocha";
const recorderEnvSetup: RecorderEnvironmentSetup = {
replaceableVariables: {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
},
customizationsOnRecordings: [
(recording: any): any =>
recording.replace(
/"access_token":"[^"]*"/g,
`"access_token":"access_token"`
)
],
queryParametersToSkip: []
const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};
const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};
describe("My test", () => {
let recorder: Recorder;
beforeEach(async function() {
recorder = record(this, recorderEnvSetup);
beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});
afterEach(async function() {

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

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

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

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