Arc bug fix: ADS Create DC wizard should prompt for Log Analytics workspace ID and access token similar to portal (#18742)

* Added monitor log-analytics workspace list to az api

* Made resource group and subscription optional for logs analytics workspace list

* Added dynamic fields for workspace names, id, primary key, based on value of auto-logs checkbox

* Hooked up the newly created source provider for log analytics workspaces. Dropdown now populates all workspace names.

* Added workspaceUtils.ts for a valueprovider. Now workspace name maps to id automatically.

* Replaced promise.all with promise.resolve

* Added workspace id and primary key as env variables in the notebook

* Removed extra space in package.json

* Made getOptions more concise and put azApi definition in function.

* Changed notebook to handle new Azure CLI command with param --clustername
This commit is contained in:
Candice Ye
2022-03-17 20:57:16 -07:00
committed by GitHub
parent d6abcb892d
commit a786e63445
10 changed files with 200 additions and 3 deletions

View File

@@ -187,6 +187,45 @@ declare module 'az-ext' {
state: string //Completed
}
export interface LogAnalyticsWorkspaceListResult {
createdDate: string, // "2020-02-25T16:59:38Z"
customerId: string, // "7e136a79-c0b6-4878-86bf-7bf7a6a7e6f6",
eTag: string, // null,
etag: string, // "\"00006df1-0000-0700-0000-61ee552f0000\"",
features: {
clusterResourceId: string, // null,
disableLocalAuth: boolean, // null,
enableDataExport: boolean, // null,
enableLogAccessUsingOnlyResourcePermissions: boolean, //true,
immediatePurgeDataOn30Days: boolean, // null,
legacy: number, // 0,
searchVersion: number // 1
},
forceCmkForQuery: boolean, // null,
id: string, // "/subscriptions/a5082b19-8a6e-4bc5-8fdd-8ef39dfebc39/resourcegroups/bugbash/providers/microsoft.operationalinsights/workspaces/bugbash-logs",
location: string, // "westus",
modifiedDate: string, // "2022-02-21T09:18:22.3906451Z",
name: string, // "bugbash-logs",
privateLinkScopedResources: string, // null,
provisioningState: string, // "Succeeded",
publicNetworkAccessForIngestion: string, // "Enabled",
publicNetworkAccessForQuery: string, // "Enabled",
resourceGroup: string, // "bugbash",
retentionInDays: number, // 30,
sku: {
capacityReservationLevel: number, // null,
lastSkuUpdate: string, // "2020-02-25T16:59:38Z",
name: string, // "pergb2018"
},
tags: string[], //null,
type: string, //"Microsoft.OperationalInsights/workspaces",
workspaceCapping: {
dailyQuotaGb: number, //-1.0,
dataIngestionStatus: string, // "RespectQuota",
quotaNextResetTime: string, // "2022-02-21T19:00:00Z"
}
}
export interface PostgresServerShowResult {
apiVersion: string, // "arcdata.microsoft.com/v1alpha1"
kind: string, // "postgresql"
@@ -362,6 +401,17 @@ declare module 'az-ext' {
): Promise<AzOutput<SqlMiDbRestoreResult>>
}
},
monitor: {
logAnalytics: {
workspace: {
list(
resourceGroup?: string, // test-rg
subscription?: string, // 122c121a-095a-4f5d-22e4-cc6b238490a3
additionalEnvVars?: AdditionalEnvVars
): Promise<AzOutput<LogAnalyticsWorkspaceListResult[]>>
}
}
},
getPath(): Promise<string>,
/**
* The semVersion corresponding to this installation of the Azure CLI. version() method should have been run