diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 61cec91a5106..034ba9caaf87 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3928,7 +3928,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20230210 + typescript: 5.0.0-dev.20230213 dev: false /downlevel-dts/0.7.0: @@ -8712,8 +8712,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20230210: - resolution: {integrity: sha512-FjXPw8PFeIuT1cxouvP4LRu8J1G+FsWVEGwlJ9GcVywRNDfD3Hh6flQFUympS+3QnAIiG/+CHs9ZS2EQIT733g==} + /typescript/5.0.0-dev.20230213: + resolution: {integrity: sha512-6winpoAguZ2b0juVOseKRELa6eIx8st5j42fHikEhzBb2NcuG7tSGMAjIo748WNXVija2L8T5D7vyaDGYftaDQ==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -10053,15 +10053,15 @@ packages: dev: false file:projects/arm-appinsights.tgz: - resolution: {integrity: sha512-02oJncDbBrfc5O7e7ECDNp1+ZFNT+Dp+Q3aY83YJ8nYZU0H3iNW3/iPQqzODCAMMQTp3UH23fjpm5phSk7GNQg==, tarball: file:projects/arm-appinsights.tgz} + resolution: {integrity: sha512-WWx5TTfTSW89srbnxQBo3vHS7RK02eWdSky+r4/5vs+cTSf1aJ9wz6nWu0dbyNqiX1AcRzkKLCweV2+5k0uhSA==, tarball: file:projects/arm-appinsights.tgz} name: '@rush-temp/arm-appinsights' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.3_@types+node@14.18.36 - '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 - '@rollup/plugin-json': 6.0.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.36 diff --git a/sdk/applicationinsights/arm-appinsights/CHANGELOG.md b/sdk/applicationinsights/arm-appinsights/CHANGELOG.md index 633554b2daa2..8226dfd016bc 100644 --- a/sdk/applicationinsights/arm-appinsights/CHANGELOG.md +++ b/sdk/applicationinsights/arm-appinsights/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 5.0.0-beta.8 (2023-02-13) -## 5.0.0-beta.8 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 5.0.0-beta.7 (2022-11-15) - -The package of @azure/arm-appinsights is using our next generation design principles since version 5.0.0-beta.7, which contains breaking changes. +The package of @azure/arm-appinsights is using our next generation design principles since version 5.0.0-beta.8, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/applicationinsights/arm-appinsights/LICENSE b/sdk/applicationinsights/arm-appinsights/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/applicationinsights/arm-appinsights/LICENSE +++ b/sdk/applicationinsights/arm-appinsights/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 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 diff --git a/sdk/applicationinsights/arm-appinsights/_meta.json b/sdk/applicationinsights/arm-appinsights/_meta.json index 37ce19e81c21..1421e51ebfc7 100644 --- a/sdk/applicationinsights/arm-appinsights/_meta.json +++ b/sdk/applicationinsights/arm-appinsights/_meta.json @@ -1,8 +1,8 @@ { - "commit": "261f2cd5b009f319d44149da020c42e3d0832a7a", + "commit": "8faf2fba327d1edce1b752cd66c33101ddce1a81", "readme": "specification/applicationinsights/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\applicationinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/applicationinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/package.json b/sdk/applicationinsights/arm-appinsights/package.json index ffea3c998ed0..70e72739a25e 100644 --- a/sdk/applicationinsights/arm-appinsights/package.json +++ b/sdk/applicationinsights/arm-appinsights/package.json @@ -27,9 +27,9 @@ "types": "./types/arm-appinsights.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-multi-entry": "^6.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": "^2.66.1", @@ -108,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appinsights?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md b/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md index dcba0d2cd1cd..c5676301d644 100644 --- a/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md +++ b/sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md @@ -35,7 +35,7 @@ export type AnalyticsItemsGetResponse = ApplicationInsightsComponentAnalyticsIte export interface AnalyticsItemsListOptionalParams extends coreClient.OperationOptions { includeContent?: boolean; scope?: ItemScope; - typeParam?: ItemTypeParameter; + type?: ItemTypeParameter; } // @public @@ -399,6 +399,8 @@ export class ApplicationInsightsManagementClient extends coreClient.ServiceClien // (undocumented) myWorkbooks: MyWorkbooks; // (undocumented) + operations: Operations; + // (undocumented) proactiveDetectionConfigurations: ProactiveDetectionConfigurations; // (undocumented) subscriptionId: string; @@ -654,9 +656,17 @@ export interface ErrorDefinition { readonly message?: string; } +// @public +export interface ErrorFieldContract { + code?: string; + message?: string; + target?: string; +} + // @public export interface ErrorResponse { code?: string; + details?: ErrorFieldContract[]; message?: string; } @@ -783,6 +793,12 @@ export type FlowType = string; // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface HeaderField { + headerFieldName?: string; + headerFieldValue?: string; +} + // @public export type IngestionMode = string; @@ -1044,9 +1060,6 @@ export type MyWorkbooksGetResponse = MyWorkbook; // @public export interface MyWorkbooksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - canFetchContent?: boolean; - sourceId?: string; - tags?: string[]; } // @public @@ -1064,8 +1077,6 @@ export type MyWorkbooksListByResourceGroupResponse = MyWorkbooksListResult; // @public export interface MyWorkbooksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - canFetchContent?: boolean; - tags?: string[]; } // @public @@ -1137,6 +1148,25 @@ export interface OperationLive { properties?: Record; } +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + // @public export interface OperationsListResult { nextLink?: string; @@ -1240,9 +1270,11 @@ export interface WebTest extends WebtestsResource { kind?: WebTestKind; locations?: WebTestGeolocation[]; readonly provisioningState?: string; + request?: WebTestPropertiesRequest; retryEnabled?: boolean; syntheticMonitorId?: string; timeout?: number; + validationRules?: WebTestPropertiesValidationRules; webTestKind?: WebTestKind; webTestName?: string; } @@ -1253,7 +1285,7 @@ export interface WebTestGeolocation { } // @public -export type WebTestKind = "ping" | "multistep"; +export type WebTestKind = "ping" | "multistep" | "standard"; // @public export interface WebTestListResult { @@ -1278,6 +1310,32 @@ export interface WebTestPropertiesConfiguration { webTest?: string; } +// @public +export interface WebTestPropertiesRequest { + followRedirects?: boolean; + headers?: HeaderField[]; + httpVerb?: string; + parseDependentRequests?: boolean; + requestBody?: string; + requestUrl?: string; +} + +// @public +export interface WebTestPropertiesValidationRules { + contentValidation?: WebTestPropertiesValidationRulesContentValidation; + expectedHttpStatusCode?: number; + ignoreHttpStatusCode?: boolean; + sSLCertRemainingLifetimeCheck?: number; + sSLCheck?: boolean; +} + +// @public +export interface WebTestPropertiesValidationRulesContentValidation { + contentMatch?: string; + ignoreCase?: boolean; + passIfTextFound?: boolean; +} + // @public export interface WebTests { createOrUpdate(resourceGroupName: string, webTestName: string, webTestDefinition: WebTest, options?: WebTestsCreateOrUpdateOptionalParams): Promise; @@ -1391,7 +1449,7 @@ export interface WorkbookError { // @public export interface WorkbookErrorDefinition { readonly code?: string; - readonly innerError?: any; + readonly innererror?: WorkbookInnerErrorTrace; readonly message?: string; } @@ -1448,9 +1506,6 @@ export type WorkbookSharedTypeKind = string; // @public export interface WorkbooksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - canFetchContent?: boolean; - sourceId?: string; - tags?: string[]; } // @public @@ -1468,8 +1523,6 @@ export type WorkbooksListByResourceGroupResponse = WorkbooksListResult; // @public export interface WorkbooksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - canFetchContent?: boolean; - tags?: string[]; } // @public diff --git a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts index b8d18849a886..8b20b253d6c1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts +++ b/sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts @@ -10,6 +10,7 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + ComponentsImpl, AnnotationsImpl, APIKeysImpl, ExportConfigurationsImpl, @@ -23,14 +24,15 @@ import { WebTestLocationsImpl, WebTestsImpl, AnalyticsItemsImpl, + OperationsImpl, WorkbookTemplatesImpl, MyWorkbooksImpl, WorkbooksImpl, - ComponentsImpl, - ComponentLinkedStorageAccountsOperationsImpl, - LiveTokenImpl + LiveTokenImpl, + ComponentLinkedStorageAccountsOperationsImpl } from "./operations"; import { + Components, Annotations, APIKeys, ExportConfigurations, @@ -44,12 +46,12 @@ import { WebTestLocations, WebTests, AnalyticsItems, + Operations, WorkbookTemplates, MyWorkbooks, Workbooks, - Components, - ComponentLinkedStorageAccountsOperations, - LiveToken + LiveToken, + ComponentLinkedStorageAccountsOperations } from "./operationsInterfaces"; import { ApplicationInsightsManagementClientOptionalParams } from "./models"; @@ -137,6 +139,7 @@ export class ApplicationInsightsManagementClient extends coreClient.ServiceClien // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; + this.components = new ComponentsImpl(this); this.annotations = new AnnotationsImpl(this); this.aPIKeys = new APIKeysImpl(this); this.exportConfigurations = new ExportConfigurationsImpl(this); @@ -156,16 +159,17 @@ export class ApplicationInsightsManagementClient extends coreClient.ServiceClien this.webTestLocations = new WebTestLocationsImpl(this); this.webTests = new WebTestsImpl(this); this.analyticsItems = new AnalyticsItemsImpl(this); + this.operations = new OperationsImpl(this); this.workbookTemplates = new WorkbookTemplatesImpl(this); this.myWorkbooks = new MyWorkbooksImpl(this); this.workbooks = new WorkbooksImpl(this); - this.components = new ComponentsImpl(this); + this.liveToken = new LiveTokenImpl(this); this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsImpl( this ); - this.liveToken = new LiveTokenImpl(this); } + components: Components; annotations: Annotations; aPIKeys: APIKeys; exportConfigurations: ExportConfigurations; @@ -179,10 +183,10 @@ export class ApplicationInsightsManagementClient extends coreClient.ServiceClien webTestLocations: WebTestLocations; webTests: WebTests; analyticsItems: AnalyticsItems; + operations: Operations; workbookTemplates: WorkbookTemplates; myWorkbooks: MyWorkbooks; workbooks: Workbooks; - components: Components; - componentLinkedStorageAccountsOperations: ComponentLinkedStorageAccountsOperations; liveToken: LiveToken; + componentLinkedStorageAccountsOperations: ComponentLinkedStorageAccountsOperations; } diff --git a/sdk/applicationinsights/arm-appinsights/src/models/index.ts b/sdk/applicationinsights/arm-appinsights/src/models/index.ts index 94b54288e67f..53dfe689456c 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/index.ts @@ -8,6 +8,102 @@ import * as coreClient from "@azure/core-client"; +/** Describes the list of Application Insights Resources. */ +export interface ApplicationInsightsComponentListResult { + /** List of Application Insights component definitions. */ + value: ApplicationInsightsComponent[]; + /** The URI to get the next set of Application Insights component definitions if too many components where returned in the result set. */ + nextLink?: string; +} + +/** The private link scope resource reference. */ +export interface PrivateLinkScopedResource { + /** The full resource Id of the private link scope resource. */ + resourceId?: string; + /** The private link scope unique Identifier. */ + scopeId?: string; +} + +/** An azure resource object */ +export interface ComponentsResource { + /** + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Azure resource name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +export interface ErrorResponseComponents { + /** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ + error?: ErrorResponseComponentsError; +} + +/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponseComponentsError { + /** + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. */ +export interface TagsResource { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Describes the body of a purge request for an App Insights component */ +export interface ComponentPurgeBody { + /** Table from which to purge data. */ + table: string; + /** The set of columns and filters (queries) to run over them to purge the resulting data. */ + filters: ComponentPurgeBodyFilters[]; +} + +/** User-defined filters to return data which will be purged from the table. */ +export interface ComponentPurgeBodyFilters { + /** The column of the table over which the given query should run */ + column?: string; + /** A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query. */ + operator?: string; + /** the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values. */ + value?: any; + /** When filtering over custom dimensions, this key will be used as the name of the custom dimension. */ + key?: string; +} + +/** Response containing operationId for a specific purge action. */ +export interface ComponentPurgeResponse { + /** Id to use when querying for status for a particular purge operation. */ + operationId: string; +} + +/** Response containing status for a specific purge operation. */ +export interface ComponentPurgeStatusResponse { + /** Status of the operation represented by the requested Id. */ + status: PurgeState; +} + /** Annotations list result. */ export interface AnnotationsListResult { /** @@ -565,17 +661,17 @@ export interface ApplicationInsightsComponentWebTestLocation { readonly tag?: string; } -/** A list of 0 or more Application Insights web test definitions. */ +/** A list of 0 or more Application Insights WebTest definitions. */ export interface WebTestListResult { - /** Set of Application Insights web test definitions. */ + /** Set of Application Insights WebTest definitions. */ value: WebTest[]; - /** The link to get the next part of the returned list of web tests, should the return set be too large for a single request. May be null. */ + /** The link to get the next part of the returned list of WebTest, should the return set be too large for a single request. May be null. */ nextLink?: string; } -/** Geo-physical location to run a web test from. You must specify one or more locations for the test to run from. */ +/** Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. */ export interface WebTestGeolocation { - /** Location ID for the webtest to run from. */ + /** Location ID for the WebTest to run from. */ location?: string; } @@ -585,6 +681,54 @@ export interface WebTestPropertiesConfiguration { webTest?: string; } +/** The collection of request properties */ +export interface WebTestPropertiesRequest { + /** Url location to test. */ + requestUrl?: string; + /** List of headers and their values to add to the WebTest call. */ + headers?: HeaderField[]; + /** Http verb to use for this web test. */ + httpVerb?: string; + /** Base64 encoded string body to send with this web test. */ + requestBody?: string; + /** Parse Dependent request for this WebTest. */ + parseDependentRequests?: boolean; + /** Follow redirects for this web test. */ + followRedirects?: boolean; +} + +/** A header to add to the WebTest. */ +export interface HeaderField { + /** The name of the header. */ + headerFieldName?: string; + /** The value of the header. */ + headerFieldValue?: string; +} + +/** The collection of validation rule properties */ +export interface WebTestPropertiesValidationRules { + /** The collection of content validation properties */ + contentValidation?: WebTestPropertiesValidationRulesContentValidation; + /** Checks to see if the SSL cert is still valid. */ + sSLCheck?: boolean; + /** A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the SSLCheck must be set to true. */ + sSLCertRemainingLifetimeCheck?: number; + /** Validate that the WebTest returns the http status code provided. */ + expectedHttpStatusCode?: number; + /** When set, validation will ignore the status code. */ + ignoreHttpStatusCode?: boolean; +} + +/** The collection of content validation properties */ +export interface WebTestPropertiesValidationRulesContentValidation { + /** Content to look for in the return of the WebTest. Must not be null or empty. */ + contentMatch?: string; + /** When set, this value makes the ContentMatch validation case insensitive. */ + ignoreCase?: boolean; + /** When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail if there is a match */ + passIfTextFound?: boolean; +} + /** An azure resource object */ export interface WebtestsResource { /** @@ -608,12 +752,6 @@ export interface WebtestsResource { tags?: { [propertyName: string]: string }; } -/** A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. */ -export interface TagsResource { - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - /** Properties that define an Analytics item that is associated to an Application Insights component. */ export interface ApplicationInsightsComponentAnalyticsItem { /** Internally assigned unique id of the item definition. */ @@ -651,6 +789,52 @@ export interface ApplicationInsightsComponentAnalyticsItemProperties { functionAlias?: string; } +/** Result of the request to list Azure Workbooks operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** List of Workbook operations supported by the Microsoft.Insights resource provider. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; +} + +/** Azure Workbooks REST API operation */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that represents the operation. */ + display?: OperationDisplay; +} + +/** The object that represents the operation. */ +export interface OperationDisplay { + /** Service provider: Microsoft.Insights */ + provider?: string; + /** Resource on which the operation is performed: Profile, endpoint, etc. */ + resource?: string; + /** Operation type: Read, write, delete, etc. */ + operation?: string; +} + +/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ +export interface ErrorResponse { + /** Error code. */ + code?: string; + /** Error message indicating why the operation failed. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; +} + +/** Error Field contract. */ +export interface ErrorFieldContract { + /** Property level error code. */ + code?: string; + /** Human-readable representation of property-level error. */ + message?: string; + /** Property name. */ + target?: string; +} + /** WorkbookTemplate list result. */ export interface WorkbookTemplatesListResult { /** An array of workbook templates. */ @@ -918,7 +1102,16 @@ export interface WorkbookErrorDefinition { * Internal error details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly innerError?: any; + readonly innererror?: WorkbookInnerErrorTrace; +} + +/** Error details */ +export interface WorkbookInnerErrorTrace { + /** + * detailed error trace + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly trace?: string[]; } /** The parameters that can be provided when updating workbook properties properties. */ @@ -941,94 +1134,13 @@ export interface WorkbookUpdateParameters { revision?: string; } -/** Describes the list of Application Insights Resources. */ -export interface ApplicationInsightsComponentListResult { - /** List of Application Insights component definitions. */ - value: ApplicationInsightsComponent[]; - /** The URI to get the next set of Application Insights component definitions if too many components where returned in the result set. */ - nextLink?: string; -} - -/** The private link scope resource reference. */ -export interface PrivateLinkScopedResource { - /** The full resource Id of the private link scope resource. */ - resourceId?: string; - /** The private link scope unique Identifier. */ - scopeId?: string; -} - -/** An azure resource object */ -export interface ComponentsResource { - /** - * Azure resource Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Azure resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource location */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -export interface ErrorResponseComponents { - /** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ - error?: ErrorResponseComponentsError; -} - -/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ -export interface ErrorResponseComponentsError { - /** - * Error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; +/** The response to a live token query. */ +export interface LiveTokenResponse { /** - * Error message indicating why the operation failed. + * JWT token for accessing live metrics stream data. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; -} - -/** Describes the body of a purge request for an App Insights component */ -export interface ComponentPurgeBody { - /** Table from which to purge data. */ - table: string; - /** The set of columns and filters (queries) to run over them to purge the resulting data. */ - filters: ComponentPurgeBodyFilters[]; -} - -/** User-defined filters to return data which will be purged from the table. */ -export interface ComponentPurgeBodyFilters { - /** The column of the table over which the given query should run */ - column?: string; - /** A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL query. */ - operator?: string; - /** the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of values. */ - value?: any; - /** When filtering over custom dimensions, this key will be used as the name of the custom dimension. */ - key?: string; -} - -/** Response containing operationId for a specific purge action. */ -export interface ComponentPurgeResponse { - /** Id to use when querying for status for a particular purge operation. */ - operationId: string; -} - -/** Response containing status for a specific purge operation. */ -export interface ComponentPurgeStatusResponse { - /** Status of the operation represented by the requested Id. */ - status: PurgeState; + readonly liveToken?: string; } export interface ErrorResponseLinkedStorage { @@ -1056,65 +1168,13 @@ export interface ComponentLinkedStorageAccountsPatch { linkedStorageAccount?: string; } -/** The response to a live token query. */ -export interface LiveTokenResponse { +/** Error details */ +export interface InnerErrorTrace { /** - * JWT token for accessing live metrics stream data. + * detailed error trace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly liveToken?: string; -} - -/** Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message. */ -export interface ErrorResponse { - /** Error code. */ - code?: string; - /** Error message indicating why the operation failed. */ - message?: string; -} - -/** CDN REST API operation */ -export interface Operation { - /** Operation name: {provider}/{resource}/{operation} */ - name?: string; - /** The object that represents the operation. */ - display?: OperationDisplay; -} - -/** The object that represents the operation. */ -export interface OperationDisplay { - /** Service provider: Microsoft.Cdn */ - provider?: string; - /** Resource on which the operation is performed: Profile, endpoint, etc. */ - resource?: string; - /** Operation type: Read, write, delete, etc. */ - operation?: string; -} - -/** Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { - /** List of CDN operations supported by the CDN resource provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Error details */ -export interface InnerErrorTrace { - /** - * detailed error trace - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly trace?: string[]; -} - -/** Error details */ -export interface WorkbookInnerErrorTrace { - /** - * detailed error trace - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly trace?: string[]; + readonly trace?: string[]; } /** Result of the List Operations operation */ @@ -1151,100 +1211,6 @@ export interface OperationInfo { description?: string; } -/** An Application Insights web test definition. */ -export interface WebTest extends WebtestsResource { - /** The kind of web test that this web test watches. Choices are ping and multistep. */ - kind?: WebTestKind; - /** Unique ID of this WebTest. This is typically the same value as the Name field. */ - syntheticMonitorId?: string; - /** User defined name if this WebTest. */ - webTestName?: string; - /** Purpose/user defined descriptive test for this WebTest. */ - description?: string; - /** Is the test actively being monitored. */ - enabled?: boolean; - /** Interval in seconds between test runs for this WebTest. Default value is 300. */ - frequency?: number; - /** Seconds until this WebTest will timeout and fail. Default value is 30. */ - timeout?: number; - /** The kind of web test this is, valid choices are ping and multistep. */ - webTestKind?: WebTestKind; - /** Allow for retries should this WebTest fail. */ - retryEnabled?: boolean; - /** A list of where to physically run the tests from to give global coverage for accessibility of your application. */ - locations?: WebTestGeolocation[]; - /** An XML configuration specification for a WebTest. */ - configuration?: WebTestPropertiesConfiguration; - /** - * Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** An Application Insights workbook template definition. */ -export interface WorkbookTemplate extends WorkbookTemplateResource { - /** Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. */ - priority?: number; - /** Information about the author of the workbook template. */ - author?: string; - /** Valid JSON object containing workbook template payload. */ - templateData?: Record; - /** Workbook galleries supported by the template. */ - galleries?: WorkbookTemplateGallery[]; - /** Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. */ - localized?: { [propertyName: string]: WorkbookTemplateLocalizedGallery[] }; -} - -/** An Application Insights private workbook definition. */ -export interface MyWorkbook extends MyWorkbookResource { - /** The kind of workbook. Choices are user and shared. */ - kind?: Kind; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The user-defined name of the private workbook. */ - displayName?: string; - /** Configuration of this particular private workbook. Configuration data is a string containing valid JSON */ - serializedData?: string; - /** This instance's version of the data model. This can change as new features are added that can be marked private workbook. */ - version?: string; - /** - * Date and time in UTC of the last modification that was made to this private workbook definition. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly timeModified?: string; - /** Workbook category, as defined by the user at creation time. */ - category?: string; - /** A list of 0 or more tags that are associated with this private workbook definition */ - tagsPropertiesTags?: string[]; - /** - * Unique user id of the specific user that owns this private workbook. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** Optional resourceId for a source resource. */ - sourceId?: string; - /** BYOS Storage Account URI */ - storageUri?: string; -} - -/** Identity used for BYOS */ -export interface WorkbookResourceIdentity extends ManagedServiceIdentity {} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - /** An Application Insights component definition. */ export interface ApplicationInsightsComponent extends ComponentsResource { /** The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. */ @@ -1336,6 +1302,104 @@ export interface ApplicationInsightsComponent extends ComponentsResource { forceCustomerStorageForProfiler?: boolean; } +/** An Application Insights WebTest definition. */ +export interface WebTest extends WebtestsResource { + /** The kind of WebTest that this web test watches. Choices are ping, multistep and standard. */ + kind?: WebTestKind; + /** Unique ID of this WebTest. This is typically the same value as the Name field. */ + syntheticMonitorId?: string; + /** User defined name if this WebTest. */ + webTestName?: string; + /** User defined description for this WebTest. */ + description?: string; + /** Is the test actively being monitored. */ + enabled?: boolean; + /** Interval in seconds between test runs for this WebTest. Default value is 300. */ + frequency?: number; + /** Seconds until this WebTest will timeout and fail. Default value is 30. */ + timeout?: number; + /** The kind of web test this is, valid choices are ping, multistep and standard. */ + webTestKind?: WebTestKind; + /** Allow for retries should this WebTest fail. */ + retryEnabled?: boolean; + /** A list of where to physically run the tests from to give global coverage for accessibility of your application. */ + locations?: WebTestGeolocation[]; + /** An XML configuration specification for a WebTest. */ + configuration?: WebTestPropertiesConfiguration; + /** + * Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The collection of request properties */ + request?: WebTestPropertiesRequest; + /** The collection of validation rule properties */ + validationRules?: WebTestPropertiesValidationRules; +} + +/** An Application Insights workbook template definition. */ +export interface WorkbookTemplate extends WorkbookTemplateResource { + /** Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. */ + priority?: number; + /** Information about the author of the workbook template. */ + author?: string; + /** Valid JSON object containing workbook template payload. */ + templateData?: Record; + /** Workbook galleries supported by the template. */ + galleries?: WorkbookTemplateGallery[]; + /** Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. */ + localized?: { [propertyName: string]: WorkbookTemplateLocalizedGallery[] }; +} + +/** An Application Insights private workbook definition. */ +export interface MyWorkbook extends MyWorkbookResource { + /** The kind of workbook. Choices are user and shared. */ + kind?: Kind; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The user-defined name of the private workbook. */ + displayName?: string; + /** Configuration of this particular private workbook. Configuration data is a string containing valid JSON */ + serializedData?: string; + /** This instance's version of the data model. This can change as new features are added that can be marked private workbook. */ + version?: string; + /** + * Date and time in UTC of the last modification that was made to this private workbook definition. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeModified?: string; + /** Workbook category, as defined by the user at creation time. */ + category?: string; + /** A list of 0 or more tags that are associated with this private workbook definition */ + tagsPropertiesTags?: string[]; + /** + * Unique user id of the specific user that owns this private workbook. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly userId?: string; + /** Optional resourceId for a source resource. */ + sourceId?: string; + /** BYOS Storage Account URI */ + storageUri?: string; +} + +/** Identity used for BYOS */ +export interface WorkbookResourceIdentity extends ManagedServiceIdentity {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + /** An azure resource object */ export interface WorkbookResource extends TrackedResource { /** Identity used for BYOS */ @@ -1392,6 +1456,111 @@ export interface Workbook extends WorkbookResource { readonly revision?: string; } +/** Known values of {@link ApplicationType} that the service accepts. */ +export enum KnownApplicationType { + /** Web */ + Web = "web", + /** Other */ + Other = "other" +} + +/** + * Defines values for ApplicationType. \ + * {@link KnownApplicationType} can be used interchangeably with ApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **web** \ + * **other** + */ +export type ApplicationType = string; + +/** Known values of {@link FlowType} that the service accepts. */ +export enum KnownFlowType { + /** Bluefield */ + Bluefield = "Bluefield" +} + +/** + * Defines values for FlowType. \ + * {@link KnownFlowType} can be used interchangeably with FlowType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Bluefield** + */ +export type FlowType = string; + +/** Known values of {@link RequestSource} that the service accepts. */ +export enum KnownRequestSource { + /** Rest */ + Rest = "rest" +} + +/** + * Defines values for RequestSource. \ + * {@link KnownRequestSource} can be used interchangeably with RequestSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **rest** + */ +export type RequestSource = string; + +/** Known values of {@link PublicNetworkAccessType} that the service accepts. */ +export enum KnownPublicNetworkAccessType { + /** Enables connectivity to Application Insights through public DNS. */ + Enabled = "Enabled", + /** Disables public connectivity to Application Insights through public DNS. */ + Disabled = "Disabled" +} + +/** + * Defines values for PublicNetworkAccessType. \ + * {@link KnownPublicNetworkAccessType} can be used interchangeably with PublicNetworkAccessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enables connectivity to Application Insights through public DNS. \ + * **Disabled**: Disables public connectivity to Application Insights through public DNS. + */ +export type PublicNetworkAccessType = string; + +/** Known values of {@link IngestionMode} that the service accepts. */ +export enum KnownIngestionMode { + /** ApplicationInsights */ + ApplicationInsights = "ApplicationInsights", + /** ApplicationInsightsWithDiagnosticSettings */ + ApplicationInsightsWithDiagnosticSettings = "ApplicationInsightsWithDiagnosticSettings", + /** LogAnalytics */ + LogAnalytics = "LogAnalytics" +} + +/** + * Defines values for IngestionMode. \ + * {@link KnownIngestionMode} can be used interchangeably with IngestionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ApplicationInsights** \ + * **ApplicationInsightsWithDiagnosticSettings** \ + * **LogAnalytics** + */ +export type IngestionMode = string; + +/** Known values of {@link PurgeState} that the service accepts. */ +export enum KnownPurgeState { + /** Pending */ + Pending = "pending", + /** Completed */ + Completed = "completed" +} + +/** + * Defines values for PurgeState. \ + * {@link KnownPurgeState} can be used interchangeably with PurgeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **pending** \ + * **completed** + */ +export type PurgeState = string; + /** Known values of {@link FavoriteSourceType} that the service accepts. */ export enum KnownFavoriteSourceType { /** Retention */ @@ -1590,173 +1759,68 @@ export enum KnownMyWorkbookManagedIdentityType { } /** - * Defines values for MyWorkbookManagedIdentityType. \ - * {@link KnownMyWorkbookManagedIdentityType} can be used interchangeably with MyWorkbookManagedIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **UserAssigned** \ - * **None** - */ -export type MyWorkbookManagedIdentityType = string; - -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" -} - -/** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** - */ -export type ManagedServiceIdentityType = string; - -/** Known values of {@link WorkbookSharedTypeKind} that the service accepts. */ -export enum KnownWorkbookSharedTypeKind { - /** Shared */ - Shared = "shared" -} - -/** - * Defines values for WorkbookSharedTypeKind. \ - * {@link KnownWorkbookSharedTypeKind} can be used interchangeably with WorkbookSharedTypeKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **shared** - */ -export type WorkbookSharedTypeKind = string; - -/** Known values of {@link WorkbookUpdateSharedTypeKind} that the service accepts. */ -export enum KnownWorkbookUpdateSharedTypeKind { - /** Shared */ - Shared = "shared" -} - -/** - * Defines values for WorkbookUpdateSharedTypeKind. \ - * {@link KnownWorkbookUpdateSharedTypeKind} can be used interchangeably with WorkbookUpdateSharedTypeKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **shared** - */ -export type WorkbookUpdateSharedTypeKind = string; - -/** Known values of {@link ApplicationType} that the service accepts. */ -export enum KnownApplicationType { - /** Web */ - Web = "web", - /** Other */ - Other = "other" -} - -/** - * Defines values for ApplicationType. \ - * {@link KnownApplicationType} can be used interchangeably with ApplicationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **web** \ - * **other** - */ -export type ApplicationType = string; - -/** Known values of {@link FlowType} that the service accepts. */ -export enum KnownFlowType { - /** Bluefield */ - Bluefield = "Bluefield" -} - -/** - * Defines values for FlowType. \ - * {@link KnownFlowType} can be used interchangeably with FlowType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Bluefield** - */ -export type FlowType = string; - -/** Known values of {@link RequestSource} that the service accepts. */ -export enum KnownRequestSource { - /** Rest */ - Rest = "rest" -} - -/** - * Defines values for RequestSource. \ - * {@link KnownRequestSource} can be used interchangeably with RequestSource, + * Defines values for MyWorkbookManagedIdentityType. \ + * {@link KnownMyWorkbookManagedIdentityType} can be used interchangeably with MyWorkbookManagedIdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **rest** + * **UserAssigned** \ + * **None** */ -export type RequestSource = string; +export type MyWorkbookManagedIdentityType = string; -/** Known values of {@link PublicNetworkAccessType} that the service accepts. */ -export enum KnownPublicNetworkAccessType { - /** Enables connectivity to Application Insights through public DNS. */ - Enabled = "Enabled", - /** Disables public connectivity to Application Insights through public DNS. */ - Disabled = "Disabled" +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" } /** - * Defines values for PublicNetworkAccessType. \ - * {@link KnownPublicNetworkAccessType} can be used interchangeably with PublicNetworkAccessType, + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled**: Enables connectivity to Application Insights through public DNS. \ - * **Disabled**: Disables public connectivity to Application Insights through public DNS. + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** */ -export type PublicNetworkAccessType = string; +export type ManagedServiceIdentityType = string; -/** Known values of {@link IngestionMode} that the service accepts. */ -export enum KnownIngestionMode { - /** ApplicationInsights */ - ApplicationInsights = "ApplicationInsights", - /** ApplicationInsightsWithDiagnosticSettings */ - ApplicationInsightsWithDiagnosticSettings = "ApplicationInsightsWithDiagnosticSettings", - /** LogAnalytics */ - LogAnalytics = "LogAnalytics" +/** Known values of {@link WorkbookSharedTypeKind} that the service accepts. */ +export enum KnownWorkbookSharedTypeKind { + /** Shared */ + Shared = "shared" } /** - * Defines values for IngestionMode. \ - * {@link KnownIngestionMode} can be used interchangeably with IngestionMode, + * Defines values for WorkbookSharedTypeKind. \ + * {@link KnownWorkbookSharedTypeKind} can be used interchangeably with WorkbookSharedTypeKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ApplicationInsights** \ - * **ApplicationInsightsWithDiagnosticSettings** \ - * **LogAnalytics** + * **shared** */ -export type IngestionMode = string; +export type WorkbookSharedTypeKind = string; -/** Known values of {@link PurgeState} that the service accepts. */ -export enum KnownPurgeState { - /** Pending */ - Pending = "pending", - /** Completed */ - Completed = "completed" +/** Known values of {@link WorkbookUpdateSharedTypeKind} that the service accepts. */ +export enum KnownWorkbookUpdateSharedTypeKind { + /** Shared */ + Shared = "shared" } /** - * Defines values for PurgeState. \ - * {@link KnownPurgeState} can be used interchangeably with PurgeState, + * Defines values for WorkbookUpdateSharedTypeKind. \ + * {@link KnownWorkbookUpdateSharedTypeKind} can be used interchangeably with WorkbookUpdateSharedTypeKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **pending** \ - * **completed** + * **shared** */ -export type PurgeState = string; +export type WorkbookUpdateSharedTypeKind = string; /** Known values of {@link StorageType} that the service accepts. */ export enum KnownStorageType { @@ -1775,7 +1839,74 @@ export type StorageType = string; /** Defines values for FavoriteType. */ export type FavoriteType = "shared" | "user"; /** Defines values for WebTestKind. */ -export type WebTestKind = "ping" | "multistep"; +export type WebTestKind = "ping" | "multistep" | "standard"; + +/** Optional parameters. */ +export interface ComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ComponentsListResponse = ApplicationInsightsComponentListResult; + +/** Optional parameters. */ +export interface ComponentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult; + +/** Optional parameters. */ +export interface ComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ComponentsGetResponse = ApplicationInsightsComponent; + +/** Optional parameters. */ +export interface ComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent; + +/** Optional parameters. */ +export interface ComponentsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent; + +/** Optional parameters. */ +export interface ComponentsPurgeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the purge operation. */ +export type ComponentsPurgeResponse = ComponentPurgeResponse; + +/** Optional parameters. */ +export interface ComponentsGetPurgeStatusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getPurgeStatus operation. */ +export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse; + +/** Optional parameters. */ +export interface ComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ComponentsListNextResponse = ApplicationInsightsComponentListResult; + +/** Optional parameters. */ +export interface ComponentsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ComponentsListByResourceGroupNextResponse = ApplicationInsightsComponentListResult; /** Optional parameters. */ export interface AnnotationsListOptionalParams @@ -2080,7 +2211,7 @@ export interface AnalyticsItemsListOptionalParams /** Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. */ scope?: ItemScope; /** Enum indicating the type of the Analytics item. */ - typeParam?: ItemTypeParameter; + type?: ItemTypeParameter; /** Flag indicating whether or not to return the content of each applicable item. If false, only return the item information. */ includeContent?: boolean; } @@ -2119,6 +2250,20 @@ export interface AnalyticsItemsDeleteOptionalParams name?: string; } +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + /** Optional parameters. */ export interface WorkbookTemplatesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} @@ -2213,26 +2358,14 @@ export type MyWorkbooksUpdateResponse = MyWorkbook; /** Optional parameters. */ export interface MyWorkbooksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ - canFetchContent?: boolean; - /** Tags presents on each workbook returned. */ - tags?: string[]; - /** Azure Resource Id that will fetch all linked workbooks. */ - sourceId?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type MyWorkbooksListByResourceGroupNextResponse = MyWorkbooksListResult; /** Optional parameters. */ export interface MyWorkbooksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ - canFetchContent?: boolean; - /** Tags presents on each workbook returned. */ - tags?: string[]; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type MyWorkbooksListBySubscriptionNextResponse = MyWorkbooksListResult; @@ -2315,26 +2448,14 @@ export type WorkbooksRevisionGetResponse = Workbook; /** Optional parameters. */ export interface WorkbooksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ - canFetchContent?: boolean; - /** Tags presents on each workbook returned. */ - tags?: string[]; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type WorkbooksListBySubscriptionNextResponse = WorkbooksListResult; /** Optional parameters. */ export interface WorkbooksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */ - canFetchContent?: boolean; - /** Tags presents on each workbook returned. */ - tags?: string[]; - /** Azure Resource Id that will fetch all linked workbooks. */ - sourceId?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type WorkbooksListByResourceGroupNextResponse = WorkbooksListResult; @@ -2347,71 +2468,11 @@ export interface WorkbooksRevisionsListNextOptionalParams export type WorkbooksRevisionsListNextResponse = WorkbooksListResult; /** Optional parameters. */ -export interface ComponentsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ComponentsListResponse = ApplicationInsightsComponentListResult; - -/** Optional parameters. */ -export interface ComponentsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ComponentsListByResourceGroupResponse = ApplicationInsightsComponentListResult; - -/** Optional parameters. */ -export interface ComponentsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ComponentsGetOptionalParams +export interface LiveTokenGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ComponentsGetResponse = ApplicationInsightsComponent; - -/** Optional parameters. */ -export interface ComponentsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ComponentsCreateOrUpdateResponse = ApplicationInsightsComponent; - -/** Optional parameters. */ -export interface ComponentsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ComponentsUpdateTagsResponse = ApplicationInsightsComponent; - -/** Optional parameters. */ -export interface ComponentsPurgeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the purge operation. */ -export type ComponentsPurgeResponse = ComponentPurgeResponse; - -/** Optional parameters. */ -export interface ComponentsGetPurgeStatusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPurgeStatus operation. */ -export type ComponentsGetPurgeStatusResponse = ComponentPurgeStatusResponse; - -/** Optional parameters. */ -export interface ComponentsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ComponentsListNextResponse = ApplicationInsightsComponentListResult; - -/** Optional parameters. */ -export interface ComponentsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ComponentsListByResourceGroupNextResponse = ApplicationInsightsComponentListResult; +export type LiveTokenGetResponse = LiveTokenResponse; /** Optional parameters. */ export interface ComponentLinkedStorageAccountsGetOptionalParams @@ -2438,13 +2499,6 @@ export type ComponentLinkedStorageAccountsUpdateResponse = ComponentLinkedStorag export interface ComponentLinkedStorageAccountsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface LiveTokenGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LiveTokenGetResponse = LiveTokenResponse; - /** Optional parameters. */ export interface ApplicationInsightsManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts b/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts index 1b0a3199878a..be017c6b77e5 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/mappers.ts @@ -8,6 +8,248 @@ import * as coreClient from "@azure/core-client"; +export const ApplicationInsightsComponentListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationInsightsComponentListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationInsightsComponent" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkScopedResource", + modelProperties: { + resourceId: { + serializedName: "ResourceId", + type: { + name: "String" + } + }, + scopeId: { + serializedName: "ScopeId", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentsResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ErrorResponseComponents: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseComponents", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseComponentsError" + } + } + } + } +}; + +export const ErrorResponseComponentsError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseComponentsError", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TagsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ComponentPurgeBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentPurgeBody", + modelProperties: { + table: { + serializedName: "table", + required: true, + type: { + name: "String" + } + }, + filters: { + serializedName: "filters", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComponentPurgeBodyFilters" + } + } + } + } + } + } +}; + +export const ComponentPurgeBodyFilters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentPurgeBodyFilters", + modelProperties: { + column: { + serializedName: "column", + type: { + name: "String" + } + }, + operator: { + serializedName: "operator", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "any" + } + }, + key: { + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const ComponentPurgeResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentPurgeResponse", + modelProperties: { + operationId: { + serializedName: "operationId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ComponentPurgeStatusResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComponentPurgeStatusResponse", + modelProperties: { + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const AnnotationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1240,55 +1482,178 @@ export const WebTestPropertiesConfiguration: coreClient.CompositeMapper = { } }; -export const WebtestsResource: coreClient.CompositeMapper = { +export const WebTestPropertiesRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebtestsResource", + className: "WebTestPropertiesRequest", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + requestUrl: { + serializedName: "RequestUrl", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + headers: { + serializedName: "Headers", type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HeaderField" + } + } + } + }, + httpVerb: { + serializedName: "HttpVerb", type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + requestBody: { + serializedName: "RequestBody", type: { name: "String" } }, - tags: { - serializedName: "tags", + parseDependentRequests: { + serializedName: "ParseDependentRequests", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Boolean" + } + }, + followRedirects: { + serializedName: "FollowRedirects", + type: { + name: "Boolean" } } } } }; -export const TagsResource: coreClient.CompositeMapper = { +export const HeaderField: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsResource", + className: "HeaderField", + modelProperties: { + headerFieldName: { + serializedName: "key", + type: { + name: "String" + } + }, + headerFieldValue: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const WebTestPropertiesValidationRules: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebTestPropertiesValidationRules", + modelProperties: { + contentValidation: { + serializedName: "ContentValidation", + type: { + name: "Composite", + className: "WebTestPropertiesValidationRulesContentValidation" + } + }, + sSLCheck: { + serializedName: "SSLCheck", + type: { + name: "Boolean" + } + }, + sSLCertRemainingLifetimeCheck: { + serializedName: "SSLCertRemainingLifetimeCheck", + type: { + name: "Number" + } + }, + expectedHttpStatusCode: { + serializedName: "ExpectedHttpStatusCode", + type: { + name: "Number" + } + }, + ignoreHttpStatusCode: { + serializedName: "IgnoreHttpStatusCode", + type: { + name: "Boolean" + } + } + } + } +}; + +export const WebTestPropertiesValidationRulesContentValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebTestPropertiesValidationRulesContentValidation", + modelProperties: { + contentMatch: { + serializedName: "ContentMatch", + type: { + name: "String" + } + }, + ignoreCase: { + serializedName: "IgnoreCase", + type: { + name: "Boolean" + } + }, + passIfTextFound: { + serializedName: "PassIfTextFound", + type: { + name: "Boolean" + } + } + } + } +}; + +export const WebtestsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebtestsResource", modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, tags: { serializedName: "tags", type: { @@ -1382,6 +1747,142 @@ export const ApplicationInsightsComponentAnalyticsItemProperties: coreClient.Com } }; +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorFieldContract" + } + } + } + } + } + } +}; + +export const ErrorFieldContract: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorFieldContract", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + export const WorkbookTemplatesListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2027,21 +2528,42 @@ export const WorkbookErrorDefinition: coreClient.CompositeMapper = { name: "String" } }, - innerError: { - serializedName: "innerError", - readOnly: true, + innererror: { + serializedName: "innererror", type: { - name: "any" + name: "Composite", + className: "WorkbookInnerErrorTrace" } } } } }; -export const WorkbookUpdateParameters: coreClient.CompositeMapper = { +export const WorkbookInnerErrorTrace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkbookUpdateParameters", + className: "WorkbookInnerErrorTrace", + modelProperties: { + trace: { + serializedName: "trace", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WorkbookUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkbookUpdateParameters", modelProperties: { kind: { serializedName: "kind", @@ -2103,26 +2625,14 @@ export const WorkbookUpdateParameters: coreClient.CompositeMapper = { } }; -export const ApplicationInsightsComponentListResult: coreClient.CompositeMapper = { +export const LiveTokenResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationInsightsComponentListResult", + className: "LiveTokenResponse", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationInsightsComponent" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + liveToken: { + serializedName: "liveToken", + readOnly: true, type: { name: "String" } @@ -2131,180 +2641,174 @@ export const ApplicationInsightsComponentListResult: coreClient.CompositeMapper } }; -export const PrivateLinkScopedResource: coreClient.CompositeMapper = { +export const ErrorResponseLinkedStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkScopedResource", + className: "ErrorResponseLinkedStorage", modelProperties: { - resourceId: { - serializedName: "ResourceId", - type: { - name: "String" - } - }, - scopeId: { - serializedName: "ScopeId", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorResponseLinkedStorageError" } } } } }; -export const ComponentsResource: coreClient.CompositeMapper = { +export const ErrorResponseLinkedStorageError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentsResource", + className: "ErrorResponseLinkedStorageError", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", + code: { + serializedName: "code", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + message: { + serializedName: "message", readOnly: true, type: { name: "String" } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } } } } }; -export const ErrorResponseComponents: coreClient.CompositeMapper = { +export const ComponentLinkedStorageAccountsPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponseComponents", + className: "ComponentLinkedStorageAccountsPatch", modelProperties: { - error: { - serializedName: "error", + linkedStorageAccount: { + serializedName: "properties.linkedStorageAccount", type: { - name: "Composite", - className: "ErrorResponseComponentsError" + name: "String" } } } } }; -export const ErrorResponseComponentsError: coreClient.CompositeMapper = { +export const InnerErrorTrace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponseComponentsError", + className: "InnerErrorTrace", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", + trace: { + serializedName: "trace", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ComponentPurgeBody: coreClient.CompositeMapper = { +export const OperationsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeBody", + className: "OperationsListResult", modelProperties: { - table: { - serializedName: "table", - required: true, - type: { - name: "String" - } - }, - filters: { - serializedName: "filters", - required: true, + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ComponentPurgeBodyFilters" + className: "OperationLive" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const ComponentPurgeBodyFilters: coreClient.CompositeMapper = { +export const OperationLive: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeBodyFilters", + className: "OperationLive", modelProperties: { - column: { - serializedName: "column", + name: { + serializedName: "name", type: { name: "String" } }, - operator: { - serializedName: "operator", + isDataAction: { + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } }, - value: { - serializedName: "value", + display: { + serializedName: "display", type: { - name: "any" + name: "Composite", + className: "OperationInfo" } }, - key: { - serializedName: "key", + origin: { + serializedName: "origin", type: { name: "String" } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } } } } }; -export const ComponentPurgeResponse: coreClient.CompositeMapper = { +export const OperationInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeResponse", + className: "OperationInfo", modelProperties: { - operationId: { - serializedName: "operationId", - required: true, + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -2313,326 +2817,196 @@ export const ComponentPurgeResponse: coreClient.CompositeMapper = { } }; -export const ComponentPurgeStatusResponse: coreClient.CompositeMapper = { +export const ApplicationInsightsComponent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComponentPurgeStatusResponse", + className: "ApplicationInsightsComponent", modelProperties: { - status: { - serializedName: "status", + ...ComponentsResource.type.modelProperties, + kind: { + serializedName: "kind", required: true, type: { name: "String" } - } - } - } -}; - -export const ErrorResponseLinkedStorage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseLinkedStorage", - modelProperties: { - error: { - serializedName: "error", + }, + etag: { + serializedName: "etag", type: { - name: "Composite", - className: "ErrorResponseLinkedStorageError" + name: "String" } - } - } - } -}; - -export const ErrorResponseLinkedStorageError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseLinkedStorageError", - modelProperties: { - code: { - serializedName: "code", + }, + applicationId: { + serializedName: "properties.ApplicationId", readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", + appId: { + serializedName: "properties.AppId", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ComponentLinkedStorageAccountsPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ComponentLinkedStorageAccountsPatch", - modelProperties: { - linkedStorageAccount: { - serializedName: "properties.linkedStorageAccount", + }, + namePropertiesName: { + serializedName: "properties.Name", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const LiveTokenResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveTokenResponse", - modelProperties: { - liveToken: { - serializedName: "liveToken", - readOnly: true, + }, + applicationType: { + defaultValue: "web", + serializedName: "properties.Application_Type", type: { name: "String" } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", + }, + flowType: { + defaultValue: "Bluefield", + serializedName: "properties.Flow_Type", type: { name: "String" } }, - message: { - serializedName: "message", + requestSource: { + defaultValue: "rest", + serializedName: "properties.Request_Source", type: { name: "String" } - } - } - } -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", + }, + instrumentationKey: { + serializedName: "properties.InstrumentationKey", + readOnly: true, type: { name: "String" } }, - display: { - serializedName: "display", + creationDate: { + serializedName: "properties.CreationDate", + readOnly: true, type: { - name: "Composite", - className: "OperationDisplay" + name: "DateTime" } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + tenantId: { + serializedName: "properties.TenantId", + readOnly: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + hockeyAppId: { + serializedName: "properties.HockeyAppId", type: { name: "String" } }, - operation: { - serializedName: "operation", + hockeyAppToken: { + serializedName: "properties.HockeyAppToken", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + samplingPercentage: { + serializedName: "properties.SamplingPercentage", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const InnerErrorTrace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InnerErrorTrace", - modelProperties: { - trace: { - serializedName: "trace", + }, + connectionString: { + serializedName: "properties.ConnectionString", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - } - } - } -}; - -export const WorkbookInnerErrorTrace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkbookInnerErrorTrace", - modelProperties: { - trace: { - serializedName: "trace", - readOnly: true, + }, + retentionInDays: { + serializedName: "properties.RetentionInDays", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } - } - } - } -}; - -export const OperationsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationsListResult", - modelProperties: { - value: { - serializedName: "value", + }, + disableIpMasking: { + serializedName: "properties.DisableIpMasking", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationLive" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", + immediatePurgeDataOn30Days: { + serializedName: "properties.ImmediatePurgeDataOn30Days", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const OperationLive: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationLive", - modelProperties: { - name: { - serializedName: "name", + }, + workspaceResourceId: { + serializedName: "properties.WorkspaceResourceId", type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + laMigrationDate: { + serializedName: "properties.LaMigrationDate", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - display: { - serializedName: "display", + privateLinkScopedResources: { + serializedName: "properties.PrivateLinkScopedResources", + readOnly: true, type: { - name: "Composite", - className: "OperationInfo" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } } }, - origin: { - serializedName: "origin", + publicNetworkAccessForIngestion: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccessForIngestion", type: { name: "String" } }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const OperationInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationInfo", - modelProperties: { - provider: { - serializedName: "provider", + publicNetworkAccessForQuery: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccessForQuery", type: { name: "String" } }, - resource: { - serializedName: "resource", + ingestionMode: { + defaultValue: "LogAnalytics", + serializedName: "properties.IngestionMode", type: { name: "String" } }, - operation: { - serializedName: "operation", + disableLocalAuth: { + serializedName: "properties.DisableLocalAuth", type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + forceCustomerStorageForProfiler: { + serializedName: "properties.ForceCustomerStorageForProfiler", type: { - name: "String" + name: "Boolean" } } } @@ -2649,7 +3023,7 @@ export const WebTest: coreClient.CompositeMapper = { serializedName: "kind", type: { name: "Enum", - allowedValues: ["ping", "multistep"] + allowedValues: ["ping", "multistep", "standard"] } }, syntheticMonitorId: { @@ -2694,7 +3068,7 @@ export const WebTest: coreClient.CompositeMapper = { serializedName: "properties.Kind", type: { name: "Enum", - allowedValues: ["ping", "multistep"] + allowedValues: ["ping", "multistep", "standard"] } }, retryEnabled: { @@ -2728,6 +3102,20 @@ export const WebTest: coreClient.CompositeMapper = { type: { name: "String" } + }, + request: { + serializedName: "properties.Request", + type: { + name: "Composite", + className: "WebTestPropertiesRequest" + } + }, + validationRules: { + serializedName: "properties.ValidationRules", + type: { + name: "Composite", + className: "WebTestPropertiesValidationRules" + } } } } @@ -2921,202 +3309,6 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; -export const ApplicationInsightsComponent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationInsightsComponent", - modelProperties: { - ...ComponentsResource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - type: { - name: "String" - } - }, - applicationId: { - serializedName: "properties.ApplicationId", - readOnly: true, - type: { - name: "String" - } - }, - appId: { - serializedName: "properties.AppId", - readOnly: true, - type: { - name: "String" - } - }, - namePropertiesName: { - serializedName: "properties.Name", - readOnly: true, - type: { - name: "String" - } - }, - applicationType: { - defaultValue: "web", - serializedName: "properties.Application_Type", - type: { - name: "String" - } - }, - flowType: { - defaultValue: "Bluefield", - serializedName: "properties.Flow_Type", - type: { - name: "String" - } - }, - requestSource: { - defaultValue: "rest", - serializedName: "properties.Request_Source", - type: { - name: "String" - } - }, - instrumentationKey: { - serializedName: "properties.InstrumentationKey", - readOnly: true, - type: { - name: "String" - } - }, - creationDate: { - serializedName: "properties.CreationDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - tenantId: { - serializedName: "properties.TenantId", - readOnly: true, - type: { - name: "String" - } - }, - hockeyAppId: { - serializedName: "properties.HockeyAppId", - type: { - name: "String" - } - }, - hockeyAppToken: { - serializedName: "properties.HockeyAppToken", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - samplingPercentage: { - serializedName: "properties.SamplingPercentage", - type: { - name: "Number" - } - }, - connectionString: { - serializedName: "properties.ConnectionString", - readOnly: true, - type: { - name: "String" - } - }, - retentionInDays: { - serializedName: "properties.RetentionInDays", - type: { - name: "Number" - } - }, - disableIpMasking: { - serializedName: "properties.DisableIpMasking", - type: { - name: "Boolean" - } - }, - immediatePurgeDataOn30Days: { - serializedName: "properties.ImmediatePurgeDataOn30Days", - type: { - name: "Boolean" - } - }, - workspaceResourceId: { - serializedName: "properties.WorkspaceResourceId", - type: { - name: "String" - } - }, - laMigrationDate: { - serializedName: "properties.LaMigrationDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - privateLinkScopedResources: { - serializedName: "properties.PrivateLinkScopedResources", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkScopedResource" - } - } - } - }, - publicNetworkAccessForIngestion: { - defaultValue: "Enabled", - serializedName: "properties.publicNetworkAccessForIngestion", - type: { - name: "String" - } - }, - publicNetworkAccessForQuery: { - defaultValue: "Enabled", - serializedName: "properties.publicNetworkAccessForQuery", - type: { - name: "String" - } - }, - ingestionMode: { - defaultValue: "LogAnalytics", - serializedName: "properties.IngestionMode", - type: { - name: "String" - } - }, - disableLocalAuth: { - serializedName: "properties.DisableLocalAuth", - type: { - name: "Boolean" - } - }, - forceCustomerStorageForProfiler: { - serializedName: "properties.ForceCustomerStorageForProfiler", - type: { - name: "Boolean" - } - } - } - } -}; - export const WorkbookResource: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts b/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts index 5f050754320e..dea1fd334775 100644 --- a/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts +++ b/sdk/applicationinsights/arm-appinsights/src/models/parameters.ts @@ -12,6 +12,9 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + ApplicationInsightsComponent as ApplicationInsightsComponentMapper, + TagsResource as TagsResourceMapper, + ComponentPurgeBody as ComponentPurgeBodyMapper, Annotation as AnnotationMapper, APIKeyRequest as APIKeyRequestMapper, ApplicationInsightsComponentExportRequest as ApplicationInsightsComponentExportRequestMapper, @@ -20,15 +23,12 @@ import { WorkItemCreateConfiguration as WorkItemCreateConfigurationMapper, ApplicationInsightsComponentFavorite as ApplicationInsightsComponentFavoriteMapper, WebTest as WebTestMapper, - TagsResource as TagsResourceMapper, ApplicationInsightsComponentAnalyticsItem as ApplicationInsightsComponentAnalyticsItemMapper, WorkbookTemplate as WorkbookTemplateMapper, WorkbookTemplateUpdateParameters as WorkbookTemplateUpdateParametersMapper, MyWorkbook as MyWorkbookMapper, Workbook as WorkbookMapper, WorkbookUpdateParameters as WorkbookUpdateParametersMapper, - ApplicationInsightsComponent as ApplicationInsightsComponentMapper, - ComponentPurgeBody as ComponentPurgeBodyMapper, ComponentLinkedStorageAccounts as ComponentLinkedStorageAccountsMapper, ComponentLinkedStorageAccountsPatch as ComponentLinkedStorageAccountsPatchMapper } from "../models/mappers"; @@ -57,6 +57,32 @@ export const $host: OperationURLParameter = { skipEncoding: true }; +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-02-02", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -72,25 +98,48 @@ export const resourceGroupName: OperationURLParameter = { } }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", +export const resourceName: OperationURLParameter = { + parameterPath: "resourceName", mapper: { - defaultValue: "2015-05-01", + serializedName: "resourceName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", isConstant: true, - serializedName: "api-version", + serializedName: "Content-Type", type: { name: "String" } } }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const insightProperties: OperationParameter = { + parameterPath: "insightProperties", + mapper: ApplicationInsightsComponentMapper +}; + +export const componentTags: OperationParameter = { + parameterPath: "componentTags", + mapper: TagsResourceMapper +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: ComponentPurgeBodyMapper +}; + +export const purgeId: OperationURLParameter = { + parameterPath: "purgeId", mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "subscriptionId", + serializedName: "purgeId", required: true, type: { name: "String" @@ -98,14 +147,27 @@ export const subscriptionId: OperationURLParameter = { } }; -export const resourceName: OperationURLParameter = { - parameterPath: "resourceName", +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "resourceName", + serializedName: "nextLink", required: true, type: { name: "String" } + }, + skipEncoding: true +}; + +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2015-05-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } } }; @@ -131,18 +193,6 @@ export const end: OperationQueryParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - export const annotationProperties: OperationParameter = { parameterPath: "annotationProperties", mapper: AnnotationMapper @@ -291,6 +341,18 @@ export const favoriteProperties: OperationParameter = { mapper: ApplicationInsightsComponentFavoriteMapper }; +export const apiVersion2: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-06-15", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const webTestName: OperationURLParameter = { parameterPath: "webTestName", mapper: { @@ -323,18 +385,6 @@ export const componentName: OperationURLParameter = { } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - export const scopePath: OperationURLParameter = { parameterPath: "scopePath", mapper: { @@ -356,7 +406,7 @@ export const scope: OperationQueryParameter = { } }; -export const typeParam: OperationQueryParameter = { +export const type: OperationQueryParameter = { parameterPath: ["options", "type"], mapper: { defaultValue: "none", @@ -412,7 +462,19 @@ export const overrideItem: OperationQueryParameter = { } }; -export const apiVersion1: OperationQueryParameter = { +export const apiVersion3: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-03-08", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const apiVersion4: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2020-11-20", @@ -455,24 +517,12 @@ export const sourceId: OperationQueryParameter = { } }; -export const apiVersion2: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-03-08", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - export const workbookProperties: OperationParameter = { parameterPath: "workbookProperties", mapper: MyWorkbookMapper }; -export const apiVersion3: OperationQueryParameter = { +export const apiVersion5: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-04-01", @@ -505,45 +555,31 @@ export const revisionId: OperationURLParameter = { } }; -export const apiVersion4: OperationQueryParameter = { - parameterPath: "apiVersion", +export const resourceUri: OperationURLParameter = { + parameterPath: "resourceUri", mapper: { - defaultValue: "2020-02-02", - isConstant: true, - serializedName: "api-version", + serializedName: "resourceUri", + required: true, type: { name: "String" } - } -}; - -export const insightProperties: OperationParameter = { - parameterPath: "insightProperties", - mapper: ApplicationInsightsComponentMapper -}; - -export const componentTags: OperationParameter = { - parameterPath: "componentTags", - mapper: TagsResourceMapper -}; - -export const body: OperationParameter = { - parameterPath: "body", - mapper: ComponentPurgeBodyMapper + }, + skipEncoding: true }; -export const purgeId: OperationURLParameter = { - parameterPath: "purgeId", +export const apiVersion6: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "purgeId", - required: true, + defaultValue: "2021-10-14", + isConstant: true, + serializedName: "api-version", type: { name: "String" } } }; -export const apiVersion5: OperationQueryParameter = { +export const apiVersion7: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2020-03-01-preview", @@ -575,27 +611,3 @@ export const linkedStorageAccountsProperties1: OperationParameter = { parameterPath: "linkedStorageAccountsProperties", mapper: ComponentLinkedStorageAccountsPatchMapper }; - -export const resourceUri: OperationURLParameter = { - parameterPath: "resourceUri", - mapper: { - serializedName: "resourceUri", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const apiVersion6: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-10-14", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts b/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts index f4d24cf4d9e2..5b5b5398e72a 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/aPIKeys.ts @@ -183,11 +183,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentAPIKeyListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -203,11 +203,11 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.aPIKeyProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -223,11 +223,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentAPIKey } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.keyId ], @@ -243,11 +243,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentAPIKey } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.keyId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts index e82a0517d7d6..94763976b256 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/analyticsItems.ts @@ -141,15 +141,15 @@ const listOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.scope, - Parameters.typeParam, + Parameters.type, Parameters.includeContent ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.scopePath ], @@ -165,11 +165,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentAnalyticsItem } }, - queryParameters: [Parameters.apiVersion, Parameters.id, Parameters.name], + queryParameters: [Parameters.apiVersion1, Parameters.id, Parameters.name], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.scopePath ], @@ -186,11 +186,11 @@ const putOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.itemProperties, - queryParameters: [Parameters.apiVersion, Parameters.overrideItem], + queryParameters: [Parameters.apiVersion1, Parameters.overrideItem], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.scopePath ], @@ -203,11 +203,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion, Parameters.id, Parameters.name], + queryParameters: [Parameters.apiVersion1, Parameters.id, Parameters.name], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.scopePath ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts index 46f766e81959..9a75bc254c34 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/annotations.ts @@ -216,11 +216,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AnnotationError } }, - queryParameters: [Parameters.apiVersion, Parameters.start, Parameters.end], + queryParameters: [Parameters.apiVersion1, Parameters.start, Parameters.end], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -244,11 +244,11 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.annotationProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -260,11 +260,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.annotationId ], @@ -287,11 +287,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AnnotationError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.annotationId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts index cb112acafb6c..4f5482418bb9 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentAvailableFeatures.ts @@ -58,11 +58,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentAvailableFeatures } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts index a3acc0fa2123..d1ad84315053 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentCurrentBillingFeatures.ts @@ -81,11 +81,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentBillingFeatures } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -101,11 +101,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.billingFeaturesProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts index 4b383c42e0c0..3c040b13a19b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentFeatureCapabilities.ts @@ -58,11 +58,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentFeatureCapabilities } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts index d9b50fde2a13..b33e0a789dc1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentLinkedStorageAccountsOperations.ts @@ -150,11 +150,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseLinkedStorage } }, - queryParameters: [Parameters.apiVersion5], + queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.storageType ], @@ -174,11 +174,11 @@ const createAndUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.linkedStorageAccountsProperties, - queryParameters: [Parameters.apiVersion5], + queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.storageType ], @@ -199,11 +199,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.linkedStorageAccountsProperties1, - queryParameters: [Parameters.apiVersion5], + queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.storageType ], @@ -222,11 +222,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseLinkedStorage } }, - queryParameters: [Parameters.apiVersion5], + queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.storageType ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts index 4acb374ee67f..1812d2625395 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/componentQuotaStatus.ts @@ -57,11 +57,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentQuotaStatus } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts index 8108a41f1ca1..f0323e7da1d4 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/components.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/components.ts @@ -280,6 +280,10 @@ export class ComponentsImpl implements Components { * should batch the execution of purge requests by sending a single command whose predicate includes * all user identities that require purging. Use the in operator to specify multiple identities. You * should run the query prior to using for a purge request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights + * resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to + * specific resource id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application @@ -365,7 +369,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -382,11 +386,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -402,11 +406,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -424,11 +428,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -447,11 +451,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.insightProperties, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -471,11 +475,11 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.componentTags, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -495,11 +499,11 @@ const purgeOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -518,11 +522,11 @@ const getPurgeStatusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.purgeId ], @@ -540,7 +544,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -560,11 +563,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseComponents } }, - queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts index 95c6930c80e8..e4d67b4d63ea 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/exportConfigurations.ts @@ -159,11 +159,11 @@ const listOperationSpec: coreClient.OperationSpec = { } } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -189,11 +189,11 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.exportProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -209,11 +209,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.exportId ], @@ -229,11 +229,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentExportConfiguration } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.exportId ], @@ -250,11 +250,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.exportProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.exportId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts index 841d9e65a5c1..81ebca0c8dc2 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/favorites.ts @@ -169,7 +169,7 @@ const listOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.favoriteType, Parameters.sourceType, Parameters.canFetchContent, @@ -177,8 +177,8 @@ const listOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -193,11 +193,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsComponentFavorite } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.favoriteId ], @@ -214,11 +214,11 @@ const addOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.favoriteProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.favoriteId ], @@ -236,11 +236,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.favoriteProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.favoriteId ], @@ -253,11 +253,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.favoriteId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts index d273af781cd5..2875bd43bf7b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./components"; export * from "./annotations"; export * from "./aPIKeys"; export * from "./exportConfigurations"; @@ -19,9 +20,9 @@ export * from "./favorites"; export * from "./webTestLocations"; export * from "./webTests"; export * from "./analyticsItems"; +export * from "./operations"; export * from "./workbookTemplates"; export * from "./myWorkbooks"; export * from "./workbooks"; -export * from "./components"; -export * from "./componentLinkedStorageAccountsOperations"; export * from "./liveToken"; +export * from "./componentLinkedStorageAccountsOperations"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts index bd61179653d9..2660fc626b46 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/myWorkbooks.ts @@ -15,8 +15,8 @@ import * as Parameters from "../models/parameters"; import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; import { MyWorkbook, - CategoryType, MyWorkbooksListByResourceGroupNextOptionalParams, + CategoryType, MyWorkbooksListByResourceGroupOptionalParams, MyWorkbooksListByResourceGroupResponse, MyWorkbooksListBySubscriptionNextOptionalParams, @@ -105,7 +105,6 @@ export class MyWorkbooksImpl implements MyWorkbooks { while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, - category, continuationToken, options ); @@ -171,11 +170,7 @@ export class MyWorkbooksImpl implements MyWorkbooks { yield page; } while (continuationToken) { - result = await this._listBySubscriptionNext( - category, - continuationToken, - options - ); + result = await this._listBySubscriptionNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -302,35 +297,31 @@ export class MyWorkbooksImpl implements MyWorkbooks { /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ private _listByResourceGroupNext( resourceGroupName: string, - category: CategoryType, nextLink: string, options?: MyWorkbooksListByResourceGroupNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, category, nextLink, options }, + { resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec ); } /** * ListBySubscriptionNext - * @param category Category of workbook to return. * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. * @param options The options parameters. */ private _listBySubscriptionNext( - category: CategoryType, nextLink: string, options?: MyWorkbooksListBySubscriptionNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { category, nextLink, options }, + { nextLink, options }, listBySubscriptionNextOperationSpec ); } @@ -353,14 +344,14 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.canFetchContent, Parameters.tags, + Parameters.apiVersion3, Parameters.category, - Parameters.sourceId, - Parameters.apiVersion2 + Parameters.sourceId ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -380,8 +371,8 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.canFetchContent, Parameters.tags, - Parameters.category, - Parameters.apiVersion2 + Parameters.apiVersion3, + Parameters.category ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], @@ -399,11 +390,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -420,11 +411,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -446,11 +437,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookProperties, - queryParameters: [Parameters.sourceId, Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3, Parameters.sourceId], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -470,11 +461,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookProperties, - queryParameters: [Parameters.sourceId, Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3, Parameters.sourceId], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -492,17 +483,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - queryParameters: [ - Parameters.canFetchContent, - Parameters.tags, - Parameters.category, - Parameters.sourceId, - Parameters.apiVersion2 - ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -519,12 +503,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.MyWorkbookError } }, - queryParameters: [ - Parameters.canFetchContent, - Parameters.tags, - Parameters.category, - Parameters.apiVersion2 - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts new file mode 100644 index 000000000000..ce551e977cc0 --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: ApplicationInsightsManagementClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: ApplicationInsightsManagementClient) { + this.client = client; + } + + /** + * Lists all of the available insights REST API operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all of the available insights REST API operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Insights/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts index 513948aeb59d..91132a7c9729 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/proactiveDetectionConfigurations.ts @@ -123,11 +123,11 @@ const listOperationSpec: coreClient.OperationSpec = { } } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -143,11 +143,11 @@ const getOperationSpec: coreClient.OperationSpec = { Mappers.ApplicationInsightsComponentProactiveDetectionConfiguration } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.configurationId ], @@ -165,11 +165,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.proactiveDetectionProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.configurationId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts index 1ed6971b6108..9a54c09892ca 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTestLocations.ts @@ -118,11 +118,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ApplicationInsightsWebTestLocationsListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts index cdc40d5a4e14..b115fad1da90 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/webTests.ts @@ -51,7 +51,7 @@ export class WebTestsImpl implements WebTests { } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for the specified resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -120,7 +120,7 @@ export class WebTestsImpl implements WebTests { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for the specified subscription. * @param options The options parameters. */ public list( @@ -258,7 +258,7 @@ export class WebTestsImpl implements WebTests { } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for the specified resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -275,7 +275,7 @@ export class WebTestsImpl implements WebTests { /** * Get a specific Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param options The options parameters. */ get( @@ -292,7 +292,7 @@ export class WebTestsImpl implements WebTests { /** * Creates or updates an Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application * Insights web test definition. * @param options The options parameters. @@ -310,10 +310,10 @@ export class WebTestsImpl implements WebTests { } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @param options The options parameters. */ updateTags( @@ -331,7 +331,7 @@ export class WebTestsImpl implements WebTests { /** * Deletes an Application Insights web test. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param options The options parameters. */ delete( @@ -346,7 +346,7 @@ export class WebTestsImpl implements WebTests { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for the specified subscription. * @param options The options parameters. */ private _list( @@ -435,11 +435,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -453,11 +453,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTest } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.webTestName ], headerParameters: [Parameters.accept], @@ -473,11 +473,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.webTestDefinition, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.webTestName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -494,11 +494,11 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.webTestTags, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.webTestName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -510,11 +510,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}", httpMethod: "DELETE", responses: { 200: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.webTestName ], serializer @@ -527,7 +527,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -541,11 +541,11 @@ const listByComponentOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.componentName ], headerParameters: [Parameters.accept], @@ -559,11 +559,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -577,7 +576,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -594,13 +592,12 @@ const listByComponentNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebTestListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.componentName, - Parameters.nextLink + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts index f4c87b96edda..b1b478a76d41 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workItemConfigurations.ts @@ -242,11 +242,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkItemConfigurationError } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -262,11 +262,11 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workItemConfigurationProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -282,11 +282,11 @@ const getDefaultOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkItemConfiguration } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -297,11 +297,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.workItemConfigId ], @@ -316,11 +316,11 @@ const getItemOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkItemConfiguration } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.workItemConfigId ], @@ -337,11 +337,11 @@ const updateItemOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workItemConfigurationProperties, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.workItemConfigId ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts index 1cde6cd8a09e..239ca6622f71 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbookTemplates.ts @@ -190,11 +190,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookTemplateError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -211,11 +211,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookTemplateError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -232,11 +232,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookTemplateError } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -258,11 +258,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookTemplateProperties, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -282,11 +282,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookTemplateUpdateParameters, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts index a5de76fcba90..cb86ad4ac724 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts @@ -15,8 +15,8 @@ import * as Parameters from "../models/parameters"; import { ApplicationInsightsManagementClient } from "../applicationInsightsManagementClient"; import { Workbook, - CategoryType, WorkbooksListBySubscriptionNextOptionalParams, + CategoryType, WorkbooksListBySubscriptionOptionalParams, WorkbooksListBySubscriptionResponse, WorkbooksListByResourceGroupNextOptionalParams, @@ -93,11 +93,7 @@ export class WorkbooksImpl implements Workbooks { yield page; } while (continuationToken) { - result = await this._listBySubscriptionNext( - category, - continuationToken, - options - ); + result = await this._listBySubscriptionNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -176,7 +172,6 @@ export class WorkbooksImpl implements Workbooks { while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, - category, continuationToken, options ); @@ -425,17 +420,15 @@ export class WorkbooksImpl implements Workbooks { /** * ListBySubscriptionNext - * @param category Category of workbook to return. * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. * @param options The options parameters. */ private _listBySubscriptionNext( - category: CategoryType, nextLink: string, options?: WorkbooksListBySubscriptionNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { category, nextLink, options }, + { nextLink, options }, listBySubscriptionNextOperationSpec ); } @@ -443,18 +436,16 @@ export class WorkbooksImpl implements Workbooks { /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param category Category of workbook to return. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ private _listByResourceGroupNext( resourceGroupName: string, - category: CategoryType, nextLink: string, options?: WorkbooksListByResourceGroupNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, category, nextLink, options }, + { resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec ); } @@ -497,7 +488,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { Parameters.canFetchContent, Parameters.tags, Parameters.category, - Parameters.apiVersion3 + Parameters.apiVersion5 ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], @@ -520,12 +511,12 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { Parameters.tags, Parameters.category, Parameters.sourceId, - Parameters.apiVersion3 + Parameters.apiVersion5 ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -542,11 +533,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [Parameters.canFetchContent, Parameters.apiVersion3], + queryParameters: [Parameters.canFetchContent, Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -563,11 +554,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -589,11 +580,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookProperties1, - queryParameters: [Parameters.sourceId, Parameters.apiVersion3], + queryParameters: [Parameters.sourceId, Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -605,6 +596,9 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName}", httpMethod: "PATCH", responses: { + 200: { + bodyMapper: Mappers.Workbook + }, 201: { bodyMapper: Mappers.Workbook }, @@ -613,11 +607,11 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.workbookUpdateParameters, - queryParameters: [Parameters.sourceId, Parameters.apiVersion3], + queryParameters: [Parameters.sourceId, Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -636,11 +630,11 @@ const revisionsListOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName ], headerParameters: [Parameters.accept], @@ -658,11 +652,11 @@ const revisionGetOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion5], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.revisionId ], @@ -680,12 +674,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [ - Parameters.canFetchContent, - Parameters.tags, - Parameters.category, - Parameters.apiVersion3 - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -705,17 +693,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [ - Parameters.canFetchContent, - Parameters.tags, - Parameters.category, - Parameters.sourceId, - Parameters.apiVersion3 - ], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -732,11 +713,10 @@ const revisionsListNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkbookError } }, - queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.resourceName, Parameters.nextLink ], diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts index 84fb14b12d30..18a4a96f28c1 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/components.ts @@ -102,6 +102,10 @@ export interface Components { * should batch the execution of purge requests by sending a single command whose predicate includes * all user identities that require purging. Use the in operator to specify multiple identities. You * should run the query prior to using for a purge request to verify that the results are expected. + * Note: this operation is intended for Classic resources, for workspace-based Application Insights + * resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to + * specific resource id. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts index d273af781cd5..2875bd43bf7b 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./components"; export * from "./annotations"; export * from "./aPIKeys"; export * from "./exportConfigurations"; @@ -19,9 +20,9 @@ export * from "./favorites"; export * from "./webTestLocations"; export * from "./webTests"; export * from "./analyticsItems"; +export * from "./operations"; export * from "./workbookTemplates"; export * from "./myWorkbooks"; export * from "./workbooks"; -export * from "./components"; -export * from "./componentLinkedStorageAccountsOperations"; export * from "./liveToken"; +export * from "./componentLinkedStorageAccountsOperations"; diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/operations.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..3b462eede82c --- /dev/null +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all of the available insights REST API operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts index 113a8444b933..120804a35cd8 100644 --- a/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts +++ b/sdk/applicationinsights/arm-appinsights/src/operationsInterfaces/webTests.ts @@ -26,7 +26,7 @@ import { /** Interface representing a WebTests. */ export interface WebTests { /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for the specified resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -35,7 +35,7 @@ export interface WebTests { options?: WebTestsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for the specified subscription. * @param options The options parameters. */ list( @@ -55,7 +55,7 @@ export interface WebTests { /** * Get a specific Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param options The options parameters. */ get( @@ -66,7 +66,7 @@ export interface WebTests { /** * Creates or updates an Application Insights web test definition. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application * Insights web test definition. * @param options The options parameters. @@ -78,10 +78,10 @@ export interface WebTests { options?: WebTestsCreateOrUpdateOptionalParams ): Promise; /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @param options The options parameters. */ updateTags( @@ -93,7 +93,7 @@ export interface WebTests { /** * Deletes an Application Insights web test. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param options The options parameters. */ delete( diff --git a/sdk/applicationinsights/arm-appinsights/src/pagingHelper.ts b/sdk/applicationinsights/arm-appinsights/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/applicationinsights/arm-appinsights/src/pagingHelper.ts +++ b/sdk/applicationinsights/arm-appinsights/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/applicationinsights/arm-appinsights/tsconfig.json b/sdk/applicationinsights/arm-appinsights/tsconfig.json index 996cead488fa..3e6ae96443f3 100644 --- a/sdk/applicationinsights/arm-appinsights/tsconfig.json +++ b/sdk/applicationinsights/arm-appinsights/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appinsights": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"