From 117300dd9859d77f1d01e30a9f7bb4086ddbd91c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 19 Aug 2020 19:49:28 +0000 Subject: [PATCH] Generated from 3268ba2206820e98c0b1c9859ca4234f6bf9591a Add new line at the end of the file --- .../src/models/configurationsMappers.ts | 1 - .../src/models/databasesMappers.ts | 1 - .../src/models/firewallRulesMappers.ts | 1 - .../arm-postgresql/src/models/index.ts | 231 ++++++------------ .../src/models/logFilesMappers.ts | 1 - .../arm-postgresql/src/models/mappers.ts | 174 ++++++------- .../privateEndpointConnectionsMappers.ts | 1 - .../src/models/privateLinkResourcesMappers.ts | 1 - .../src/models/replicasMappers.ts | 1 - .../src/models/serverAdministratorsMappers.ts | 1 - .../src/models/serverKeysMappers.ts | 1 - .../serverSecurityAlertPoliciesMappers.ts | 2 - .../src/models/serversMappers.ts | 1 - .../src/models/virtualNetworkRulesMappers.ts | 1 - .../arm-postgresql/src/operations/index.ts | 2 +- .../operations/serverSecurityAlertPolicies.ts | 110 +-------- .../src/postgreSQLManagementClient.ts | 4 +- 17 files changed, 153 insertions(+), 381 deletions(-) diff --git a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts index 689e5dc9b8bc..970d76020ac0 100644 --- a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts @@ -33,7 +33,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts index 45636d3c493c..545b8a0e85ee 100644 --- a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts @@ -33,7 +33,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts index fe9d1f684d2f..628203437574 100644 --- a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts @@ -33,7 +33,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/index.ts b/sdk/postgresql/arm-postgresql/src/models/index.ts index 2cee314b9a45..6d0ca68c37b7 100644 --- a/sdk/postgresql/arm-postgresql/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql/src/models/index.ts @@ -902,6 +902,43 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * A server security alert policy. + */ +export interface ServerSecurityAlertPolicy extends ProxyResource { + /** + * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: + * 'Enabled', 'Disabled' + */ + state: ServerSecurityAlertPolicyState; + /** + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly + */ + disabledAlerts?: string[]; + /** + * Specifies an array of e-mail addresses to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * Specifies that the alert is sent to the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob + * storage will hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * Specifies the identifier key of the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + retentionDays?: number; +} + /** * An interface representing PrivateLinkServiceConnectionStateProperty. */ @@ -997,53 +1034,6 @@ export interface ServerKey extends ProxyResource { readonly creationDate?: Date; } -/** - * Metadata pertaining to creation and last modification of the resource. - */ -export interface SystemData { - /** - * The identity that created the resource. - */ - createdBy?: string; - /** - * The type of identity that created the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' - */ - createdByType?: CreatedByType; - /** - * The timestamp of resource creation (UTC). - */ - createdAt?: Date; - /** - * The identity that last modified the resource. - */ - lastModifiedBy?: string; - /** - * The type of identity that last modified the resource. Possible values include: 'User', - * 'Application', 'ManagedIdentity', 'Key' - */ - lastModifiedByType?: CreatedByType; - /** - * The type of identity that last modified the resource. - */ - lastModifiedAt?: Date; -} - -/** - * A server security alert policy. - */ -export interface ServerSecurityAlertPolicy extends ProxyResource { - /** - * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: - * 'Enabled', 'Disabled' - */ - state: ServerSecurityAlertPolicyState; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly systemData?: SystemData; -} - /** * An interface representing PostgreSQLManagementClientOptions. */ @@ -1159,19 +1149,6 @@ export interface ServerKeyListResult extends Array { readonly nextLink?: string; } -/** - * @interface - * A list of the server's security alert policies. - * @extends Array - */ -export interface LogicalServerSecurityAlertPolicyListResult extends Array { - /** - * Link to retrieve next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - /** * Defines values for ServerVersion. * Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' @@ -1300,14 +1277,6 @@ export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; */ export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; -/** - * Defines values for CreatedByType. - * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - * @readonly - * @enum {string} - */ -export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; - /** * Contains response data for the create operation. */ @@ -1971,7 +1940,7 @@ export type OperationsListResponse = OperationListResult & { /** * Contains response data for the get operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { +export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { /** * The underlying HTTP response. */ @@ -1984,14 +1953,14 @@ export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: ServerSecurityAlertPolicy; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { +export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { /** * The underlying HTTP response. */ @@ -2004,14 +1973,14 @@ export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointCo /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: ServerSecurityAlertPolicy; }; }; /** - * Contains response data for the updateTags operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { +export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { /** * The underlying HTTP response. */ @@ -2024,14 +1993,14 @@ export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnec /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: ServerSecurityAlertPolicy; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the get operation. */ -export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2044,14 +2013,14 @@ export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConn /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2069,9 +2038,9 @@ export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpo }; /** - * Contains response data for the beginUpdateTags operation. + * Contains response data for the updateTags operation. */ -export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { +export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2089,9 +2058,9 @@ export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointC }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the listByServer operation. */ -export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { +export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -2109,9 +2078,9 @@ export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpoint }; /** - * Contains response data for the listByServer operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2124,14 +2093,14 @@ export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListRe /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginUpdateTags operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { +export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -2144,14 +2113,14 @@ export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResource; + parsedBody: PrivateEndpointConnection; }; }; /** * Contains response data for the listByServerNext operation. */ -export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { +export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -2164,14 +2133,14 @@ export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceLi /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourceListResult; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByServer operation. */ -export type ServerKeysListResponse = ServerKeyListResult & { +export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -2184,34 +2153,14 @@ export type ServerKeysListResponse = ServerKeyListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKeyListResult; + parsedBody: PrivateLinkResourceListResult; }; }; /** * Contains response data for the get operation. */ -export type ServerKeysGetResponse = ServerKey & { - /** - * 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: ServerKey; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type ServerKeysCreateOrUpdateResponse = ServerKey & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The underlying HTTP response. */ @@ -2224,14 +2173,14 @@ export type ServerKeysCreateOrUpdateResponse = ServerKey & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKey; + parsedBody: PrivateLinkResource; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { +export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -2244,14 +2193,14 @@ export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKey; + parsedBody: PrivateLinkResourceListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type ServerKeysListNextResponse = ServerKeyListResult & { +export type ServerKeysListResponse = ServerKeyListResult & { /** * The underlying HTTP response. */ @@ -2271,7 +2220,7 @@ export type ServerKeysListNextResponse = ServerKeyListResult & { /** * Contains response data for the get operation. */ -export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { +export type ServerKeysGetResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -2284,34 +2233,14 @@ export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { - /** - * 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: ServerSecurityAlertPolicy; - }; -}; - -/** - * Contains response data for the listByServer operation. - */ -export type ServerSecurityAlertPoliciesListByServerResponse = LogicalServerSecurityAlertPolicyListResult & { +export type ServerKeysCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -2324,14 +2253,14 @@ export type ServerSecurityAlertPoliciesListByServerResponse = LogicalServerSecur /** * The response body as parsed JSON or XML */ - parsedBody: LogicalServerSecurityAlertPolicyListResult; + parsedBody: ServerKey; }; }; /** * Contains response data for the beginCreateOrUpdate operation. */ -export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -2344,14 +2273,14 @@ export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecur /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the listNext operation. */ -export type ServerSecurityAlertPoliciesListByServerNextResponse = LogicalServerSecurityAlertPolicyListResult & { +export type ServerKeysListNextResponse = ServerKeyListResult & { /** * The underlying HTTP response. */ @@ -2364,6 +2293,6 @@ export type ServerSecurityAlertPoliciesListByServerNextResponse = LogicalServerS /** * The response body as parsed JSON or XML */ - parsedBody: LogicalServerSecurityAlertPolicyListResult; + parsedBody: ServerKeyListResult; }; }; diff --git a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts index 875f09d7ab69..28a531d6c615 100644 --- a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts @@ -33,7 +33,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/mappers.ts b/sdk/postgresql/arm-postgresql/src/models/mappers.ts index ba285f3add8b..1cdc87564abe 100644 --- a/sdk/postgresql/arm-postgresql/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/mappers.ts @@ -1273,6 +1273,74 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; +export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ServerSecurityAlertPolicy", + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Boolean" + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + } + } + } +}; + export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { serializedName: "PrivateLinkServiceConnectionStateProperty", type: { @@ -1445,82 +1513,6 @@ export const ServerKey: msRest.CompositeMapper = { } }; -export const SystemData: msRest.CompositeMapper = { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - -export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { - serializedName: "ServerSecurityAlertPolicy", - type: { - name: "Composite", - className: "ServerSecurityAlertPolicy", - modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - required: true, - serializedName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] - } - }, - systemData: { - readOnly: true, - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - export const ServerListResult: msRest.CompositeMapper = { serializedName: "ServerListResult", type: { @@ -1795,36 +1787,6 @@ export const ServerKeyListResult: msRest.CompositeMapper = { } }; -export const LogicalServerSecurityAlertPolicyListResult: msRest.CompositeMapper = { - serializedName: "LogicalServerSecurityAlertPolicyListResult", - type: { - name: "Composite", - className: "LogicalServerSecurityAlertPolicyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerSecurityAlertPolicy" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - export const discriminators = { 'ServerPropertiesForCreate' : ServerPropertiesForCreate, 'ServerPropertiesForCreate.Default' : ServerPropertiesForDefaultCreate, diff --git a/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts index 2c487d776ef9..dfe9ce4f1aee 100644 --- a/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts @@ -35,7 +35,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TagsObject, TrackedResource, VirtualNetworkRule diff --git a/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts index 375eb22dab07..26a86bad5b33 100644 --- a/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts @@ -35,7 +35,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts b/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts index 48f8d66619f9..697e792f11c6 100644 --- a/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts @@ -33,7 +33,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts index f54c3ca8d506..f4446351753e 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts @@ -35,7 +35,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts index d98d7feea8af..fb871b2e03f5 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts @@ -35,7 +35,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts index 34808495340c..79788467f5ed 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts @@ -15,7 +15,6 @@ export { Database, FirewallRule, LogFile, - LogicalServerSecurityAlertPolicyListResult, PrivateEndpointConnection, PrivateEndpointProperty, PrivateLinkResource, @@ -33,7 +32,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts index fe5fe5ef4dbe..767c4990f5c7 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts @@ -40,7 +40,6 @@ export { ServerUpdateParameters, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts index 0f6ad9dbc782..55b2c86df32a 100644 --- a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts @@ -32,7 +32,6 @@ export { ServerSecurityAlertPolicy, Sku, StorageProfile, - SystemData, TrackedResource, VirtualNetworkRule, VirtualNetworkRuleListResult diff --git a/sdk/postgresql/arm-postgresql/src/operations/index.ts b/sdk/postgresql/arm-postgresql/src/operations/index.ts index 3fe29e672254..8a41bb0dc6a1 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/index.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/index.ts @@ -19,7 +19,7 @@ export * from "./serverAdministrators"; export * from "./locationBasedPerformanceTier"; export * from "./checkNameAvailability"; export * from "./operations"; +export * from "./serverSecurityAlertPolicies"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./serverKeys"; -export * from "./serverSecurityAlertPolicies"; diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts b/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts index c0bcffa7d3ae..01966450a813 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts @@ -72,38 +72,6 @@ export class ServerSecurityAlertPolicies { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } - /** - * Get the server's threat detection policies. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param [options] The optional parameters - * @returns Promise - */ - listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param callback The callback - */ - listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param options The optional parameters - * @param callback The callback - */ - listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - options - }, - listByServerOperationSpec, - callback) as Promise; - } - /** * Creates or updates a threat detection policy. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -123,34 +91,6 @@ export class ServerSecurityAlertPolicies { beginCreateOrUpdateOperationSpec, options); } - - /** - * Get the server's threat detection policies. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByServerNext(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 - */ - listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByServerNextOperationSpec, - callback) as Promise; - } } // Operation Specifications @@ -165,7 +105,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -181,31 +121,6 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listByServerOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", @@ -216,7 +131,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -239,24 +154,3 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByServerNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts index a162b2e1472d..ca122b4f6241 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts @@ -28,10 +28,10 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { locationBasedPerformanceTier: operations.LocationBasedPerformanceTier; checkNameAvailability: operations.CheckNameAvailability; operations: operations.Operations; + serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; privateEndpointConnections: operations.PrivateEndpointConnections; privateLinkResources: operations.PrivateLinkResources; serverKeys: operations.ServerKeys; - serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; /** * Initializes a new instance of the PostgreSQLManagementClient class. @@ -52,10 +52,10 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); this.operations = new operations.Operations(this); + this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.privateLinkResources = new operations.PrivateLinkResources(this); this.serverKeys = new operations.ServerKeys(this); - this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); } }