diff --git a/sdk/synapse/arm-synapse/src/models/index.ts b/sdk/synapse/arm-synapse/src/models/index.ts index fc3f06e05b3f..930ee7e52442 100644 --- a/sdk/synapse/arm-synapse/src/models/index.ts +++ b/sdk/synapse/arm-synapse/src/models/index.ts @@ -559,6 +559,11 @@ export interface Sku { * The SKU name */ name?: string; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. + */ + capacity?: number; } /** @@ -1598,10 +1603,12 @@ export interface Workspace extends TrackedResource { */ sqlAdministratorLoginPassword?: string; /** - * Workspace managed resource group - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Workspace managed resource group. The resource group name uniquely identifies the resource + * group within the user subscriptionId. The resource group name must be no longer than 90 + * characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', + * '(', ')' and'.'. Note that the name cannot end with '.' */ - readonly managedResourceGroupName?: string; + managedResourceGroupName?: string; /** * Resource provisioning state * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1628,6 +1635,11 @@ export interface Workspace extends TrackedResource { * Private endpoint connections to the workspace */ privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * Workspace level configs and feature flags + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly extraProperties?: { [propertyName: string]: any }; /** * Identity of the workspace */ @@ -1707,29 +1719,9 @@ export interface ManagedIdentitySqlControlSettingsModel extends ProxyResource { } /** - * Azure Synapse nested resource, which belongs to a factory. + * Azure Synapse nested resource, which belongs to a workspace. */ -export interface SubResource extends BaseResource { - /** - * The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Etag identifies change in the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; +export interface SubResource extends AzureEntityResource { } /** @@ -3199,6 +3191,17 @@ export interface IntegrationRuntimesCreateOptionalParams extends msRest.RequestO ifMatch?: string; } +/** + * Optional Parameters. + */ +export interface IntegrationRuntimesBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * ETag of the integration runtime entity. Should only be specified for update, for which it + * should match existing entity or can be * for unconditional update. + */ + ifMatch?: string; +} + /** * Optional Parameters. */ @@ -5715,6 +5718,26 @@ export type IntegrationRuntimesStartResponse = IntegrationRuntimeStatusResponse }; }; +/** + * Contains response data for the beginCreate operation. + */ +export type IntegrationRuntimesBeginCreateResponse = IntegrationRuntimeResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntegrationRuntimeResource; + }; +}; + /** * Contains response data for the listByWorkspaceNext operation. */ diff --git a/sdk/synapse/arm-synapse/src/models/mappers.ts b/sdk/synapse/arm-synapse/src/models/mappers.ts index 7bc91eecb190..7b777f020f64 100644 --- a/sdk/synapse/arm-synapse/src/models/mappers.ts +++ b/sdk/synapse/arm-synapse/src/models/mappers.ts @@ -883,6 +883,12 @@ export const Sku: msRest.CompositeMapper = { type: { name: "String" } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } } } } @@ -2434,7 +2440,6 @@ export const Workspace: msRest.CompositeMapper = { } }, managedResourceGroupName: { - readOnly: true, serializedName: "properties.managedResourceGroupName", type: { name: "String" @@ -2489,6 +2494,18 @@ export const Workspace: msRest.CompositeMapper = { } } }, + extraProperties: { + readOnly: true, + serializedName: "properties.extraProperties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, identity: { serializedName: "identity", type: { @@ -2622,34 +2639,7 @@ export const SubResource: msRest.CompositeMapper = { name: "Composite", className: "SubResource", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - } + ...AzureEntityResource.type.modelProperties } } }; diff --git a/sdk/synapse/arm-synapse/src/operations/integrationRuntimes.ts b/sdk/synapse/arm-synapse/src/operations/integrationRuntimes.ts index b1792aa0bdd3..15d5bb27dd75 100644 --- a/sdk/synapse/arm-synapse/src/operations/integrationRuntimes.ts +++ b/sdk/synapse/arm-synapse/src/operations/integrationRuntimes.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/integrationRuntimesMappers"; import * as Parameters from "../models/parameters"; @@ -114,35 +115,9 @@ export class IntegrationRuntimes { * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, options?: Models.IntegrationRuntimesCreateOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param integrationRuntimeName Integration runtime name - * @param integrationRuntime Integration runtime resource definition. - * @param callback The callback - */ - create(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param integrationRuntimeName Integration runtime name - * @param integrationRuntime Integration runtime resource definition. - * @param options The optional parameters - * @param callback The callback - */ - create(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, options: Models.IntegrationRuntimesCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, options?: Models.IntegrationRuntimesCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - integrationRuntimeName, - integrationRuntime, - options - }, - createOperationSpec, - callback) as Promise; + create(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, options?: Models.IntegrationRuntimesCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,workspaceName,integrationRuntimeName,integrationRuntime,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -154,32 +129,9 @@ export class IntegrationRuntimes { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param integrationRuntimeName Integration runtime name - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param integrationRuntimeName Integration runtime name - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - integrationRuntimeName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,integrationRuntimeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -326,6 +278,50 @@ export class IntegrationRuntimes { callback); } + /** + * Create an integration runtime + * @summary Create integration runtime + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param integrationRuntimeName Integration runtime name + * @param integrationRuntime Integration runtime resource definition. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, integrationRuntime: Models.IntegrationRuntimeResource, options?: Models.IntegrationRuntimesBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + integrationRuntimeName, + integrationRuntime, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Delete an integration runtime + * @summary Delete integration runtime + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param integrationRuntimeName Integration runtime name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, integrationRuntimeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + integrationRuntimeName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * List all integration runtimes * @summary List integration runtimes @@ -419,9 +415,9 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", +const upgradeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -432,20 +428,10 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.ifMatch, Parameters.acceptLanguage ], - requestBody: { - parameterPath: "integrationRuntime", - mapper: { - ...Mappers.IntegrationRuntimeResource, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.IntegrationRuntimeResource - }, + 200: {}, default: { bodyMapper: Mappers.CloudError } @@ -453,14 +439,13 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.integrationRuntimeName + Parameters.workspaceName ], queryParameters: [ Parameters.apiVersion @@ -469,8 +454,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.IntegrationRuntimeListResponse + }, default: { bodyMapper: Mappers.CloudError } @@ -478,9 +464,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const upgradeOperationSpec: msRest.OperationSpec = { +const startOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -494,7 +480,10 @@ const upgradeOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, + 200: { + bodyMapper: Mappers.IntegrationRuntimeStatusResponse + }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -502,13 +491,14 @@ const upgradeOperationSpec: msRest.OperationSpec = { serializer }; -const listByWorkspaceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes", +const stopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.workspaceName + Parameters.workspaceName, + Parameters.integrationRuntimeName ], queryParameters: [ Parameters.apiVersion @@ -517,9 +507,8 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.IntegrationRuntimeListResponse - }, + 200: {}, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -527,9 +516,9 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { serializer }; -const startOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start", +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -540,11 +529,19 @@ const startOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ + Parameters.ifMatch, Parameters.acceptLanguage ], + requestBody: { + parameterPath: "integrationRuntime", + mapper: { + ...Mappers.IntegrationRuntimeResource, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.IntegrationRuntimeStatusResponse + bodyMapper: Mappers.IntegrationRuntimeResource }, 202: {}, default: { @@ -554,9 +551,9 @@ const startOperationSpec: msRest.OperationSpec = { serializer }; -const stopOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -572,6 +569,7 @@ const stopOperationSpec: msRest.OperationSpec = { responses: { 200: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError }