diff --git a/sdk/sql/arm-sql/package.json b/sdk/sql/arm-sql/package.json index d228a9def05b..9b97ac6e7984 100644 --- a/sdk/sql/arm-sql/package.json +++ b/sdk/sql/arm-sql/package.json @@ -26,7 +26,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/sql/arm-sql", + "homepage": "https://github.com/azure/azure-sdk-for-js", "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 621a1ff1e227..eebde30da2d7 100644 --- a/sdk/sql/arm-sql/src/models/index.ts +++ b/sdk/sql/arm-sql/src/models/index.ts @@ -534,9 +534,22 @@ export interface ImportRequest extends ExportRequest { */ databaseName: string; /** - * The edition for the database being created. Possible values include: 'Web', 'Business', - * 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - * 'System2' + * The edition for the database being created. + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the + * SKU name, tier/edition, family, and capacity) that are available to your subscription in an + * Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location + * ```` + * . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', + * 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', + * 'Hyperscale' */ edition: DatabaseEdition; /** @@ -719,7 +732,8 @@ export interface RecommendedElasticPoolMetric { export interface RecommendedElasticPool extends ProxyResource { /** * The edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all - * the valid editions. Possible values include: 'Basic', 'Standard', 'Premium' + * the valid editions. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', + * 'BusinessCritical' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly databaseEdition?: ElasticPoolEdition; @@ -1708,9 +1722,19 @@ export interface ManagedInstance extends TrackedResource { */ identity?: ResourceIdentity; /** - * Managed instance sku + * Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 */ sku?: Sku; + /** + * Specifies the mode of database creation. + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. + * RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: + * 'Default', 'PointInTimeRestore' + */ + managedInstanceCreateMode?: ManagedServerCreateMode; /** * The fully qualified domain name of the managed instance. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1735,15 +1759,17 @@ export interface ManagedInstance extends TrackedResource { */ readonly state?: string; /** - * The license type. Possible values are 'LicenseIncluded' and 'BasePrice'. + * The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL + * license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible + * values include: 'LicenseIncluded', 'BasePrice' */ - licenseType?: string; + licenseType?: ManagedInstanceLicenseType; /** - * The number of VCores. + * The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ vCores?: number; /** - * The maximum storage size in GB. + * Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. */ storageSizeInGB?: number; /** @@ -1764,6 +1790,16 @@ export interface ManagedInstance extends TrackedResource { * Whether or not the public data endpoint is enabled. */ publicDataEndpointEnabled?: boolean; + /** + * The resource identifier of the source managed instance associated with create operation of + * this instance. + */ + sourceManagedInstanceId?: string; + /** + * Specifies the point in time (ISO8601 format) of the source database that will be restored to + * create the new database. + */ + restorePointInTime?: Date; /** * Connection type used for connecting to the instance. Possible values include: 'Proxy', * 'Redirect', 'Default' @@ -1780,6 +1816,10 @@ export interface ManagedInstance extends TrackedResource { * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". */ timezoneId?: string; + /** + * The Id of the instance pool this managed server belongs to. + */ + instancePoolId?: string; } /** @@ -1790,6 +1830,16 @@ export interface ManagedInstanceUpdate { * Managed instance sku */ sku?: Sku; + /** + * Specifies the mode of database creation. + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. + * RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: + * 'Default', 'PointInTimeRestore' + */ + managedInstanceCreateMode?: ManagedServerCreateMode; /** * The fully qualified domain name of the managed instance. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1814,15 +1864,17 @@ export interface ManagedInstanceUpdate { */ readonly state?: string; /** - * The license type. Possible values are 'LicenseIncluded' and 'BasePrice'. + * The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL + * license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible + * values include: 'LicenseIncluded', 'BasePrice' */ - licenseType?: string; + licenseType?: ManagedInstanceLicenseType; /** - * The number of VCores. + * The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ vCores?: number; /** - * The maximum storage size in GB. + * Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. */ storageSizeInGB?: number; /** @@ -1843,6 +1895,16 @@ export interface ManagedInstanceUpdate { * Whether or not the public data endpoint is enabled. */ publicDataEndpointEnabled?: boolean; + /** + * The resource identifier of the source managed instance associated with create operation of + * this instance. + */ + sourceManagedInstanceId?: string; + /** + * Specifies the point in time (ISO8601 format) of the source database that will be restored to + * create the new database. + */ + restorePointInTime?: Date; /** * Connection type used for connecting to the instance. Possible values include: 'Proxy', * 'Redirect', 'Default' @@ -1859,6 +1921,10 @@ export interface ManagedInstanceUpdate { * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". */ timezoneId?: string; + /** + * The Id of the instance pool this managed server belongs to. + */ + instancePoolId?: string; /** * Resource tags. */ @@ -3926,6 +3992,13 @@ export interface SensitivityLabel extends ProxyResource { * The information type ID. */ informationTypeId?: string; + /** + * Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. + * Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or + * not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isDisabled?: boolean; } /** @@ -4605,7 +4678,19 @@ export interface LocationCapabilities { */ export interface Database extends TrackedResource { /** - * The name and tier of the SKU. + * The database SKU. + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the + * SKU name, tier/edition, family, and capacity) that are available to your subscription in an + * Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location + * ```` */ sku?: Sku; /** @@ -4678,7 +4763,7 @@ export interface Database extends TrackedResource { * The status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', * 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', * 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', - * 'Scaling' + * 'Scaling', 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: DatabaseStatus; @@ -4778,6 +4863,15 @@ export interface Database extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currentSku?: Sku; + /** + * Time in minutes after which database is automatically paused. A value of -1 means that + * automatic pause is disabled + */ + autoPauseDelay?: number; + /** + * Minimal capacity that database will always have allocated, if not paused + */ + minCapacity?: number; } /** @@ -4848,7 +4942,7 @@ export interface DatabaseUpdate { * The status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', * 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', * 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', - * 'Scaling' + * 'Scaling', 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: DatabaseStatus; @@ -4948,6 +5042,15 @@ export interface DatabaseUpdate { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currentSku?: Sku; + /** + * Time in minutes after which database is automatically paused. A value of -1 means that + * automatic pause is disabled + */ + autoPauseDelay?: number; + /** + * Minimal capacity that database will always have allocated, if not paused + */ + minCapacity?: number; /** * Resource tags. */ @@ -4982,6 +5085,17 @@ export interface ElasticPoolPerDatabaseSettings { * An elastic pool. */ export interface ElasticPool extends TrackedResource { + /** + * The elastic pool SKU. + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the + * SKU name, tier/edition, family, and capacity) that are available to your subscription in an + * Azure region, use the `Capabilities_ListByLocation` REST API or the following command: + * + * ```azurecli + * az sql elastic-pool list-editions -l -o table + * ```` + */ sku?: Sku; /** * Kind of elastic pool. This is metadata used for the Azure portal experience. @@ -5609,6 +5723,10 @@ export interface SensitivityLabelsListCurrentByDatabaseOptionalParams extends ms * Optional Parameters. */ export interface SensitivityLabelsListRecommendedByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies whether to include disabled recommendations or not. + */ + includeDisabledRecommendations?: boolean; skipToken?: string; /** * An OData filter expression that filters elements in the collection. @@ -5652,6 +5770,10 @@ export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalPa * Optional Parameters. */ export interface ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies whether to include disabled recommendations or not. + */ + includeDisabledRecommendations?: boolean; skipToken?: string; /** * An OData filter expression that filters elements in the collection. @@ -6491,11 +6613,12 @@ export type GeoBackupPolicyState = 'Disabled' | 'Enabled'; /** * Defines values for DatabaseEdition. * Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', - * 'Stretch', 'DataWarehouse', 'System', 'System2' + * 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', + * 'Hyperscale' * @readonly * @enum {string} */ -export type DatabaseEdition = 'Web' | 'Business' | 'Basic' | 'Standard' | 'Premium' | 'PremiumRS' | 'Free' | 'Stretch' | 'DataWarehouse' | 'System' | 'System2'; +export type DatabaseEdition = 'Web' | 'Business' | 'Basic' | 'Standard' | 'Premium' | 'PremiumRS' | 'Free' | 'Stretch' | 'DataWarehouse' | 'System' | 'System2' | 'GeneralPurpose' | 'BusinessCritical' | 'Hyperscale'; /** * Defines values for ServiceObjectiveName. @@ -6555,11 +6678,11 @@ export type UnitDefinitionType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'Co /** * Defines values for ElasticPoolEdition. - * Possible values include: 'Basic', 'Standard', 'Premium' + * Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical' * @readonly * @enum {string} */ -export type ElasticPoolEdition = 'Basic' | 'Standard' | 'Premium'; +export type ElasticPoolEdition = 'Basic' | 'Standard' | 'Premium' | 'GeneralPurpose' | 'BusinessCritical'; /** * Defines values for ReplicationRole. @@ -6691,6 +6814,22 @@ export type FailoverGroupReplicationRole = 'Primary' | 'Secondary'; */ export type IdentityType = 'SystemAssigned'; +/** + * Defines values for ManagedServerCreateMode. + * Possible values include: 'Default', 'PointInTimeRestore' + * @readonly + * @enum {string} + */ +export type ManagedServerCreateMode = 'Default' | 'PointInTimeRestore'; + +/** + * Defines values for ManagedInstanceLicenseType. + * Possible values include: 'LicenseIncluded', 'BasePrice' + * @readonly + * @enum {string} + */ +export type ManagedInstanceLicenseType = 'LicenseIncluded' | 'BasePrice'; + /** * Defines values for ManagedInstanceProxyOverride. * Possible values include: 'Proxy', 'Redirect', 'Default' @@ -6969,11 +7108,12 @@ export type SampleName = 'AdventureWorksLT' | 'WideWorldImportersStd' | 'WideWor * Defines values for DatabaseStatus. * Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', * 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', - * 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling' + * 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling', + * 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers' * @readonly * @enum {string} */ -export type DatabaseStatus = 'Online' | 'Restoring' | 'RecoveryPending' | 'Recovering' | 'Suspect' | 'Offline' | 'Standby' | 'Shutdown' | 'EmergencyMode' | 'AutoClosed' | 'Copying' | 'Creating' | 'Inaccessible' | 'OfflineSecondary' | 'Pausing' | 'Paused' | 'Resuming' | 'Scaling'; +export type DatabaseStatus = 'Online' | 'Restoring' | 'RecoveryPending' | 'Recovering' | 'Suspect' | 'Offline' | 'Standby' | 'Shutdown' | 'EmergencyMode' | 'AutoClosed' | 'Copying' | 'Creating' | 'Inaccessible' | 'OfflineSecondary' | 'Pausing' | 'Paused' | 'Resuming' | 'Scaling' | 'OfflineChangingDwPerformanceTiers' | 'OnlineChangingDwPerformanceTiers'; /** * Defines values for DatabaseLicenseType. @@ -9113,9 +9253,9 @@ export type FailoverGroupsListByServerNextResponse = FailoverGroupListResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroup operation. */ -export type ManagedInstancesListResponse = ManagedInstanceListResult & { +export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListResult & { /** * The underlying HTTP response. */ @@ -9133,9 +9273,9 @@ export type ManagedInstancesListResponse = ManagedInstanceListResult & { }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListResult & { +export type ManagedInstancesGetResponse = ManagedInstance & { /** * The underlying HTTP response. */ @@ -9148,14 +9288,14 @@ export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListRes /** * The response body as parsed JSON or XML */ - parsedBody: ManagedInstanceListResult; + parsedBody: ManagedInstance; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdate operation. */ -export type ManagedInstancesGetResponse = ManagedInstance & { +export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance & { /** * The underlying HTTP response. */ @@ -9173,9 +9313,9 @@ export type ManagedInstancesGetResponse = ManagedInstance & { }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the update operation. */ -export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance & { +export type ManagedInstancesUpdateResponse = ManagedInstance & { /** * The underlying HTTP response. */ @@ -9193,9 +9333,9 @@ export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance & { }; /** - * Contains response data for the update operation. + * Contains response data for the listByInstancePool operation. */ -export type ManagedInstancesUpdateResponse = ManagedInstance & { +export type ManagedInstancesListByInstancePoolResponse = ManagedInstanceListResult & { /** * The underlying HTTP response. */ @@ -9208,7 +9348,27 @@ export type ManagedInstancesUpdateResponse = ManagedInstance & { /** * The response body as parsed JSON or XML */ - parsedBody: ManagedInstance; + parsedBody: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedInstancesListResponse = ManagedInstanceListResult & { + /** + * 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: ManagedInstanceListResult; }; }; @@ -9253,9 +9413,9 @@ export type ManagedInstancesBeginUpdateResponse = ManagedInstance & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type ManagedInstancesListNextResponse = ManagedInstanceListResult & { +export type ManagedInstancesListByResourceGroupNextResponse = ManagedInstanceListResult & { /** * The underlying HTTP response. */ @@ -9273,9 +9433,29 @@ export type ManagedInstancesListNextResponse = ManagedInstanceListResult & { }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listByInstancePoolNext operation. */ -export type ManagedInstancesListByResourceGroupNextResponse = ManagedInstanceListResult & { +export type ManagedInstancesListByInstancePoolNextResponse = ManagedInstanceListResult & { + /** + * 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: ManagedInstanceListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ManagedInstancesListNextResponse = ManagedInstanceListResult & { /** * The underlying HTTP response. */ diff --git a/sdk/sql/arm-sql/src/models/instancePoolUsagesMappers.ts b/sdk/sql/arm-sql/src/models/instancePoolUsagesMappers.ts new file mode 100644 index 000000000000..1105c1fd870f --- /dev/null +++ b/sdk/sql/arm-sql/src/models/instancePoolUsagesMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + Usage, + UsageListResult, + UsageName +} from "../models/mappers"; diff --git a/sdk/sql/arm-sql/src/models/instancePoolsMappers.ts b/sdk/sql/arm-sql/src/models/instancePoolsMappers.ts new file mode 100644 index 000000000000..6106dd7379ff --- /dev/null +++ b/sdk/sql/arm-sql/src/models/instancePoolsMappers.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AutomaticTuningOptions, + AutomaticTuningServerOptions, + BackupLongTermRetentionPolicy, + BackupShortTermRetentionPolicy, + BaseResource, + CloudError, + Database, + DatabaseAutomaticTuning, + DatabaseBlobAuditingPolicy, + DatabaseOperation, + DatabaseSecurityAlertPolicy, + DatabaseVulnerabilityAssessment, + DatabaseVulnerabilityAssessmentRuleBaseline, + DatabaseVulnerabilityAssessmentRuleBaselineItem, + DatabaseVulnerabilityAssessmentScansExport, + DataMaskingPolicy, + DataMaskingRule, + ElasticPool, + ElasticPoolActivity, + ElasticPoolDatabaseActivity, + ElasticPoolOperation, + ElasticPoolPerDatabaseSettings, + EncryptionProtector, + ExtendedDatabaseBlobAuditingPolicy, + ExtendedServerBlobAuditingPolicy, + FailoverGroup, + FailoverGroupReadOnlyEndpoint, + FailoverGroupReadWriteEndpoint, + FirewallRule, + GeoBackupPolicy, + ImportExportResponse, + InstanceFailoverGroup, + InstanceFailoverGroupReadOnlyEndpoint, + InstanceFailoverGroupReadWriteEndpoint, + InstancePool, + InstancePoolListResult, + InstancePoolUpdate, + Job, + JobAgent, + JobCredential, + JobExecution, + JobExecutionTarget, + JobSchedule, + JobStep, + JobStepAction, + JobStepExecutionOptions, + JobStepOutput, + JobTarget, + JobTargetGroup, + JobVersion, + LongTermRetentionBackup, + ManagedBackupShortTermRetentionPolicy, + ManagedDatabase, + ManagedDatabaseSecurityAlertPolicy, + ManagedInstance, + ManagedInstanceEncryptionProtector, + ManagedInstanceKey, + ManagedInstancePairInfo, + ManagedInstanceVulnerabilityAssessment, + ManagedServerSecurityAlertPolicy, + OperationImpact, + PartnerInfo, + PartnerRegionInfo, + ProxyResource, + RecommendedElasticPool, + RecommendedElasticPoolMetric, + RecommendedIndex, + RecoverableDatabase, + RecoverableManagedDatabase, + ReplicationLink, + Resource, + ResourceIdentity, + RestorableDroppedDatabase, + RestorableDroppedManagedDatabase, + RestorePoint, + SensitivityLabel, + Server, + ServerAutomaticTuning, + ServerAzureADAdministrator, + ServerBlobAuditingPolicy, + ServerCommunicationLink, + ServerConnectionPolicy, + ServerDnsAlias, + ServerKey, + ServerSecurityAlertPolicy, + ServerVulnerabilityAssessment, + ServiceObjective, + ServiceTierAdvisor, + Sku, + SloUsageMetric, + SubscriptionUsage, + SyncAgent, + SyncAgentLinkedDatabase, + SyncGroup, + SyncGroupSchema, + SyncGroupSchemaTable, + SyncGroupSchemaTableColumn, + SyncMember, + TdeCertificate, + TrackedResource, + TransparentDataEncryption, + TransparentDataEncryptionActivity, + VirtualCluster, + VirtualNetworkRule, + VulnerabilityAssessmentRecurringScansProperties, + VulnerabilityAssessmentScanError, + VulnerabilityAssessmentScanRecord +} from "../models/mappers"; diff --git a/sdk/sql/arm-sql/src/models/mappers.ts b/sdk/sql/arm-sql/src/models/mappers.ts index 7f55a40b1f5b..847a0ecb155c 100644 --- a/sdk/sql/arm-sql/src/models/mappers.ts +++ b/sdk/sql/arm-sql/src/models/mappers.ts @@ -2732,6 +2732,12 @@ export const ManagedInstance: msRest.CompositeMapper = { className: "Sku" } }, + managedInstanceCreateMode: { + serializedName: "properties.managedInstanceCreateMode", + type: { + name: "String" + } + }, fullyQualifiedDomainName: { readOnly: true, serializedName: "properties.fullyQualifiedDomainName", @@ -2807,6 +2813,18 @@ export const ManagedInstance: msRest.CompositeMapper = { name: "Boolean" } }, + sourceManagedInstanceId: { + serializedName: "properties.sourceManagedInstanceId", + type: { + name: "String" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, proxyOverride: { serializedName: "properties.proxyOverride", type: { @@ -2818,6 +2836,12 @@ export const ManagedInstance: msRest.CompositeMapper = { type: { name: "String" } + }, + instancePoolId: { + serializedName: "properties.instancePoolId", + type: { + name: "String" + } } } } @@ -2836,6 +2860,12 @@ export const ManagedInstanceUpdate: msRest.CompositeMapper = { className: "Sku" } }, + managedInstanceCreateMode: { + serializedName: "properties.managedInstanceCreateMode", + type: { + name: "String" + } + }, fullyQualifiedDomainName: { readOnly: true, serializedName: "properties.fullyQualifiedDomainName", @@ -2911,6 +2941,18 @@ export const ManagedInstanceUpdate: msRest.CompositeMapper = { name: "Boolean" } }, + sourceManagedInstanceId: { + serializedName: "properties.sourceManagedInstanceId", + type: { + name: "String" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, proxyOverride: { serializedName: "properties.proxyOverride", type: { @@ -2923,6 +2965,12 @@ export const ManagedInstanceUpdate: msRest.CompositeMapper = { name: "String" } }, + instancePoolId: { + serializedName: "properties.instancePoolId", + type: { + name: "String" + } + }, tags: { serializedName: "tags", type: { @@ -5702,6 +5750,13 @@ export const SensitivityLabel: msRest.CompositeMapper = { type: { name: "String" } + }, + isDisabled: { + readOnly: true, + serializedName: "properties.isDisabled", + type: { + name: "Boolean" + } } } } @@ -7059,6 +7114,18 @@ export const Database: msRest.CompositeMapper = { name: "Composite", className: "Sku" } + }, + autoPauseDelay: { + serializedName: "properties.autoPauseDelay", + type: { + name: "Number" + } + }, + minCapacity: { + serializedName: "properties.minCapacity", + type: { + name: "Number" + } } } } @@ -7244,6 +7311,18 @@ export const DatabaseUpdate: msRest.CompositeMapper = { className: "Sku" } }, + autoPauseDelay: { + serializedName: "properties.autoPauseDelay", + type: { + name: "Number" + } + }, + minCapacity: { + serializedName: "properties.minCapacity", + type: { + name: "Number" + } + }, tags: { serializedName: "tags", type: { diff --git a/sdk/sql/arm-sql/src/models/parameters.ts b/sdk/sql/arm-sql/src/models/parameters.ts index 4563be053354..c4ab46253f47 100644 --- a/sdk/sql/arm-sql/src/models/parameters.ts +++ b/sdk/sql/arm-sql/src/models/parameters.ts @@ -394,6 +394,28 @@ export const include: msRest.OperationQueryParameter = { } } }; +export const includeDisabledRecommendations: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "includeDisabledRecommendations" + ], + mapper: { + serializedName: "includeDisabledRecommendations", + type: { + name: "Boolean" + } + } +}; +export const instancePoolName: msRest.OperationURLParameter = { + parameterPath: "instancePoolName", + mapper: { + required: true, + serializedName: "instancePoolName", + type: { + name: "String" + } + } +}; export const isActive: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -666,6 +688,18 @@ export const securityAlertPolicyName1: msRest.OperationURLParameter = { } }; export const sensitivityLabelSource0: msRest.OperationURLParameter = { + parameterPath: "sensitivityLabelSource", + mapper: { + required: true, + isConstant: true, + serializedName: "sensitivityLabelSource", + defaultValue: 'recommended', + type: { + name: "String" + } + } +}; +export const sensitivityLabelSource1: msRest.OperationURLParameter = { parameterPath: "sensitivityLabelSource", mapper: { required: true, @@ -679,7 +713,7 @@ export const sensitivityLabelSource0: msRest.OperationURLParameter = { } } }; -export const sensitivityLabelSource1: msRest.OperationURLParameter = { +export const sensitivityLabelSource2: msRest.OperationURLParameter = { parameterPath: "sensitivityLabelSource", mapper: { required: true, diff --git a/sdk/sql/arm-sql/src/operations/instancePoolUsages.ts b/sdk/sql/arm-sql/src/operations/instancePoolUsages.ts new file mode 100644 index 000000000000..baa9c0426d07 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/instancePoolUsages.ts @@ -0,0 +1,140 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/instancePoolUsagesMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a InstancePoolUsages. */ +export class InstancePoolUsages { + private readonly client: SqlManagementClientContext; + + /** + * Create a InstancePoolUsages. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets all instance pool usage metrics + * @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 instancePoolName The name of the instance pool to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, options?: Models.InstancePoolUsagesListByInstancePoolOptionalParams): 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 instancePoolName The name of the instance pool to be retrieved. + * @param callback The callback + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, 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 instancePoolName The name of the instance pool to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, options: Models.InstancePoolUsagesListByInstancePoolOptionalParams, callback: msRest.ServiceCallback): void; + listByInstancePool(resourceGroupName: string, instancePoolName: string, options?: Models.InstancePoolUsagesListByInstancePoolOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + instancePoolName, + options + }, + listByInstancePoolOperationSpec, + callback) as Promise; + } + + /** + * Gets all instance pool usage metrics + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstancePoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInstancePoolNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInstancePoolNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstancePoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInstancePoolNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInstancePoolOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.instancePoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expandChildren, + Parameters.apiVersion5 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByInstancePoolNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsageListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/instancePools.ts b/sdk/sql/arm-sql/src/operations/instancePools.ts new file mode 100644 index 000000000000..a28cc10a53a9 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/instancePools.ts @@ -0,0 +1,487 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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/instancePoolsMappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClientContext } from "../sqlManagementClientContext"; + +/** Class representing a InstancePools. */ +export class InstancePools { + private readonly client: SqlManagementClientContext; + + /** + * Create a InstancePools. + * @param {SqlManagementClientContext} client Reference to the service client. + */ + constructor(client: SqlManagementClientContext) { + this.client = client; + } + + /** + * Gets an instance pool. + * @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 instancePoolName The name of the instance pool to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, instancePoolName: string, 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 instancePoolName The name of the instance pool to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, instancePoolName: string, 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 instancePoolName The name of the instance pool to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, instancePoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, instancePoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + instancePoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instance pool. + * @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 instancePoolName The name of the instance pool to be created or updated. + * @param parameters The requested instance pool resource state. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, instancePoolName: string, parameters: Models.InstancePool, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,instancePoolName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an instance pool + * @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 instancePoolName The name of the instance pool to be deleted + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, instancePoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,instancePoolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates an instance pool. + * @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 instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource state. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, instancePoolName: string, parameters: Models.InstancePoolUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,instancePoolName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a list of instance pools in the resource group + * @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 [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, 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 callback The callback + */ + listByResourceGroup(resourceGroupName: string, 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 options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all instance pools in the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instance pool. + * @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 instancePoolName The name of the instance pool to be created or updated. + * @param parameters The requested instance pool resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, instancePoolName: string, parameters: Models.InstancePool, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + instancePoolName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes an instance pool + * @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 instancePoolName The name of the instance pool to be deleted + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, instancePoolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + instancePoolName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates an instance pool. + * @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 instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource state. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, instancePoolName: string, parameters: Models.InstancePoolUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + instancePoolName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Gets a list of instance pools in the resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all instance pools in the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.instancePoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstancePool + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.instancePoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InstancePool, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InstancePool + }, + 201: { + bodyMapper: Mappers.InstancePool + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.instancePoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.instancePoolName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InstancePoolUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InstancePool + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts index d28e5833afc7..4f442f878567 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts @@ -190,6 +190,109 @@ export class ManagedDatabaseSensitivityLabels { callback); } + /** + * Disables sensitivity recommendations on a given column + * @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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + disableRecommendationOperationSpec, + callback); + } + + /** + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on + * all columns) + * @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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + enableRecommendationOperationSpec, + callback); + } + /** * Gets the sensitivity labels of a given database * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -337,7 +440,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource0, + Parameters.sensitivityLabelSource1, Parameters.subscriptionId ], queryParameters: [ @@ -367,7 +470,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource1, + Parameters.sensitivityLabelSource2, Parameters.subscriptionId ], queryParameters: [ @@ -407,7 +510,63 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource1, + Parameters.sensitivityLabelSource2, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const disableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.managedInstanceName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, Parameters.subscriptionId ], queryParameters: [ @@ -462,6 +621,7 @@ const listRecommendedByDatabaseOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.includeDisabledRecommendations, Parameters.skipToken, Parameters.filter1, Parameters.apiVersion4 diff --git a/sdk/sql/arm-sql/src/operations/managedInstances.ts b/sdk/sql/arm-sql/src/operations/managedInstances.ts index 55a0e5ed91fc..5d57e434842c 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstances.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstances.ts @@ -27,30 +27,6 @@ export class ManagedInstances { this.client = client; } - /** - * Gets a list of all managed instances in the subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - /** * Gets a list of managed instances in a resource group. * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -158,6 +134,65 @@ export class ManagedInstances { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Gets a list of all managed instances in an instance pool. + * @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 instancePoolName The instance pool name. + * @param [options] The optional parameters + * @returns Promise + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, 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 instancePoolName The instance pool name. + * @param callback The callback + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, 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 instancePoolName The instance pool name. + * @param options The optional parameters + * @param callback The callback + */ + listByInstancePool(resourceGroupName: string, instancePoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstancePool(resourceGroupName: string, instancePoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + instancePoolName, + options + }, + listByInstancePoolOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all managed instances in the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + /** * Creates or updates a managed instance. * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -220,68 +255,97 @@ export class ManagedInstances { } /** - * Gets a list of all managed instances in the subscription. + * Gets a list of managed instances in a resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByResourceGroupNextOperationSpec, + callback) as Promise; } /** - * Gets a list of managed instances in a resource group. + * Gets a list of all managed instances in an instance pool. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByInstancePoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByInstancePoolNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByInstancePoolNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInstancePoolNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + listByInstancePoolNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all managed instances in the subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances", urlParameters: [ + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ @@ -301,11 +365,12 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", urlParameters: [ Parameters.resourceGroupName, + Parameters.managedInstanceName, Parameters.subscriptionId ], queryParameters: [ @@ -316,7 +381,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ManagedInstanceListResult + bodyMapper: Mappers.ManagedInstance }, default: { bodyMapper: Mappers.CloudError @@ -325,12 +390,12 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { +const listByInstancePoolOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances", urlParameters: [ Parameters.resourceGroupName, - Parameters.managedInstanceName, + Parameters.instancePoolName, Parameters.subscriptionId ], queryParameters: [ @@ -341,7 +406,30 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ManagedInstance + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult }, default: { bodyMapper: Mappers.CloudError @@ -444,7 +532,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -465,7 +553,28 @@ const listNextOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { +const listByInstancePoolNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", diff --git a/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts index 40efad6f5250..83720fb882dd 100644 --- a/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts @@ -104,6 +104,109 @@ export class SensitivityLabels { callback) as Promise; } + /** + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on + * all columns) + * @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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + enableRecommendationOperationSpec, + callback); + } + + /** + * Disables sensitivity recommendations on a given column + * @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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param [options] The optional parameters + * @returns Promise + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, 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 schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param options The optional parameters + * @param callback The callback + */ + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + schemaName, + tableName, + columnName, + options + }, + disableRecommendationOperationSpec, + callback); + } + /** * Gets the sensitivity label of a given column * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -364,6 +467,7 @@ const listRecommendedByDatabaseOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.includeDisabledRecommendations, Parameters.skipToken, Parameters.filter1, Parameters.apiVersion3 @@ -382,6 +486,62 @@ const listRecommendedByDatabaseOperationSpec: msRest.OperationSpec = { serializer }; +const enableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const disableRecommendationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", @@ -392,7 +552,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource0, + Parameters.sensitivityLabelSource1, Parameters.subscriptionId ], queryParameters: [ @@ -422,7 +582,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource1, + Parameters.sensitivityLabelSource2, Parameters.subscriptionId ], queryParameters: [ @@ -462,7 +622,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.schemaName, Parameters.tableName, Parameters.columnName, - Parameters.sensitivityLabelSource1, + Parameters.sensitivityLabelSource2, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/sql/arm-sql/src/sqlManagementClientContext.ts b/sdk/sql/arm-sql/src/sqlManagementClientContext.ts index 9c40606a0760..e4015c4da383 100644 --- a/sdk/sql/arm-sql/src/sqlManagementClientContext.ts +++ b/sdk/sql/arm-sql/src/sqlManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-sql"; -const packageVersion = "5.6.0"; +const packageVersion = "5.7.0"; export class SqlManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials;