Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-sql] [Do not merge]Dev/srmarkov/server trust certificatesv2 #5997

Draft
wants to merge 1 commit into
base: feature/v4
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/sql/arm-sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
72 changes: 29 additions & 43 deletions sdk/sql/arm-sql/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down
42 changes: 42 additions & 0 deletions sdk/sql/arm-sql/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
14 changes: 13 additions & 1 deletion sdk/sql/arm-sql/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const getOperationSpec: msRest.OperationSpec = {
Parameters.resourceGroupName,
Parameters.serverName,
Parameters.databaseName,
Parameters.securityAlertPolicyName,
Parameters.securityAlertPolicyName0,
Parameters.subscriptionId
],
queryParameters: [
Expand All @@ -211,7 +211,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
Parameters.resourceGroupName,
Parameters.serverName,
Parameters.databaseName,
Parameters.securityAlertPolicyName,
Parameters.securityAlertPolicyName0,
Parameters.subscriptionId
],
queryParameters: [
Expand Down
112 changes: 59 additions & 53 deletions sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -76,9 +75,37 @@ export class LedgerDigestUploadsOperations {
* @param [options] The optional parameters
* @returns Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse>
*/
createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse> {
return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse>;
createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse>;
/**
* @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<Models.LedgerDigestUploads>): 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<Models.LedgerDigestUploads>): void;
createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LedgerDigestUploads>, callback?: msRest.ServiceCallback<Models.LedgerDigestUploads>): Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
serverName,
databaseName,
parameters,
options
},
createOrUpdateOperationSpec,
callback) as Promise<Models.LedgerDigestUploadsCreateOrUpdateResponse>;
}

/**
Expand Down Expand Up @@ -130,55 +157,34 @@ export class LedgerDigestUploadsOperations {
* @param [options] The optional parameters
* @returns Promise<Models.LedgerDigestUploadsDisableResponse>
*/
disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise<Models.LedgerDigestUploadsDisableResponse> {
return this.beginDisable(resourceGroupName,serverName,databaseName,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.LedgerDigestUploadsDisableResponse>;
}

disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise<Models.LedgerDigestUploadsDisableResponse>;
/**
* 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<msRestAzure.LROPoller>
* @param callback The callback
*/
beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.LedgerDigestUploads, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
serverName,
databaseName,
parameters,
options
},
beginCreateOrUpdateOperationSpec,
options);
}

disable(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback<Models.LedgerDigestUploads>): 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<msRestAzure.LROPoller>
* @param options The optional parameters
* @param callback The callback
*/
beginDisable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
disable(resourceGroupName: string, serverName: string, databaseName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LedgerDigestUploads>): void;
disable(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LedgerDigestUploads>, callback?: msRest.ServiceCallback<Models.LedgerDigestUploads>): Promise<Models.LedgerDigestUploadsDisableResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
serverName,
databaseName,
options
},
beginDisableOperationSpec,
options);
disableOperationSpec,
callback) as Promise<Models.LedgerDigestUploadsDisableResponse>;
}

/**
Expand Down Expand Up @@ -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: [
Expand All @@ -254,25 +261,32 @@ 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
}
},
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: [
Expand All @@ -281,26 +295,18 @@ 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
}
},
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: [
Expand Down
Loading