From 408af7a346f321d100d21d76a5bca9c89310b2e3 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 18 Mar 2020 23:58:33 +0000 Subject: [PATCH] Generated from 0f6e9e77d813164f1df2da7814bdfe299f278d7e Removing resource identity for mariadb --- sdk/postgresql/arm-postgresql/LICENSE.txt | 2 +- sdk/postgresql/arm-postgresql/README.md | 5 +- sdk/postgresql/arm-postgresql/package.json | 14 +- .../arm-postgresql/rollup.config.js | 2 +- .../src/models/configurationsMappers.ts | 12 + .../src/models/databasesMappers.ts | 12 + .../src/models/firewallRulesMappers.ts | 12 + .../arm-postgresql/src/models/index.ts | 799 +++++++++++++++++- .../src/models/logFilesMappers.ts | 12 + .../arm-postgresql/src/models/mappers.ts | 609 ++++++++++++- .../arm-postgresql/src/models/parameters.ts | 50 +- .../privateEndpointConnectionsMappers.ts | 40 + .../src/models/privateLinkResourcesMappers.ts | 39 + .../src/models/replicasMappers.ts | 12 + .../src/models/serverAdministratorsMappers.ts | 39 + .../serverSecurityAlertPoliciesMappers.ts | 12 + .../src/models/serversMappers.ts | 12 + .../src/models/virtualNetworkRulesMappers.ts | 12 + .../src/operations/checkNameAvailability.ts | 2 +- .../src/operations/configurations.ts | 30 +- .../src/operations/databases.ts | 38 +- .../src/operations/firewallRules.ts | 38 +- .../arm-postgresql/src/operations/index.ts | 3 + .../locationBasedPerformanceTier.ts | 2 +- .../arm-postgresql/src/operations/logFiles.ts | 11 +- .../src/operations/operations.ts | 2 +- .../operations/privateEndpointConnections.ts | 399 +++++++++ .../src/operations/privateLinkResources.ts | 198 +++++ .../arm-postgresql/src/operations/replicas.ts | 11 +- .../src/operations/serverAdministrators.ts | 270 ++++++ .../operations/serverSecurityAlertPolicies.ts | 19 +- .../arm-postgresql/src/operations/servers.ts | 56 +- .../src/operations/virtualNetworkRules.ts | 38 +- .../src/postgreSQLManagementClient.ts | 8 +- .../src/postgreSQLManagementClientContext.ts | 6 +- sdk/postgresql/arm-postgresql/tsconfig.json | 2 +- 36 files changed, 2614 insertions(+), 214 deletions(-) create mode 100644 sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts create mode 100644 sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts create mode 100644 sdk/postgresql/arm-postgresql/src/operations/privateLinkResources.ts create mode 100644 sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts diff --git a/sdk/postgresql/arm-postgresql/LICENSE.txt b/sdk/postgresql/arm-postgresql/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/postgresql/arm-postgresql/LICENSE.txt +++ b/sdk/postgresql/arm-postgresql/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/postgresql/arm-postgresql/README.md b/sdk/postgresql/arm-postgresql/README.md index 02fc64c1c3ab..52764833b398 100644 --- a/sdk/postgresql/arm-postgresql/README.md +++ b/sdk/postgresql/arm-postgresql/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-postgresql ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -99,4 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpostgresql%2Farm-postgresql%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql/README.png) diff --git a/sdk/postgresql/arm-postgresql/package.json b/sdk/postgresql/arm-postgresql/package.json index b6181076307d..c529f25d438f 100644 --- a/sdk/postgresql/arm-postgresql/package.json +++ b/sdk/postgresql/arm-postgresql/package.json @@ -4,9 +4,9 @@ "description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.", "version": "4.4.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/postgreSQLManagementClient.js", "types": "./esm/postgreSQLManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/postgresql/arm-postgresql", "repository": { diff --git a/sdk/postgresql/arm-postgresql/rollup.config.js b/sdk/postgresql/arm-postgresql/rollup.config.js index 8a50c41be790..95bac284ddad 100644 --- a/sdk/postgresql/arm-postgresql/rollup.config.js +++ b/sdk/postgresql/arm-postgresql/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts index 3df779f095a3..5866d8db1b3b 100644 --- a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,8 +16,19 @@ export { Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts index aab1065ee094..580d287a9702 100644 --- a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,8 +16,19 @@ export { DatabaseListResult, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts index 2b819a0b71bc..0c9394c16d83 100644 --- a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,8 +16,19 @@ export { FirewallRule, FirewallRuleListResult, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/index.ts b/sdk/postgresql/arm-postgresql/src/models/index.ts index ddfc5c0cc55e..d9205e224d67 100644 --- a/sdk/postgresql/arm-postgresql/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql/src/models/index.ts @@ -12,38 +12,106 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Resource properties. + * An interface representing PrivateEndpointProperty. */ -export interface ProxyResource extends BaseResource { +export interface PrivateEndpointProperty extends BaseResource { /** - * Resource ID + * Resource id of the private endpoint. + */ + id?: string; +} + +/** + * An interface representing ServerPrivateLinkServiceConnectionStateProperty. + */ +export interface ServerPrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. Possible values include: 'Approved', 'Pending', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStateStatus; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. Possible values include: 'None' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; +} + +/** + * Properties of a private endpoint connection. + */ +export interface ServerPrivateEndpointConnectionProperties { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: ServerPrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. Possible values include: 'Approving', 'Ready', + * 'Dropping', 'Failed', 'Rejecting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PrivateEndpointProvisioningState; +} + +/** + * A private endpoint connection under a server + */ +export interface ServerPrivateEndpointConnection { + /** + * Resource ID of the Private Endpoint Connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Private endpoint connection properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: ServerPrivateEndpointConnectionProperties; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The name of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * Resource type. + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * Resource properties including location and tags for track resources. + * The resource model definition for a ARM tracked top level resource */ -export interface TrackedResource extends ProxyResource { +export interface TrackedResource extends Resource { /** - * The location the resource resides in. + * Resource tags. */ - location: string; + tags?: { [propertyName: string]: string }; /** - * Application-specific metadata in the form of key-value pairs. + * The geo-location where the resource lives */ - tags?: { [propertyName: string]: string }; + location: string; } /** @@ -90,6 +158,21 @@ export interface ServerPropertiesForCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -113,6 +196,21 @@ export interface ServerPropertiesForDefaultCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -145,6 +243,21 @@ export interface ServerPropertiesForRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -177,6 +290,21 @@ export interface ServerPropertiesForGeoRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -204,6 +332,21 @@ export interface ServerPropertiesForReplica { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -241,10 +384,35 @@ export interface Sku { family?: string; } +/** + * Azure Active Directory identity configuration for a resource. + */ +export interface ResourceIdentity { + /** + * The Azure Active Directory principal id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + */ + type?: IdentityType; + /** + * The Azure Active Directory tenant id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; +} + /** * Represents a server. */ export interface Server extends TrackedResource { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -263,9 +431,24 @@ export interface Server extends TrackedResource { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server data encryption is enabled with customer-managed keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly byokEnforcement?: string; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; /** * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', - * 'Disabled' + * 'Disabled', 'Inaccessible' */ userVisibleState?: ServerState; /** @@ -292,12 +475,26 @@ export interface Server extends TrackedResource { * The maximum number of replicas that a master server can have. */ replicaCapacity?: number; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; + /** + * List of private endpoint connections on a server + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; } /** * Represents a server to be created. */ export interface ServerForCreate { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -320,6 +517,10 @@ export interface ServerForCreate { * Parameters allowed to update for a server. */ export interface ServerUpdateParameters { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -341,6 +542,16 @@ export interface ServerUpdateParameters { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * The replication role of the server. */ @@ -351,6 +562,13 @@ export interface ServerUpdateParameters { tags?: { [propertyName: string]: string }; } +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + /** * Represents a server firewall rule. */ @@ -645,6 +863,157 @@ export interface ServerSecurityAlertPolicy extends ProxyResource { retentionDays?: number; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The resource management error response. + */ +export interface ErrorResponse { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Represents a and external administrator to be created. + */ +export interface ServerAdministratorResource extends ProxyResource { + /** + * The server administrator login account name. + */ + login: string; + /** + * The server administrator Sid (Secure ID). + */ + sid: string; + /** + * The server Active Directory Administrator tenant id. + */ + tenantId: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * An interface representing PrivateLinkServiceConnectionStateProperty. + */ +export interface PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. + */ + status: string; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * A private endpoint connection + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Tags object for patch operations. + */ +export interface TagsObject { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Properties of a private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: PrivateLinkResourceProperties; +} + /** * An interface representing PostgreSQLManagementClientOptions. */ @@ -705,6 +1074,14 @@ export interface ConfigurationListResult extends Array { export interface LogFileListResult extends Array { } +/** + * @interface + * The response to a list Active Directory Administrators request. + * @extends Array + */ +export interface ServerAdministratorResourceListResult extends Array { +} + /** * @interface * A list of performance tiers. @@ -713,6 +1090,32 @@ export interface LogFileListResult extends Array { export interface PerformanceTierListResult extends Array { } +/** + * @interface + * A list of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult 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; +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult 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' @@ -730,56 +1133,112 @@ export type ServerVersion = '9.5' | '9.6' | '10' | '10.0' | '10.2' | '11'; export type SslEnforcementEnum = 'Enabled' | 'Disabled'; /** - * Defines values for ServerState. - * Possible values include: 'Ready', 'Dropping', 'Disabled' + * Defines values for MinimalTlsVersionEnum. + * Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled' * @readonly * @enum {string} */ -export type ServerState = 'Ready' | 'Dropping' | 'Disabled'; +export type MinimalTlsVersionEnum = 'TLS1_0' | 'TLS1_1' | 'TLS1_2' | 'TLSEnforcementDisabled'; /** - * Defines values for GeoRedundantBackup. + * Defines values for InfrastructureEncryption. * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type GeoRedundantBackup = 'Enabled' | 'Disabled'; +export type InfrastructureEncryption = 'Enabled' | 'Disabled'; /** - * Defines values for StorageAutogrow. + * Defines values for PublicNetworkAccessEnum. * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ -export type StorageAutogrow = 'Enabled' | 'Disabled'; +export type PublicNetworkAccessEnum = 'Enabled' | 'Disabled'; /** - * Defines values for SkuTier. - * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + * Defines values for PrivateLinkServiceConnectionStateStatus. + * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' * @readonly * @enum {string} */ -export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; +export type PrivateLinkServiceConnectionStateStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; /** - * Defines values for VirtualNetworkRuleState. - * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + * Defines values for PrivateLinkServiceConnectionStateActionsRequire. + * Possible values include: 'None' * @readonly * @enum {string} */ -export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; +export type PrivateLinkServiceConnectionStateActionsRequire = 'None'; /** - * Defines values for OperationOrigin. - * Possible values include: 'NotSpecified', 'user', 'system' + * Defines values for PrivateEndpointProvisioningState. + * Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' * @readonly * @enum {string} */ -export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; +export type PrivateEndpointProvisioningState = 'Approving' | 'Ready' | 'Dropping' | 'Failed' | 'Rejecting'; /** - * Defines values for ServerSecurityAlertPolicyState. - * Possible values include: 'Enabled', 'Disabled' + * Defines values for ServerState. + * Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' + * @readonly + * @enum {string} + */ +export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Inaccessible'; + +/** + * Defines values for GeoRedundantBackup. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type GeoRedundantBackup = 'Enabled' | 'Disabled'; + +/** + * Defines values for StorageAutogrow. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type StorageAutogrow = 'Enabled' | 'Disabled'; + +/** + * Defines values for SkuTier. + * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned'; + +/** + * Defines values for VirtualNetworkRuleState. + * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + * @readonly + * @enum {string} + */ +export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; + +/** + * Defines values for OperationOrigin. + * Possible values include: 'NotSpecified', 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; + +/** + * Defines values for ServerSecurityAlertPolicyState. + * Possible values include: 'Enabled', 'Disabled' * @readonly * @enum {string} */ @@ -1305,6 +1764,86 @@ export type LogFilesListByServerResponse = LogFileListResult & { }; }; +/** + * Contains response data for the get operation. + */ +export type ServerAdministratorsGetResponse = ServerAdministratorResource & { + /** + * 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: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerAdministratorsCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * 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: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerAdministratorsListResponse = ServerAdministratorResourceListResult & { + /** + * 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: ServerAdministratorResourceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerAdministratorsBeginCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * 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: ServerAdministratorResource; + }; +}; + /** * Contains response data for the list operation. */ @@ -1424,3 +1963,203 @@ export type OperationsListResponse = OperationListResult & { parsedBody: OperationListResult; }; }; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the updateTags operation. + */ +export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { + /** + * 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: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the beginUpdateTags operation. + */ +export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { + /** + * 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: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { + /** + * 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: PrivateLinkResource; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; diff --git a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts index b6832542b835..a9a40bcd9cb1 100644 --- a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,8 +16,19 @@ export { FirewallRule, LogFile, LogFileListResult, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/mappers.ts b/sdk/postgresql/arm-postgresql/src/models/mappers.ts index ba6229c5b54f..503d004a6180 100644 --- a/sdk/postgresql/arm-postgresql/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/mappers.ts @@ -12,11 +12,114 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const PrivateEndpointProperty: msRest.CompositeMapper = { + serializedName: "PrivateEndpointProperty", type: { name: "Composite", - className: "ProxyResource", + className: "PrivateEndpointProperty", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ServerPrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "ServerPrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const ServerPrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ServerPrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnection", + type: { + name: "Composite", + className: "ServerPrivateEndpointConnection", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", modelProperties: { id: { readOnly: true, @@ -49,14 +152,7 @@ export const TrackedResource: msRest.CompositeMapper = { name: "Composite", className: "TrackedResource", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, + ...Resource.type.modelProperties, tags: { serializedName: "tags", type: { @@ -67,6 +163,13 @@ export const TrackedResource: msRest.CompositeMapper = { } } } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } } } } @@ -133,6 +236,24 @@ export const ServerPropertiesForCreate: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "minimalTlsVersion", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "infrastructureEncryption", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, storageProfile: { serializedName: "storageProfile", type: { @@ -288,6 +409,36 @@ export const Sku: msRest.CompositeMapper = { } }; +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + export const Server: msRest.CompositeMapper = { serializedName: "Server", type: { @@ -295,6 +446,13 @@ export const Server: msRest.CompositeMapper = { className: "Server", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -324,6 +482,25 @@ export const Server: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + byokEnforcement: { + readOnly: true, + serializedName: "properties.byokEnforcement", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "properties.infrastructureEncryption", + type: { + name: "String" + } + }, userVisibleState: { serializedName: "properties.userVisibleState", type: { @@ -369,6 +546,25 @@ export const Server: msRest.CompositeMapper = { type: { name: "Number" } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerPrivateEndpointConnection" + } + } + } } } } @@ -380,6 +576,13 @@ export const ServerForCreate: msRest.CompositeMapper = { name: "Composite", className: "ServerForCreate", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -423,6 +626,13 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "ServerUpdateParameters", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -459,6 +669,18 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, replicationRole: { serializedName: "properties.replicationRole", type: { @@ -480,6 +702,17 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const FirewallRule: msRest.CompositeMapper = { serializedName: "FirewallRule", type: { @@ -968,6 +1201,278 @@ export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { } }; +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ServerAdministratorResource: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResource", + type: { + name: "Composite", + className: "ServerAdministratorResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + administratorType: { + required: true, + isConstant: true, + serializedName: "properties.administratorType", + defaultValue: 'ActiveDirectory', + type: { + name: "String" + } + }, + login: { + required: true, + serializedName: "properties.login", + type: { + name: "String" + } + }, + sid: { + required: true, + serializedName: "properties.sid", + type: { + name: "Uuid" + } + }, + tenantId: { + required: true, + serializedName: "properties.tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const TagsObject: msRest.CompositeMapper = { + serializedName: "TagsObject", + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } + } + } +}; + export const ServerListResult: msRest.CompositeMapper = { serializedName: "ServerListResult", type: { @@ -1108,6 +1613,28 @@ export const LogFileListResult: msRest.CompositeMapper = { } }; +export const ServerAdministratorResourceListResult: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResourceListResult", + type: { + name: "Composite", + className: "ServerAdministratorResourceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerAdministratorResource" + } + } + } + } + } + } +}; + export const PerformanceTierListResult: msRest.CompositeMapper = { serializedName: "PerformanceTierListResult", type: { @@ -1130,6 +1657,66 @@ export const PerformanceTierListResult: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + 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/parameters.ts b/sdk/postgresql/arm-postgresql/src/models/parameters.ts index 7dbc0227f6c5..904b5a500439 100644 --- a/sdk/postgresql/arm-postgresql/src/models/parameters.ts +++ b/sdk/postgresql/arm-postgresql/src/models/parameters.ts @@ -20,11 +20,31 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2017-12-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-06-01', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -60,6 +80,16 @@ export const firewallRuleName: msRest.OperationURLParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; export const locationName: msRest.OperationURLParameter = { parameterPath: "locationName", mapper: { @@ -81,11 +111,26 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, type: { name: "String" } @@ -118,6 +163,9 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } diff --git a/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..0931ff02ae82 --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + discriminators, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TagsObject, + TrackedResource, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..5ecf86f60c68 --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + discriminators, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + 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 b86a44e417cd..291d3d105e35 100644 --- a/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts @@ -8,15 +8,27 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts new file mode 100644 index 000000000000..cbc669958fea --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + discriminators, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerAdministratorResourceListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + 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 9555ebb4e3ca..debefd1b52b2 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts @@ -8,14 +8,26 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts index 4495c8e37cdd..f28c02d15498 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts @@ -8,16 +8,28 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, ServerForCreate, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerPropertiesForCreate, ServerPropertiesForDefaultCreate, ServerPropertiesForGeoRestore, diff --git a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts index 08d2a62e7e38..6163bbde4cd9 100644 --- a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts @@ -8,14 +8,26 @@ export { discriminators, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, diff --git a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts index 8ddb6f96a6d5..255c58ab91d6 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts @@ -67,7 +67,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts index d1688cb39378..9b2d14a38889 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts @@ -29,8 +29,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -44,8 +43,7 @@ export class Configurations { /** * Gets information about a configuration of server. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param [options] The optional parameters @@ -53,16 +51,14 @@ export class Configurations { */ get(resourceGroupName: string, serverName: string, configurationName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param callback The callback */ get(resourceGroupName: string, serverName: string, configurationName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param options The optional parameters @@ -83,23 +79,20 @@ export class Configurations { /** * List all the configurations in a given server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -118,8 +111,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -152,7 +144,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -177,7 +169,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +195,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/databases.ts b/sdk/postgresql/arm-postgresql/src/operations/databases.ts index 9b26db382ac7..7e1f48cdd921 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/databases.ts @@ -29,8 +29,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -44,8 +43,7 @@ export class Databases { /** * Deletes a database. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -58,8 +56,7 @@ export class Databases { /** * Gets information about a database. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -67,16 +64,14 @@ export class Databases { */ get(resourceGroupName: string, serverName: string, databaseName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param callback The callback */ get(resourceGroupName: string, serverName: string, databaseName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param options The optional parameters @@ -97,23 +92,20 @@ export class Databases { /** * List all the databases in a given server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -132,8 +124,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -155,8 +146,7 @@ export class Databases { /** * Deletes a database. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -187,7 +177,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +202,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +228,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +265,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts index 196dffcb5a14..38d150a28635 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts @@ -29,8 +29,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -44,8 +43,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -58,8 +56,7 @@ export class FirewallRules { /** * Gets information about a server firewall rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -67,16 +64,14 @@ export class FirewallRules { */ get(resourceGroupName: string, serverName: string, firewallRuleName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, firewallRuleName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param options The optional parameters @@ -97,23 +92,20 @@ export class FirewallRules { /** * List all the firewall rules in a given server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -132,8 +124,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -155,8 +146,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -187,7 +177,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +202,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +228,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +265,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/index.ts b/sdk/postgresql/arm-postgresql/src/operations/index.ts index bb02d2d2c5e9..e8036afaf142 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/index.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/index.ts @@ -15,7 +15,10 @@ export * from "./virtualNetworkRules"; export * from "./databases"; export * from "./configurations"; export * from "./logFiles"; +export * from "./serverAdministrators"; export * from "./locationBasedPerformanceTier"; export * from "./checkNameAvailability"; export * from "./serverSecurityAlertPolicies"; export * from "./operations"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts b/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts index ffad11ea8a12..3fa69d0f30ab 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts @@ -65,7 +65,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts b/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts index 41825964612d..40457f61b364 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts @@ -28,23 +28,20 @@ export class LogFiles { /** * List all the log files in a given server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -73,7 +70,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/operations.ts b/sdk/postgresql/arm-postgresql/src/operations/operations.ts index 01da20b0f66b..d46b8c484ec0 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/operations.ts @@ -57,7 +57,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.DBforPostgreSQL/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts b/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..afa1be05a0ee --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts @@ -0,0 +1,399 @@ +/* + * 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/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: 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 privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: 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 privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets all private endpoint connections on a server. + * @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; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a server. + * @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 +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/privateLinkResources.ts b/sdk/postgresql/arm-postgresql/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..9bc64424e2ed --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/privateLinkResources.ts @@ -0,0 +1,198 @@ +/* + * 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/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources for PostgreSQL server. + * @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; + } + + /** + * Gets a private link resource for PostgreSQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, groupName: 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 groupName The name of the private link resource. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: 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 groupName The name of the private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources for PostgreSQL server. + * @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 +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.groupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/replicas.ts b/sdk/postgresql/arm-postgresql/src/operations/replicas.ts index 48000b911f37..1b1cff086bbc 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/replicas.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/replicas.ts @@ -28,23 +28,20 @@ export class Replicas { /** * List all the replicas for a given server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -73,7 +70,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts b/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts new file mode 100644 index 000000000000..4e7c742e43b1 --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts @@ -0,0 +1,270 @@ +/* + * 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/serverAdministratorsMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a ServerAdministrators. */ +export class ServerAdministrators { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a ServerAdministrators. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Gets information about a AAD server administrator. + * @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 + */ + get(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 + */ + get(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 + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes server active directory administrator. + * @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 + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Returns a list of server Administrators. + * @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 + */ + list(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 + */ + list(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 + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + properties, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes server active directory administrator. + * @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 + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.ServerAdministratorResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + 202: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts b/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts index 392b70c4f449..01966450a813 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts @@ -29,23 +29,20 @@ export class ServerSecurityAlertPolicies { /** * Get a server's security alert policy. - * @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 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 */ get(resourceGroupName: string, serverName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: 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 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 @@ -64,8 +61,7 @@ export class ServerSecurityAlertPolicies { /** * Creates or updates a threat detection policy. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -78,8 +74,7 @@ export class ServerSecurityAlertPolicies { /** * Creates or updates a threat detection policy. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -110,7 +105,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -136,7 +131,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/servers.ts b/sdk/postgresql/arm-postgresql/src/operations/servers.ts index 34cc40f4346f..9afd79202735 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/servers.ts @@ -29,8 +29,7 @@ export class Servers { /** * Creates a new server, or will overwrite an existing server. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -44,8 +43,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -58,8 +56,7 @@ export class Servers { /** * Deletes a server. - * @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 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 @@ -71,23 +68,20 @@ export class Servers { /** * Gets information about a server. - * @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 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 */ get(resourceGroupName: string, serverName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: 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 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 @@ -106,21 +100,18 @@ export class Servers { /** * List all the servers in a given 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -161,8 +152,7 @@ export class Servers { /** * Restarts a server. - * @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 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 @@ -174,8 +164,7 @@ export class Servers { /** * Creates a new server, or will overwrite an existing server. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -196,8 +185,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -217,8 +205,7 @@ export class Servers { /** * Deletes a server. - * @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 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 @@ -236,8 +223,7 @@ export class Servers { /** * Restarts a server. - * @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 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 @@ -265,7 +251,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -289,7 +275,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -312,7 +298,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -337,7 +323,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -373,7 +359,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -406,7 +392,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -431,7 +417,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts index 882b3641cbc0..5a030433a338 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts @@ -29,8 +29,7 @@ export class VirtualNetworkRules { /** * Gets a virtual network rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -38,16 +37,14 @@ export class VirtualNetworkRules { */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param options The optional parameters @@ -68,8 +65,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -83,8 +79,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -97,23 +92,20 @@ export class VirtualNetworkRules { /** * Gets a list of virtual network rules in a server. - * @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 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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @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 @@ -132,8 +124,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -155,8 +146,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -215,7 +205,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -240,7 +230,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -266,7 +256,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -303,7 +293,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts index 51dbb7d96748..aeb88b87763e 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts @@ -24,15 +24,18 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { databases: operations.Databases; configurations: operations.Configurations; logFiles: operations.LogFiles; + serverAdministrators: operations.ServerAdministrators; locationBasedPerformanceTier: operations.LocationBasedPerformanceTier; checkNameAvailability: operations.CheckNameAvailability; serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; operations: operations.Operations; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; /** * Initializes a new instance of the PostgreSQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { @@ -44,10 +47,13 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { this.databases = new operations.Databases(this); this.configurations = new operations.Configurations(this); this.logFiles = new operations.LogFiles(this); + this.serverAdministrators = new operations.ServerAdministrators(this); this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); this.operations = new operations.Operations(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); } } diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts index c8573416e8e4..5d8142c14481 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts @@ -13,17 +13,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-postgresql"; -const packageVersion = "4.3.0"; +const packageVersion = "4.4.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the PostgreSQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { @@ -44,7 +43,6 @@ export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceC super(credentials, options); - this.apiVersion = '2017-12-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/postgresql/arm-postgresql/tsconfig.json b/sdk/postgresql/arm-postgresql/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/postgresql/arm-postgresql/tsconfig.json +++ b/sdk/postgresql/arm-postgresql/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true