diff --git a/sdk/sql/arm-sql/package.json b/sdk/sql/arm-sql/package.json index cda65b1ed1ec..2e7d137c45fb 100644 --- a/sdk/sql/arm-sql/package.json +++ b/sdk/sql/arm-sql/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/sql/arm-sql", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/sql/arm-sql/src/models/index.ts b/sdk/sql/arm-sql/src/models/index.ts index ed4fbb7f7360..8e4afd3a3fa2 100644 --- a/sdk/sql/arm-sql/src/models/index.ts +++ b/sdk/sql/arm-sql/src/models/index.ts @@ -5106,7 +5106,7 @@ export interface ResourceIdentity { /** * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an * Azure Active Directory principal for the resource. Possible values include: 'None', - * 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + * 'SystemAssigned', 'UserAssigned' */ type?: IdentityType; /** @@ -5312,6 +5312,32 @@ export interface ManagedInstance extends TrackedResource { administrators?: ManagedInstanceExternalAdministrator; } +/** + * Azure Active Directory identity configuration for a resource. + */ +export interface ResourceIdentityWithUserAssignedIdentities { + /** + * The resource ids of the user assigned identities to use + */ + userAssignedIdentities?: { [propertyName: string]: UserIdentity }; + /** + * The Azure Active Directory principal id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'None', + * 'SystemAssigned', 'UserAssigned' + */ + type?: IdentityType; + /** + * The Azure Active Directory tenant id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; +} + /** * An update request for an Azure SQL Database managed instance. */ @@ -11360,11 +11386,11 @@ export type ManagementOperationState = 'Pending' | 'InProgress' | 'Succeeded' | /** * Defines values for IdentityType. - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + * Possible values include: 'None', 'SystemAssigned', 'UserAssigned' * @readonly * @enum {string} */ -export type IdentityType = 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned'; +export type IdentityType = 'None' | 'SystemAssigned' | 'UserAssigned'; /** * Defines values for ManagedServerCreateMode. @@ -22338,46 +22364,6 @@ export type LedgerDigestUploadsDisableResponse = LedgerDigestUploads & { }; }; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type LedgerDigestUploadsBeginCreateOrUpdateResponse = LedgerDigestUploads & { - /** - * 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: LedgerDigestUploads; - }; -}; - -/** - * Contains response data for the beginDisable operation. - */ -export type LedgerDigestUploadsBeginDisableResponse = LedgerDigestUploads & { - /** - * 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: LedgerDigestUploads; - }; -}; - /** * Contains response data for the listByDatabaseNext operation. */ diff --git a/sdk/sql/arm-sql/src/models/mappers.ts b/sdk/sql/arm-sql/src/models/mappers.ts index 8e5570884be0..2014a11d24bb 100644 --- a/sdk/sql/arm-sql/src/models/mappers.ts +++ b/sdk/sql/arm-sql/src/models/mappers.ts @@ -7906,6 +7906,48 @@ export const ManagedInstance: msRest.CompositeMapper = { } }; +export const ResourceIdentityWithUserAssignedIdentities: msRest.CompositeMapper = { + serializedName: "ResourceIdentityWithUserAssignedIdentities", + type: { + name: "Composite", + className: "ResourceIdentityWithUserAssignedIdentities", + modelProperties: { + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserIdentity" + } + } + } + }, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + export const ManagedInstanceUpdate: msRest.CompositeMapper = { serializedName: "ManagedInstanceUpdate", type: { diff --git a/sdk/sql/arm-sql/src/models/parameters.ts b/sdk/sql/arm-sql/src/models/parameters.ts index 910abde6b776..48533d32a9bf 100644 --- a/sdk/sql/arm-sql/src/models/parameters.ts +++ b/sdk/sql/arm-sql/src/models/parameters.ts @@ -938,7 +938,19 @@ export const schemaName: msRest.OperationURLParameter = { } } }; -export const securityAlertPolicyName: msRest.OperationURLParameter = { +export const securityAlertPolicyName0: msRest.OperationURLParameter = { + parameterPath: "securityAlertPolicyName", + mapper: { + required: true, + isConstant: true, + serializedName: "securityAlertPolicyName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; +export const securityAlertPolicyName1: msRest.OperationURLParameter = { parameterPath: "securityAlertPolicyName", mapper: { required: true, diff --git a/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts index 7eff2b12113d..d57763e84ffb 100644 --- a/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts @@ -184,7 +184,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName0, Parameters.subscriptionId ], queryParameters: [ @@ -211,7 +211,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName0, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts b/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts index 40dc3f8596d2..fb8fbd3ac6b1 100644 --- a/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts +++ b/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts @@ -8,7 +8,6 @@ */ 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/ledgerDigestUploadsOperationsMappers"; import * as Parameters from "../models/parameters"; @@ -76,9 +75,37 @@ export class LedgerDigestUploadsOperations { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the resource. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; } /** @@ -130,55 +157,34 @@ export class LedgerDigestUploadsOperations { * @param [options] The optional parameters * @returns Promise */ - disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDisable(resourceGroupName,serverName,databaseName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - + disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger - * instance. * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters - * @param [options] The optional parameters - * @returns Promise + * @param callback The callback */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - serverName, - databaseName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - + disable(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger - * instance. * @param resourceGroupName The name of the resource group that contains the resource. You can * obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param [options] The optional parameters - * @returns Promise + * @param options The optional parameters + * @param callback The callback */ - beginDisable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + disable(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, options }, - beginDisableOperationSpec, - options); + disableOperationSpec, + callback) as Promise; } /** @@ -239,13 +245,14 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listByDatabaseOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads", +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.ledgerDigestUploads, Parameters.subscriptionId ], queryParameters: [ @@ -254,10 +261,18 @@ const listByDatabaseOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LedgerDigestUploads, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.LedgerDigestUploadsListResult + bodyMapper: Mappers.LedgerDigestUploads }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -265,14 +280,13 @@ const listByDatabaseOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}", +const listByDatabaseOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads", urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.ledgerDigestUploads, Parameters.subscriptionId ], queryParameters: [ @@ -281,18 +295,10 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LedgerDigestUploads, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.LedgerDigestUploads + bodyMapper: Mappers.LedgerDigestUploadsListResult }, - 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -300,7 +306,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const beginDisableOperationSpec: msRest.OperationSpec = { +const disableOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable", urlParameters: [ diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts index 9027e2ad5033..cd157011562c 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts @@ -193,7 +193,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName, Parameters.managedInstanceName, Parameters.databaseName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName0, Parameters.subscriptionId ], queryParameters: [ @@ -220,7 +220,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName, Parameters.managedInstanceName, Parameters.databaseName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName0, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts index a3c46b4175a7..4d885be1808e 100644 --- a/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts @@ -168,7 +168,7 @@ const getOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.resourceGroupName, Parameters.managedInstanceName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName1, Parameters.subscriptionId ], queryParameters: [ @@ -219,7 +219,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.resourceGroupName, Parameters.managedInstanceName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName1, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts index b3f14dcfabe1..9ac79fb2f4a8 100644 --- a/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts @@ -168,7 +168,7 @@ const getOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName1, Parameters.subscriptionId ], queryParameters: [ @@ -219,7 +219,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.resourceGroupName, Parameters.serverName, - Parameters.securityAlertPolicyName, + Parameters.securityAlertPolicyName1, Parameters.subscriptionId ], queryParameters: [