diff --git a/sdk/postgresql/arm-postgresql/src/models/checkNameAvailabilityMappers.ts b/sdk/postgresql/arm-postgresql/src/models/checkNameAvailabilityMappers.ts index 127d67d9f6e5..675c9f6c5fd6 100644 --- a/sdk/postgresql/arm-postgresql/src/models/checkNameAvailabilityMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/checkNameAvailabilityMappers.ts @@ -7,7 +7,6 @@ */ export { - discriminators, CloudError, ErrorAdditionalInfo, ErrorResponse, diff --git a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts index 9d129eb3cb85..e63c693ddc6d 100644 --- a/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/configurationsMappers.ts @@ -7,8 +7,8 @@ */ export { - discriminators, AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -17,25 +17,20 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, + HighAvailability, + Identity, + MaintenanceWindow, + Network, + Plan, ProxyResource, - RecoverableServerResource, Resource, - ResourceIdentity, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule + Storage, + SystemData, + TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts index 0c56b4d4394a..3ac50955c92d 100644 --- a/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/databasesMappers.ts @@ -7,8 +7,8 @@ */ export { - discriminators, AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -17,25 +17,20 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, + HighAvailability, + Identity, + MaintenanceWindow, + Network, + Plan, ProxyResource, - RecoverableServerResource, Resource, - ResourceIdentity, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule + Storage, + SystemData, + TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts index 894bb54b0fff..19d3f36b91aa 100644 --- a/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/firewallRulesMappers.ts @@ -7,8 +7,8 @@ */ export { - discriminators, AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -17,25 +17,20 @@ export { ErrorResponse, FirewallRule, FirewallRuleListResult, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, + HighAvailability, + Identity, + MaintenanceWindow, + Network, + Plan, ProxyResource, - RecoverableServerResource, Resource, - ResourceIdentity, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule + Storage, + SystemData, + TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverBasedPerformanceTierMappers.ts b/sdk/postgresql/arm-postgresql/src/models/getPrivateDnsZoneSuffixMappers.ts similarity index 69% rename from sdk/postgresql/arm-postgresql/src/models/serverBasedPerformanceTierMappers.ts rename to sdk/postgresql/arm-postgresql/src/models/getPrivateDnsZoneSuffixMappers.ts index b25abbd987af..7048cf107fa8 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serverBasedPerformanceTierMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/getPrivateDnsZoneSuffixMappers.ts @@ -7,11 +7,7 @@ */ export { - discriminators, CloudError, ErrorAdditionalInfo, - ErrorResponse, - PerformanceTierListResult, - PerformanceTierProperties, - PerformanceTierServiceLevelObjectives + ErrorResponse } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/index.ts b/sdk/postgresql/arm-postgresql/src/models/index.ts index 3d5fc2cd93f7..ebc354e55cb6 100644 --- a/sdk/postgresql/arm-postgresql/src/models/index.ts +++ b/sdk/postgresql/arm-postgresql/src/models/index.ts @@ -12,360 +12,309 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * An interface representing PrivateEndpointProperty. + * Virtual network subnet usage parameter */ -export interface PrivateEndpointProperty extends BaseResource { +export interface VirtualNetworkSubnetUsageParameter { /** - * Resource id of the private endpoint. + * Virtual network resource id. */ - id?: string; + virtualNetworkArmResourceId?: string; } /** - * An interface representing ServerPrivateLinkServiceConnectionStateProperty. + * Delegated subnet usage data. */ -export interface ServerPrivateLinkServiceConnectionStateProperty { +export interface DelegatedSubnetUsage { /** - * The private link service connection status. Possible values include: 'Approved', 'Pending', - * 'Rejected', 'Disconnected' - */ - status: PrivateLinkServiceConnectionStateStatus; - /** - * The private link service connection description. + * name of the subnet + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - description: string; + readonly subnetName?: string; /** - * The actions required for private link service connection. Possible values include: 'None' + * Number of used delegated subnets * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; + readonly usage?: number; } /** - * Properties of a private endpoint connection. + * Virtual network subnet usage data. */ -export interface ServerPrivateEndpointConnectionProperties { - /** - * Private endpoint which the connection belongs to. - */ - privateEndpoint?: PrivateEndpointProperty; - /** - * Connection state of the private endpoint connection. - */ - privateLinkServiceConnectionState?: ServerPrivateLinkServiceConnectionStateProperty; +export interface VirtualNetworkSubnetUsageResult { /** - * 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; + readonly delegatedSubnetsUsage?: DelegatedSubnetUsage[]; } /** - * A private endpoint connection under a server + * storage size in MB capability */ -export interface ServerPrivateEndpointConnection { +export interface StorageMBCapability { /** - * Resource ID of the Private Endpoint Connection. + * storage MB name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly name?: string; + /** + * supported IOPS + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportedIops?: number; /** - * Private endpoint connection properties + * storage size in MB * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly properties?: ServerPrivateEndpointConnectionProperties; + readonly storageSizeMB?: number; } /** - * Storage Profile properties of a server + * Vcores capability */ -export interface StorageProfile { +export interface VcoreCapability { /** - * Backup retention days for the server. + * vCore name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - backupRetentionDays?: number; + readonly name?: string; /** - * Enable Geo-redundant or not for server backup. Possible values include: 'Enabled', 'Disabled' + * supported vCores + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - geoRedundantBackup?: GeoRedundantBackup; + readonly vCores?: number; /** - * Max storage allowed for a server. + * supported IOPS + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - storageMB?: number; + readonly supportedIops?: number; /** - * Enable Storage Auto Grow. Possible values include: 'Enabled', 'Disabled' + * supported memory per vCore in MB + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - storageAutogrow?: StorageAutogrow; + readonly supportedMemoryPerVcoreMB?: number; } /** - * Contains the possible cases for ServerPropertiesForCreate. + * Server version capabilities. */ -export type ServerPropertiesForCreateUnion = ServerPropertiesForCreate | ServerPropertiesForDefaultCreate | ServerPropertiesForRestore | ServerPropertiesForGeoRestore | ServerPropertiesForReplica; - -/** - * The properties used to create a new server. - */ -export interface ServerPropertiesForCreate { - /** - * Polymorphic Discriminator - */ - createMode: "ServerPropertiesForCreate"; - /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' - */ - version?: ServerVersion; - /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' - */ - sslEnforcement?: SslEnforcementEnum; - /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' - */ - minimalTlsVersion?: MinimalTlsVersionEnum; +export interface ServerVersionCapability { /** - * 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' + * server version + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - publicNetworkAccess?: PublicNetworkAccessEnum; + readonly name?: string; /** - * Storage profile of a server. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - storageProfile?: StorageProfile; + readonly supportedVcores?: VcoreCapability[]; } /** - * The properties used to create a new server. + * storage edition capability */ -export interface ServerPropertiesForDefaultCreate { - /** - * Polymorphic Discriminator - */ - createMode: "Default"; - /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' - */ - version?: ServerVersion; - /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * '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; +export interface StorageEditionCapability { /** - * 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. - */ - storageProfile?: StorageProfile; - /** - * The administrator's login name of a server. Can only be specified when the server is being - * created (and is required for creation). + * storage edition name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - administratorLogin: string; + readonly name?: string; /** - * The password of the administrator login. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - administratorLoginPassword: string; + readonly supportedStorageMB?: StorageMBCapability[]; } /** - * The properties used to create a new server by restoring from a backup. + * Server edition capabilities. */ -export interface ServerPropertiesForRestore { +export interface ServerEditionCapability { /** - * Polymorphic Discriminator + * Server edition name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - createMode: "PointInTimeRestore"; + readonly name?: string; /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - version?: ServerVersion; + readonly supportedStorageEditions?: StorageEditionCapability[]; /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sslEnforcement?: SslEnforcementEnum; + readonly supportedServerVersions?: ServerVersionCapability[]; +} + +/** + * Location capabilities. + */ +export interface CapabilityProperties { /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' + * zone name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - minimalTlsVersion?: MinimalTlsVersionEnum; + readonly zone?: string; /** - * Status showing whether the server enabled infrastructure encryption. Possible values include: - * 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - infrastructureEncryption?: InfrastructureEncryption; + readonly supportedFlexibleServerEditions?: ServerEditionCapability[]; +} + +/** + * Storage properties of a server + */ +export interface Storage { /** - * 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' + * Max storage allowed for a server. */ - publicNetworkAccess?: PublicNetworkAccessEnum; + storageSizeGB?: number; +} + +/** + * Backup properties of a server + */ +export interface Backup { /** - * Storage profile of a server. + * Backup retention days for the server. */ - storageProfile?: StorageProfile; + backupRetentionDays?: number; /** - * The source server id to restore from. + * A value indicating whether Geo-Redundant backup is enabled on the server. Possible values + * include: 'Enabled', 'Disabled' */ - sourceServerId: string; + geoRedundantBackup?: GeoRedundantBackupEnum; /** - * Restore point creation time (ISO8601 format), specifying the time to restore from. + * The earliest restore point time (ISO8601 format) for server. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - restorePointInTime: Date; + readonly earliestRestoreDate?: Date; } /** - * The properties used to create a new server by restoring to a different region from a geo - * replicated backup. + * Network properties of a server */ -export interface ServerPropertiesForGeoRestore { - /** - * Polymorphic Discriminator - */ - createMode: "GeoRestore"; - /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' - */ - version?: ServerVersion; +export interface Network { /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' + * public network access is enabled or not. Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sslEnforcement?: SslEnforcementEnum; + readonly publicNetworkAccess?: ServerPublicNetworkAccessState; /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' + * delegated subnet arm resource id. */ - minimalTlsVersion?: MinimalTlsVersionEnum; + delegatedSubnetResourceId?: string; /** - * Status showing whether the server enabled infrastructure encryption. Possible values include: - * 'Enabled', 'Disabled' + * private dns zone arm resource id. */ - infrastructureEncryption?: InfrastructureEncryption; + privateDnsZoneArmResourceId?: string; +} + +/** + * High availability properties of a server + */ +export interface HighAvailability { /** - * 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' + * The HA mode for the server. Possible values include: 'Disabled', 'ZoneRedundant' */ - publicNetworkAccess?: PublicNetworkAccessEnum; + mode?: HighAvailabilityMode; /** - * Storage profile of a server. + * A state of a HA server that is visible to user. Possible values include: 'NotEnabled', + * 'CreatingStandby', 'ReplicatingData', 'FailingOver', 'Healthy', 'RemovingStandby' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - storageProfile?: StorageProfile; + readonly state?: ServerHAState; /** - * The source server id to restore from. + * availability zone information of the standby. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sourceServerId: string; + readonly standbyAvailabilityZone?: string; } /** - * The properties to create a new replica. + * Maintenance window properties of a server. */ -export interface ServerPropertiesForReplica { - /** - * Polymorphic Discriminator - */ - createMode: "Replica"; +export interface MaintenanceWindow { /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' + * indicates whether custom window is enabled or disabled */ - version?: ServerVersion; + customWindow?: string; /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' + * start hour for maintenance window */ - sslEnforcement?: SslEnforcementEnum; + startHour?: number; /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' + * start minute for maintenance window */ - minimalTlsVersion?: MinimalTlsVersionEnum; + startMinute?: number; /** - * Status showing whether the server enabled infrastructure encryption. Possible values include: - * 'Enabled', 'Disabled' + * day of week for maintenance window */ - infrastructureEncryption?: InfrastructureEncryption; + dayOfWeek?: number; +} + +/** + * Identity for the resource. + */ +export interface Identity { /** - * 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' + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - publicNetworkAccess?: PublicNetworkAccessEnum; + readonly principalId?: string; /** - * Storage profile of a server. + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - storageProfile?: StorageProfile; + readonly tenantId?: string; /** - * The master server id to create replica from. + * The identity type. Possible values include: 'SystemAssigned' */ - sourceServerId: string; + type?: ResourceIdentityType; } /** - * Billing information related properties of a server. + * Sku information related properties of a server. */ export interface Sku { /** - * The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. + * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. */ name: string; /** - * The tier of the particular SKU, e.g. Basic. Possible values include: 'Basic', + * The tier of the particular SKU, e.g. Burstable. Possible values include: 'Burstable', * 'GeneralPurpose', 'MemoryOptimized' */ - tier?: SkuTier; + tier: SkuTier; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { /** - * The scale up/out capacity, representing server's compute units. + * The identity that created the resource. */ - capacity?: number; + createdBy?: string; /** - * The size code, to be interpreted by resource as appropriate. + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - size?: string; + createdByType?: CreatedByType; /** - * The family of hardware. + * The timestamp of resource creation (UTC). */ - family?: string; -} - -/** - * Azure Active Directory identity configuration for a resource. - */ -export interface ResourceIdentity { + createdAt?: Date; /** - * The Azure Active Directory principal id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The identity that last modified the resource. */ - readonly principalId?: string; + lastModifiedBy?: 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' + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - type?: IdentityType; + lastModifiedByType?: CreatedByType; /** - * The Azure Active Directory tenant id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The timestamp of resource last modification (UTC) */ - readonly tenantId?: string; + lastModifiedAt?: Date; } /** @@ -415,7 +364,7 @@ export interface Server extends TrackedResource { /** * The Azure Active Directory identity of the server. */ - identity?: ResourceIdentity; + identity?: Identity; /** * The SKU (pricing tier) of the server. */ @@ -426,139 +375,115 @@ export interface Server extends TrackedResource { */ administratorLogin?: string; /** - * Server version. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' + * The administrator login password (required for server creation). */ - version?: ServerVersion; - /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' - */ - sslEnforcement?: SslEnforcementEnum; + administratorLoginPassword?: string; /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' + * PostgreSQL Server version. Possible values include: '13', '12', '11' */ - minimalTlsVersion?: MinimalTlsVersionEnum; + version?: ServerVersion; /** - * Status showing whether the server data encryption is enabled with customer-managed keys. + * The minor version of the server. * **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; + readonly minorVersion?: string; /** * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', - * 'Disabled', 'Inaccessible' + * 'Disabled', 'Starting', 'Stopping', 'Stopped', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - userVisibleState?: ServerState; + readonly state?: ServerState; /** * The fully qualified domain name of a server. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - fullyQualifiedDomainName?: string; - /** - * Earliest restore point creation time (ISO8601 format) - */ - earliestRestoreDate?: Date; + readonly fullyQualifiedDomainName?: string; /** - * Storage profile of a server. + * Storage properties of a server. */ - storageProfile?: StorageProfile; + storage?: Storage; /** - * The replication role of the server. + * Backup properties of a server. */ - replicationRole?: string; + backup?: Backup; /** - * The master server id of a replica server. + * Network properties of a server. */ - masterServerId?: string; + network?: Network; /** - * The maximum number of replicas that a master server can have. + * High availability properties of a server. */ - replicaCapacity?: number; + highAvailability?: HighAvailability; /** - * 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' + * Maintenance window properties of a server. */ - publicNetworkAccess?: PublicNetworkAccessEnum; + maintenanceWindow?: MaintenanceWindow; /** - * List of private endpoint connections on a server - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The source server resource ID to restore from. It's required when 'createMode' is + * 'PointInTimeRestore'. */ - readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; -} - -/** - * Represents a server to be created. - */ -export interface ServerForCreate { + sourceServerResourceId?: string; /** - * The Azure Active Directory identity of the server. + * Restore point creation time (ISO8601 format), specifying the time to restore from. It's + * required when 'createMode' is 'PointInTimeRestore'. */ - identity?: ResourceIdentity; + pointInTimeUTC?: Date; /** - * The SKU (pricing tier) of the server. + * availability zone information of the server. */ - sku?: Sku; + availabilityZone?: string; /** - * Properties of the server. + * The mode to create a new PostgreSQL server. Possible values include: 'Default', 'Create', + * 'Update', 'PointInTimeRestore' */ - properties: ServerPropertiesForCreateUnion; + createMode?: CreateMode; /** - * The location the resource resides in. + * Application-specific metadata in the form of key-value pairs. */ - location: string; + serverTags?: { [propertyName: string]: string }; /** - * Application-specific metadata in the form of key-value pairs. + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: { [propertyName: string]: string }; + readonly systemData?: SystemData; } /** - * Parameters allowed to update for a server. + * Represents a server to be updated. */ -export interface ServerUpdateParameters { +export interface ServerForUpdate { /** - * The Azure Active Directory identity of the server. + * The location the resource resides in. */ - identity?: ResourceIdentity; + location?: string; /** * The SKU (pricing tier) of the server. */ sku?: Sku; - /** - * Storage profile of a server. - */ - storageProfile?: StorageProfile; /** * The password of the administrator login. */ administratorLoginPassword?: string; /** - * The version of a server. Possible values include: '9.5', '9.6', '10', '10.0', '10.2', '11' + * Storage properties of a server. */ - version?: ServerVersion; + storage?: Storage; /** - * Enable ssl enforcement or not when connect to server. Possible values include: 'Enabled', - * 'Disabled' + * Backup properties of a server. */ - sslEnforcement?: SslEnforcementEnum; + backup?: Backup; /** - * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', - * 'TLS1_2', 'TLSEnforcementDisabled' + * High availability properties of a server. */ - minimalTlsVersion?: MinimalTlsVersionEnum; + highAvailability?: HighAvailability; /** - * 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' + * Maintenance window properties of a server. */ - publicNetworkAccess?: PublicNetworkAccessEnum; + maintenanceWindow?: MaintenanceWindow; /** - * The replication role of the server. + * The mode to update a new PostgreSQL server. Possible values include: 'Default', 'Update' */ - replicationRole?: string; + createMode?: CreateModeForUpdate; /** * Application-specific metadata in the form of key-value pairs. */ @@ -585,40 +510,11 @@ export interface FirewallRule extends ProxyResource { * The end IP address of the server firewall rule. Must be IPv4 format. */ endIpAddress: string; -} - -/** - * A virtual network rule. - */ -export interface VirtualNetworkRule extends ProxyResource { - /** - * The ARM resource id of the virtual network subnet. - */ - virtualNetworkSubnetId: string; /** - * Create firewall rule before the virtual network has vnet service endpoint enabled. - */ - ignoreMissingVnetServiceEndpoint?: boolean; - /** - * Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', - * 'Deleting', 'Unknown' + * The system metadata relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly state?: VirtualNetworkRuleState; -} - -/** - * Represents a Database. - */ -export interface Database extends ProxyResource { - /** - * The charset of the database. - */ - charset?: string; - /** - * The collation of the database. - */ - collation?: string; + readonly systemData?: SystemData; } /** @@ -640,10 +536,11 @@ export interface Configuration extends ProxyResource { */ readonly defaultValue?: string; /** - * Data type of the configuration. + * Data type of the configuration. Possible values include: 'Boolean', 'Numeric', 'Integer', + * 'Enumeration' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly dataType?: string; + readonly dataType?: ConfigurationDataType; /** * Allowed values of the configuration. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -653,6 +550,11 @@ export interface Configuration extends ProxyResource { * Source of the configuration. */ source?: string; + /** + * The system metadata relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -695,6 +597,10 @@ export interface Operation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly display?: OperationDisplay; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; /** * The intended executor of the operation. Possible values include: 'NotSpecified', 'user', * 'system' @@ -713,113 +619,14 @@ export interface Operation { */ export interface OperationListResult { /** - * The list of resource provider operations. + * Collection of available operation details */ value?: Operation[]; -} - -/** - * Represents a log file. - */ -export interface LogFile extends ProxyResource { - /** - * Size of the log file. - */ - sizeInKB?: number; - /** - * Creation timestamp of the log file. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly createdTime?: Date; - /** - * Last modified timestamp of the log file. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastModifiedTime?: Date; - /** - * Type of the log file. - */ - logFileType?: string; - /** - * The url to download the log file from. - */ - url?: string; -} - -/** - * Service level objectives for performance tier. - */ -export interface PerformanceTierServiceLevelObjectives { - /** - * ID for the service level objective. - */ - id?: string; - /** - * Edition of the performance tier. - */ - edition?: string; - /** - * vCore associated with the service level objective - */ - vCore?: number; - /** - * Hardware generation associated with the service level objective - */ - hardwareGeneration?: string; - /** - * Maximum Backup retention in days for the performance tier edition - */ - maxBackupRetentionDays?: number; - /** - * Minimum Backup retention in days for the performance tier edition - */ - minBackupRetentionDays?: number; - /** - * Max storage allowed for a server. - */ - maxStorageMB?: number; - /** - * Max storage allowed for a server. - */ - minStorageMB?: number; -} - -/** - * Performance tier properties - */ -export interface PerformanceTierProperties { - /** - * ID of the performance tier. - */ - id?: string; - /** - * Maximum Backup retention in days for the performance tier edition - */ - maxBackupRetentionDays?: number; - /** - * Minimum Backup retention in days for the performance tier edition - */ - minBackupRetentionDays?: number; - /** - * Max storage allowed for a server. - */ - maxStorageMB?: number; /** - * Max storage allowed for a server. - */ - minLargeStorageMB?: number; - /** - * Max storage allowed for a server. - */ - maxLargeStorageMB?: number; - /** - * Max storage allowed for a server. - */ - minStorageMB?: number; - /** - * Service level objectives associated with the performance tier + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. */ - serviceLevelObjectives?: PerformanceTierServiceLevelObjectives[]; + nextLink?: string; } /** @@ -849,9 +656,27 @@ export interface NameAvailability { */ nameAvailable?: boolean; /** - * Reason for name being unavailable. + * name of the PostgreSQL server. + */ + name?: string; + /** + * type of the server + */ + type?: string; +} + +/** + * Represents server restart parameters. + */ +export interface RestartParameter { + /** + * Indicates whether to restart the server with failover. + */ + restartWithFailover?: boolean; + /** + * Failover mode. */ - reason?: string; + failoverMode?: string; } /** @@ -904,201 +729,157 @@ export interface ErrorResponse { } /** - * Represents a and external administrator to be created. + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource */ -export interface ServerAdministratorResource extends ProxyResource { - /** - * The server administrator login account name. - */ - login: string; - /** - * The server administrator Sid (Secure ID). - */ - sid: string; +export interface AzureEntityResource extends Resource { /** - * The server Active Directory Administrator tenant id. + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tenantId: string; + readonly etag?: string; } /** - * A recoverable server resource. + * An interface representing ResourceModelWithAllowedPropertySetIdentity. */ -export interface RecoverableServerResource extends ProxyResource { - /** - * The last available backup date time. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastAvailableBackupDateTime?: string; - /** - * The service level objective - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serviceLevelObjective?: string; - /** - * Edition of the performance tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly edition?: string; - /** - * vCore associated with the service level objective - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly vCore?: number; - /** - * Hardware generation associated with the service level objective - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly hardwareGeneration?: string; - /** - * The PostgreSQL version - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; +export interface ResourceModelWithAllowedPropertySetIdentity extends Identity { } /** - * The resource model definition for an Azure Resource Manager resource with an etag. - * @summary Entity Resource + * An interface representing ResourceModelWithAllowedPropertySetSku. */ -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; +export interface ResourceModelWithAllowedPropertySetSku extends Sku { } /** - * A server security alert policy. + * Plan for the resource. */ -export interface ServerSecurityAlertPolicy extends ProxyResource { +export interface Plan { /** - * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: - * 'Enabled', 'Disabled' + * A user defined name of the 3rd Party Artifact that is being procured. */ - state: ServerSecurityAlertPolicyState; - /** - * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, - * Sql_Injection_Vulnerability, Access_Anomaly - */ - disabledAlerts?: string[]; - /** - * Specifies an array of e-mail addresses to which the alert is sent. - */ - emailAddresses?: string[]; + name: string; /** - * Specifies that the alert is sent to the account administrators. + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ - emailAccountAdmins?: boolean; + publisher: string; /** - * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob - * storage will hold all Threat Detection audit logs. + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + * specified for the artifact at the time of Data Market onboarding. */ - storageEndpoint?: string; + product: string; /** - * Specifies the identifier key of the Threat Detection audit storage account. + * A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. */ - storageAccountAccessKey?: string; + promotionCode?: string; /** - * Specifies the number of days to keep in the Threat Detection audit logs. + * The version of the desired product/artifact. */ - retentionDays?: number; + version?: string; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetPlan. + */ +export interface ResourceModelWithAllowedPropertySetPlan extends Plan { } /** - * An interface representing PrivateLinkServiceConnectionStateProperty. + * The resource model definition containing the full set of allowed properties for a resource. + * Except properties bag, there cannot be a top level property outside of this set. */ -export interface PrivateLinkServiceConnectionStateProperty { +export interface ResourceModelWithAllowedPropertySet extends BaseResource { /** - * The private link service connection status. + * 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.** */ - status: string; + readonly id?: string; /** - * The private link service connection description. + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - description: string; + readonly name?: string; /** - * The actions required for private link service connection. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **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 { + readonly type?: string; + /** + * The geo-location where the resource lives + */ + location?: string; /** - * Private endpoint which the connection belongs to. + * The fully qualified resource ID of the resource that manages this resource. Indicates if this + * resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another + * resource. */ - privateEndpoint?: PrivateEndpointProperty; + managedBy?: string; /** - * Connection state of the private endpoint connection. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource + * provider must validate and persist this value. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + kind?: string; /** - * State of the private endpoint connection. + * The etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal etag convention. Entity tags are used for comparing two + * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag + * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + * (section 14.27) header fields. * **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 { + readonly etag?: string; /** * Resource tags. */ tags?: { [propertyName: string]: string }; + identity?: ResourceModelWithAllowedPropertySetIdentity; + sku?: ResourceModelWithAllowedPropertySetSku; + plan?: ResourceModelWithAllowedPropertySetPlan; } /** - * Properties of a private link resource. + * Represents a Database. */ -export interface PrivateLinkResourceProperties { +export interface Database extends ProxyResource { /** - * The private link resource group id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The charset of the database. + */ + charset?: string; + /** + * The collation of the database. */ - readonly groupId?: string; + collation?: string; /** - * The private link resource required member names. + * The system metadata relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly requiredMembers?: string[]; + readonly systemData?: SystemData; } /** - * A private link resource + * Optional Parameters. */ -export interface PrivateLinkResource extends ProxyResource { +export interface ServersRestartOptionalParams extends msRest.RequestOptionsBase { /** - * The private link resource group id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The parameters for restarting a server. */ - readonly properties?: PrivateLinkResourceProperties; + parameters?: RestartParameter; } /** - * A PostgreSQL Server key. + * Optional Parameters. */ -export interface ServerKey extends ProxyResource { - /** - * Kind of encryption protector used to protect the key. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kind?: string; +export interface ServersBeginRestartOptionalParams extends msRest.RequestOptionsBase { /** - * The URI of the key. + * The parameters for restarting a server. */ - uri?: string; - /** - * The key creation date. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly creationDate?: Date; + parameters?: RestartParameter; } /** @@ -1114,6 +895,10 @@ export interface PostgreSQLManagementClientOptions extends AzureServiceClientOpt * @extends Array */ export interface ServerListResult extends Array { + /** + * The link used to get the next page of operations. + */ + nextLink?: string; } /** @@ -1122,27 +907,10 @@ export interface ServerListResult extends Array { * @extends Array */ export interface FirewallRuleListResult extends Array { -} - -/** - * @interface - * A list of virtual network rules. - * @extends Array - */ -export interface VirtualNetworkRuleListResult extends Array { /** - * Link to retrieve next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The link used to get the next page of operations. */ - readonly nextLink?: string; -} - -/** - * @interface - * A List of databases. - * @extends Array - */ -export interface DatabaseListResult extends Array { + nextLink?: string; } /** @@ -1151,64 +919,18 @@ export interface DatabaseListResult extends Array { * @extends Array */ export interface ConfigurationListResult extends Array { -} - -/** - * @interface - * A list of log files. - * @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. - * @extends Array - */ -export interface PerformanceTierListResult extends Array { -} - -/** - * @interface - * A list of the server's security alert policies. - * @extends Array - */ -export interface ServerSecurityAlertPolicyListResult 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 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.** + * The link used to get the next page of operations. */ - readonly nextLink?: string; + nextLink?: string; } /** * @interface - * A list of private link resources - * @extends Array + * location capability + * @extends Array */ -export interface PrivateLinkResourceListResult extends Array { +export interface CapabilitiesListResult extends Array { /** * Link to retrieve next page of results. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1218,689 +940,126 @@ export interface PrivateLinkResourceListResult extends Array - */ -export interface ServerKeyListResult 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' - * @readonly - * @enum {string} - */ -export type ServerVersion = '9.5' | '9.6' | '10' | '10.0' | '10.2' | '11'; - -/** - * Defines values for SslEnforcementEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type SslEnforcementEnum = 'Enabled' | 'Disabled'; - -/** - * Defines values for MinimalTlsVersionEnum. - * Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled' - * @readonly - * @enum {string} - */ -export type MinimalTlsVersionEnum = 'TLS1_0' | 'TLS1_1' | 'TLS1_2' | 'TLSEnforcementDisabled'; - -/** - * Defines values for InfrastructureEncryption. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type InfrastructureEncryption = 'Enabled' | 'Disabled'; - -/** - * Defines values for PublicNetworkAccessEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type PublicNetworkAccessEnum = 'Enabled' | 'Disabled'; - -/** - * Defines values for PrivateLinkServiceConnectionStateStatus. - * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - * @readonly - * @enum {string} - */ -export type PrivateLinkServiceConnectionStateStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; - -/** - * Defines values for PrivateLinkServiceConnectionStateActionsRequire. - * Possible values include: 'None' - * @readonly - * @enum {string} - */ -export type PrivateLinkServiceConnectionStateActionsRequire = 'None'; - -/** - * Defines values for PrivateEndpointProvisioningState. - * Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' - * @readonly - * @enum {string} - */ -export type PrivateEndpointProvisioningState = 'Approving' | 'Ready' | 'Dropping' | 'Failed' | 'Rejecting'; - -/** - * 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} - */ -export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; - -/** - * Contains response data for the create operation. - */ -export type ServersCreateResponse = Server & { - /** - * 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: Server; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type ServersUpdateResponse = Server & { - /** - * 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: Server; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ServersGetResponse = Server & { - /** - * 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: Server; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ServersListByResourceGroupResponse = ServerListResult & { - /** - * 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: ServerListResult; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type ServersListResponse = ServerListResult & { - /** - * 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: ServerListResult; - }; -}; - -/** - * Contains response data for the beginCreate operation. - */ -export type ServersBeginCreateResponse = Server & { - /** - * 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: Server; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type ServersBeginUpdateResponse = Server & { - /** - * 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: Server; - }; -}; - -/** - * Contains response data for the listByServer operation. - */ -export type ReplicasListByServerResponse = ServerListResult & { - /** - * 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: ServerListResult; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { - /** - * 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: FirewallRule; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type FirewallRulesGetResponse = FirewallRule & { - /** - * 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: FirewallRule; - }; -}; - -/** - * Contains response data for the listByServer operation. - */ -export type FirewallRulesListByServerResponse = FirewallRuleListResult & { - /** - * 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: FirewallRuleListResult; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { - /** - * 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: FirewallRule; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { - /** - * 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: VirtualNetworkRule; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { - /** - * 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: VirtualNetworkRule; - }; -}; - -/** - * Contains response data for the listByServer operation. - */ -export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { - /** - * 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: VirtualNetworkRuleListResult; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { - /** - * 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: VirtualNetworkRule; - }; -}; - -/** - * Contains response data for the listByServerNext operation. - */ -export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { - /** - * 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: VirtualNetworkRuleListResult; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type DatabasesCreateOrUpdateResponse = Database & { - /** - * 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: Database; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DatabasesGetResponse = Database & { - /** - * 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: Database; - }; -}; - -/** - * Contains response data for the listByServer operation. - */ -export type DatabasesListByServerResponse = DatabaseListResult & { - /** - * 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: DatabaseListResult; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. + * A List of databases. + * @extends Array */ -export type DatabasesBeginCreateOrUpdateResponse = Database & { +export interface DatabaseListResult extends Array { /** - * The underlying HTTP response. + * The link used to get the next page of databases. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + nextLink?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Database; - }; -}; +/** + * Defines values for ServerVersion. + * Possible values include: '13', '12', '11' + * @readonly + * @enum {string} + */ +export type ServerVersion = '13' | '12' | '11'; /** - * Contains response data for the createOrUpdate operation. + * Defines values for ServerState. + * Possible values include: 'Ready', 'Dropping', 'Disabled', 'Starting', 'Stopping', 'Stopped', + * 'Updating' + * @readonly + * @enum {string} */ -export type ConfigurationsCreateOrUpdateResponse = Configuration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Starting' | 'Stopping' | 'Stopped' | 'Updating'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Configuration; - }; -}; +/** + * Defines values for GeoRedundantBackupEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type GeoRedundantBackupEnum = 'Enabled' | 'Disabled'; /** - * Contains response data for the get operation. + * Defines values for ServerPublicNetworkAccessState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} */ -export type ConfigurationsGetResponse = Configuration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ServerPublicNetworkAccessState = 'Enabled' | 'Disabled'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Configuration; - }; -}; +/** + * Defines values for HighAvailabilityMode. + * Possible values include: 'Disabled', 'ZoneRedundant' + * @readonly + * @enum {string} + */ +export type HighAvailabilityMode = 'Disabled' | 'ZoneRedundant'; /** - * Contains response data for the listByServer operation. + * Defines values for ServerHAState. + * Possible values include: 'NotEnabled', 'CreatingStandby', 'ReplicatingData', 'FailingOver', + * 'Healthy', 'RemovingStandby' + * @readonly + * @enum {string} */ -export type ConfigurationsListByServerResponse = ConfigurationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ServerHAState = 'NotEnabled' | 'CreatingStandby' | 'ReplicatingData' | 'FailingOver' | 'Healthy' | 'RemovingStandby'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ConfigurationListResult; - }; -}; +/** + * Defines values for CreateMode. + * Possible values include: 'Default', 'Create', 'Update', 'PointInTimeRestore' + * @readonly + * @enum {string} + */ +export type CreateMode = 'Default' | 'Create' | 'Update' | 'PointInTimeRestore'; /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} */ -export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ResourceIdentityType = 'SystemAssigned'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Configuration; - }; -}; +/** + * Defines values for SkuTier. + * Possible values include: 'Burstable', 'GeneralPurpose', 'MemoryOptimized' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'; /** - * Contains response data for the listUpdateConfigurations operation. + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} */ -export type ServerParametersListUpdateConfigurationsResponse = ConfigurationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ConfigurationListResult; - }; -}; +/** + * Defines values for CreateModeForUpdate. + * Possible values include: 'Default', 'Update' + * @readonly + * @enum {string} + */ +export type CreateModeForUpdate = 'Default' | 'Update'; /** - * Contains response data for the beginListUpdateConfigurations operation. + * Defines values for ConfigurationDataType. + * Possible values include: 'Boolean', 'Numeric', 'Integer', 'Enumeration' + * @readonly + * @enum {string} */ -export type ServerParametersBeginListUpdateConfigurationsResponse = ConfigurationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ConfigurationDataType = 'Boolean' | 'Numeric' | 'Integer' | 'Enumeration'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ConfigurationListResult; - }; -}; +/** + * Defines values for OperationOrigin. + * Possible values include: 'NotSpecified', 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; /** - * Contains response data for the listByServer operation. + * Contains response data for the create operation. */ -export type LogFilesListByServerResponse = LogFileListResult & { +export type ServersCreateResponse = Server & { /** * The underlying HTTP response. */ @@ -1913,14 +1072,14 @@ export type LogFilesListByServerResponse = LogFileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: LogFileListResult; + parsedBody: Server; }; }; /** - * Contains response data for the get operation. + * Contains response data for the update operation. */ -export type ServerAdministratorsGetResponse = ServerAdministratorResource & { +export type ServersUpdateResponse = Server & { /** * The underlying HTTP response. */ @@ -1933,14 +1092,14 @@ export type ServerAdministratorsGetResponse = ServerAdministratorResource & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerAdministratorResource; + parsedBody: Server; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type ServerAdministratorsCreateOrUpdateResponse = ServerAdministratorResource & { +export type ServersGetResponse = Server & { /** * The underlying HTTP response. */ @@ -1953,14 +1112,14 @@ export type ServerAdministratorsCreateOrUpdateResponse = ServerAdministratorReso /** * The response body as parsed JSON or XML */ - parsedBody: ServerAdministratorResource; + parsedBody: Server; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroup operation. */ -export type ServerAdministratorsListResponse = ServerAdministratorResourceListResult & { +export type ServersListByResourceGroupResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1973,14 +1132,14 @@ export type ServerAdministratorsListResponse = ServerAdministratorResourceListRe /** * The response body as parsed JSON or XML */ - parsedBody: ServerAdministratorResourceListResult; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the list operation. */ -export type ServerAdministratorsBeginCreateOrUpdateResponse = ServerAdministratorResource & { +export type ServersListResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -1993,14 +1152,14 @@ export type ServerAdministratorsBeginCreateOrUpdateResponse = ServerAdministrato /** * The response body as parsed JSON or XML */ - parsedBody: ServerAdministratorResource; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginCreate operation. */ -export type RecoverableServersGetResponse = RecoverableServerResource & { +export type ServersBeginCreateResponse = Server & { /** * The underlying HTTP response. */ @@ -2013,14 +1172,14 @@ export type RecoverableServersGetResponse = RecoverableServerResource & { /** * The response body as parsed JSON or XML */ - parsedBody: RecoverableServerResource; + parsedBody: Server; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginUpdate operation. */ -export type ServerBasedPerformanceTierListResponse = PerformanceTierListResult & { +export type ServersBeginUpdateResponse = Server & { /** * The underlying HTTP response. */ @@ -2033,14 +1192,14 @@ export type ServerBasedPerformanceTierListResponse = PerformanceTierListResult & /** * The response body as parsed JSON or XML */ - parsedBody: PerformanceTierListResult; + parsedBody: Server; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult & { +export type ServersListByResourceGroupNextResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -2053,14 +1212,14 @@ export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult /** * The response body as parsed JSON or XML */ - parsedBody: PerformanceTierListResult; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the listNext operation. */ -export type CheckNameAvailabilityExecuteResponse = NameAvailability & { +export type ServersListNextResponse = ServerListResult & { /** * The underlying HTTP response. */ @@ -2073,14 +1232,14 @@ export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The response body as parsed JSON or XML */ - parsedBody: NameAvailability; + parsedBody: ServerListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type OperationsListResponse = OperationListResult & { +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -2093,14 +1252,14 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: FirewallRule; }; }; /** * Contains response data for the get operation. */ -export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { +export type FirewallRulesGetResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -2113,14 +1272,14 @@ export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: FirewallRule; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type FirewallRulesListByServerResponse = FirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -2133,14 +1292,14 @@ export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAl /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: FirewallRuleListResult; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ServerSecurityAlertPoliciesListByServerResponse = ServerSecurityAlertPolicyListResult & { +export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { /** * The underlying HTTP response. */ @@ -2153,14 +1312,14 @@ export type ServerSecurityAlertPoliciesListByServerResponse = ServerSecurityAler /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicyListResult; + parsedBody: FirewallRule; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type FirewallRulesListByServerNextResponse = FirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -2173,14 +1332,14 @@ export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecur /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: FirewallRuleListResult; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the listByServer operation. */ -export type ServerSecurityAlertPoliciesListByServerNextResponse = ServerSecurityAlertPolicyListResult & { +export type ConfigurationsListByServerResponse = ConfigurationListResult & { /** * The underlying HTTP response. */ @@ -2193,14 +1352,14 @@ export type ServerSecurityAlertPoliciesListByServerNextResponse = ServerSecurity /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicyListResult; + parsedBody: ConfigurationListResult; }; }; /** * Contains response data for the get operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { +export type ConfigurationsGetResponse = Configuration & { /** * The underlying HTTP response. */ @@ -2213,14 +1372,14 @@ export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: Configuration; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the update operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { +export type ConfigurationsUpdateResponse = Configuration & { /** * The underlying HTTP response. */ @@ -2233,14 +1392,14 @@ export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointCo /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: Configuration; }; }; /** - * Contains response data for the updateTags operation. + * Contains response data for the beginUpdate operation. */ -export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { +export type ConfigurationsBeginUpdateResponse = Configuration & { /** * The underlying HTTP response. */ @@ -2253,14 +1412,14 @@ export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnec /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: Configuration; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the listByServerNext operation. */ -export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { +export type ConfigurationsListByServerNextResponse = ConfigurationListResult & { /** * The underlying HTTP response. */ @@ -2273,14 +1432,14 @@ export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConn /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: ConfigurationListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the execute operation. */ -export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { +export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The underlying HTTP response. */ @@ -2293,14 +1452,14 @@ export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpo /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: NameAvailability; }; }; /** - * Contains response data for the beginUpdateTags operation. + * Contains response data for the execute operation. */ -export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { +export type LocationBasedCapabilitiesExecuteResponse = CapabilitiesListResult & { /** * The underlying HTTP response. */ @@ -2313,14 +1472,14 @@ export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointC /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnection; + parsedBody: CapabilitiesListResult; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the executeNext operation. */ -export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { +export type LocationBasedCapabilitiesExecuteNextResponse = CapabilitiesListResult & { /** * The underlying HTTP response. */ @@ -2333,14 +1492,14 @@ export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpoint /** * The response body as parsed JSON or XML */ - parsedBody: PrivateEndpointConnectionListResult; + parsedBody: CapabilitiesListResult; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the execute operation. */ -export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { +export type VirtualNetworkSubnetUsageExecuteResponse = VirtualNetworkSubnetUsageResult & { /** * The underlying HTTP response. */ @@ -2353,14 +1512,14 @@ export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListRe /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourceListResult; + parsedBody: VirtualNetworkSubnetUsageResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -2373,14 +1532,14 @@ export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResource; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the create operation. */ -export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { +export type DatabasesCreateResponse = Database & { /** * The underlying HTTP response. */ @@ -2393,14 +1552,14 @@ export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceLi /** * The response body as parsed JSON or XML */ - parsedBody: PrivateLinkResourceListResult; + parsedBody: Database; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type ServerKeysListResponse = ServerKeyListResult & { +export type DatabasesGetResponse = Database & { /** * The underlying HTTP response. */ @@ -2413,14 +1572,14 @@ export type ServerKeysListResponse = ServerKeyListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKeyListResult; + parsedBody: Database; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByServer operation. */ -export type ServerKeysGetResponse = ServerKey & { +export type DatabasesListByServerResponse = DatabaseListResult & { /** * The underlying HTTP response. */ @@ -2433,14 +1592,14 @@ export type ServerKeysGetResponse = ServerKey & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKey; + parsedBody: DatabaseListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginCreate operation. */ -export type ServerKeysCreateOrUpdateResponse = ServerKey & { +export type DatabasesBeginCreateResponse = Database & { /** * The underlying HTTP response. */ @@ -2453,14 +1612,14 @@ export type ServerKeysCreateOrUpdateResponse = ServerKey & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKey; + parsedBody: Database; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { +export type DatabasesListByServerNextResponse = DatabaseListResult & { /** * The underlying HTTP response. */ @@ -2473,14 +1632,19 @@ export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKey; + parsedBody: DatabaseListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the execute operation. */ -export type ServerKeysListNextResponse = ServerKeyListResult & { +export type GetPrivateDnsZoneSuffixExecuteResponse = { + /** + * The parsed response body. + */ + body: string; + /** * The underlying HTTP response. */ @@ -2493,6 +1657,6 @@ export type ServerKeysListNextResponse = ServerKeyListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerKeyListResult; + parsedBody: string; }; }; diff --git a/sdk/postgresql/arm-postgresql/src/models/locationBasedCapabilitiesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/locationBasedCapabilitiesMappers.ts new file mode 100644 index 000000000000..d8ca8f65034d --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/models/locationBasedCapabilitiesMappers.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CapabilitiesListResult, + CapabilityProperties, + CloudError, + ErrorAdditionalInfo, + ErrorResponse, + ServerEditionCapability, + ServerVersionCapability, + StorageEditionCapability, + StorageMBCapability, + VcoreCapability +} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts deleted file mode 100644 index b861329e8bd8..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/logFilesMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - LogFileListResult, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, - ProxyResource, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/mappers.ts b/sdk/postgresql/arm-postgresql/src/models/mappers.ts index 308482baddf2..856067df4afa 100644 --- a/sdk/postgresql/arm-postgresql/src/models/mappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/mappers.ts @@ -12,14 +12,14 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const PrivateEndpointProperty: msRest.CompositeMapper = { - serializedName: "PrivateEndpointProperty", +export const VirtualNetworkSubnetUsageParameter: msRest.CompositeMapper = { + serializedName: "VirtualNetworkSubnetUsageParameter", type: { name: "Composite", - className: "PrivateEndpointProperty", + className: "VirtualNetworkSubnetUsageParameter", modelProperties: { - id: { - serializedName: "id", + virtualNetworkArmResourceId: { + serializedName: "virtualNetworkArmResourceId", type: { name: "String" } @@ -28,320 +28,351 @@ export const PrivateEndpointProperty: msRest.CompositeMapper = { } }; -export const ServerPrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { - serializedName: "ServerPrivateLinkServiceConnectionStateProperty", +export const DelegatedSubnetUsage: msRest.CompositeMapper = { + serializedName: "DelegatedSubnetUsage", type: { name: "Composite", - className: "ServerPrivateLinkServiceConnectionStateProperty", + className: "DelegatedSubnetUsage", modelProperties: { - status: { - required: true, - serializedName: "status", - type: { - name: "String" - } - }, - description: { - required: true, - serializedName: "description", + subnetName: { + readOnly: true, + serializedName: "subnetName", type: { name: "String" } }, - actionsRequired: { + usage: { readOnly: true, - serializedName: "actionsRequired", + serializedName: "usage", type: { - name: "String" + name: "Number" } } } } }; -export const ServerPrivateEndpointConnectionProperties: msRest.CompositeMapper = { - serializedName: "ServerPrivateEndpointConnectionProperties", +export const VirtualNetworkSubnetUsageResult: msRest.CompositeMapper = { + serializedName: "VirtualNetworkSubnetUsageResult", type: { name: "Composite", - className: "ServerPrivateEndpointConnectionProperties", + className: "VirtualNetworkSubnetUsageResult", modelProperties: { - privateEndpoint: { - serializedName: "privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpointProperty" - } - }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "ServerPrivateLinkServiceConnectionStateProperty" - } - }, - provisioningState: { + delegatedSubnetsUsage: { readOnly: true, - serializedName: "provisioningState", + serializedName: "delegatedSubnetsUsage", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DelegatedSubnetUsage" + } + } } } } } }; -export const ServerPrivateEndpointConnection: msRest.CompositeMapper = { - serializedName: "ServerPrivateEndpointConnection", +export const StorageMBCapability: msRest.CompositeMapper = { + serializedName: "StorageMBCapability", type: { name: "Composite", - className: "ServerPrivateEndpointConnection", + className: "StorageMBCapability", modelProperties: { - id: { + name: { readOnly: true, - serializedName: "id", + serializedName: "name", type: { name: "String" } }, - properties: { + supportedIops: { readOnly: true, - serializedName: "properties", + serializedName: "supportedIops", type: { - name: "Composite", - className: "ServerPrivateEndpointConnectionProperties" + name: "Number" + } + }, + storageSizeMB: { + readOnly: true, + serializedName: "storageSizeMB", + type: { + name: "Number" } } } } }; -export const StorageProfile: msRest.CompositeMapper = { - serializedName: "StorageProfile", +export const VcoreCapability: msRest.CompositeMapper = { + serializedName: "VcoreCapability", type: { name: "Composite", - className: "StorageProfile", + className: "VcoreCapability", modelProperties: { - backupRetentionDays: { - serializedName: "backupRetentionDays", + name: { + readOnly: true, + serializedName: "name", type: { - name: "Number" + name: "String" } }, - geoRedundantBackup: { - serializedName: "geoRedundantBackup", + vCores: { + readOnly: true, + serializedName: "vCores", type: { - name: "String" + name: "Number" } }, - storageMB: { - serializedName: "storageMB", + supportedIops: { + readOnly: true, + serializedName: "supportedIops", type: { name: "Number" } }, - storageAutogrow: { - serializedName: "storageAutogrow", + supportedMemoryPerVcoreMB: { + readOnly: true, + serializedName: "supportedMemoryPerVcoreMB", type: { - name: "String" + name: "Number" } } } } }; -export const ServerPropertiesForCreate: msRest.CompositeMapper = { - serializedName: "ServerPropertiesForCreate", +export const ServerVersionCapability: msRest.CompositeMapper = { + serializedName: "ServerVersionCapability", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "createMode", - clientName: "createMode" - }, - uberParent: "ServerPropertiesForCreate", - className: "ServerPropertiesForCreate", + className: "ServerVersionCapability", modelProperties: { - version: { - serializedName: "version", - type: { - name: "String" - } - }, - sslEnforcement: { - serializedName: "sslEnforcement", - type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] - } - }, - minimalTlsVersion: { - serializedName: "minimalTlsVersion", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - infrastructureEncryption: { - serializedName: "infrastructureEncryption", + supportedVcores: { + readOnly: true, + serializedName: "supportedVcores", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VcoreCapability" + } + } } - }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", + } + } + } +}; + +export const StorageEditionCapability: msRest.CompositeMapper = { + serializedName: "StorageEditionCapability", + type: { + name: "Composite", + className: "StorageEditionCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - storageProfile: { - serializedName: "storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - createMode: { - required: true, - serializedName: "createMode", + supportedStorageMB: { + readOnly: true, + serializedName: "supportedStorageMB", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageMBCapability" + } + } } } } } }; -export const ServerPropertiesForDefaultCreate: msRest.CompositeMapper = { - serializedName: "Default", +export const ServerEditionCapability: msRest.CompositeMapper = { + serializedName: "ServerEditionCapability", type: { name: "Composite", - polymorphicDiscriminator: ServerPropertiesForCreate.type.polymorphicDiscriminator, - uberParent: "ServerPropertiesForCreate", - className: "ServerPropertiesForDefaultCreate", + className: "ServerEditionCapability", modelProperties: { - ...ServerPropertiesForCreate.type.modelProperties, - administratorLogin: { - required: true, - serializedName: "administratorLogin", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - administratorLoginPassword: { - required: true, - serializedName: "administratorLoginPassword", + supportedStorageEditions: { + readOnly: true, + serializedName: "supportedStorageEditions", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageEditionCapability" + } + } + } + }, + supportedServerVersions: { + readOnly: true, + serializedName: "supportedServerVersions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerVersionCapability" + } + } } } } } }; -export const ServerPropertiesForRestore: msRest.CompositeMapper = { - serializedName: "PointInTimeRestore", +export const CapabilityProperties: msRest.CompositeMapper = { + serializedName: "CapabilityProperties", type: { name: "Composite", - polymorphicDiscriminator: ServerPropertiesForCreate.type.polymorphicDiscriminator, - uberParent: "ServerPropertiesForCreate", - className: "ServerPropertiesForRestore", + className: "CapabilityProperties", modelProperties: { - ...ServerPropertiesForCreate.type.modelProperties, - sourceServerId: { - required: true, - serializedName: "sourceServerId", + zone: { + readOnly: true, + serializedName: "zone", type: { name: "String" } }, - restorePointInTime: { - required: true, - serializedName: "restorePointInTime", + supportedFlexibleServerEditions: { + readOnly: true, + serializedName: "supportedFlexibleServerEditions", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerEditionCapability" + } + } } } } } }; -export const ServerPropertiesForGeoRestore: msRest.CompositeMapper = { - serializedName: "GeoRestore", +export const Storage: msRest.CompositeMapper = { + serializedName: "Storage", type: { name: "Composite", - polymorphicDiscriminator: ServerPropertiesForCreate.type.polymorphicDiscriminator, - uberParent: "ServerPropertiesForCreate", - className: "ServerPropertiesForGeoRestore", + className: "Storage", modelProperties: { - ...ServerPropertiesForCreate.type.modelProperties, - sourceServerId: { - required: true, - serializedName: "sourceServerId", + storageSizeGB: { + serializedName: "storageSizeGB", type: { - name: "String" + name: "Number" } } } } }; -export const ServerPropertiesForReplica: msRest.CompositeMapper = { - serializedName: "Replica", +export const Backup: msRest.CompositeMapper = { + serializedName: "Backup", type: { name: "Composite", - polymorphicDiscriminator: ServerPropertiesForCreate.type.polymorphicDiscriminator, - uberParent: "ServerPropertiesForCreate", - className: "ServerPropertiesForReplica", + className: "Backup", modelProperties: { - ...ServerPropertiesForCreate.type.modelProperties, - sourceServerId: { - required: true, - serializedName: "sourceServerId", + backupRetentionDays: { + serializedName: "backupRetentionDays", + type: { + name: "Number" + } + }, + geoRedundantBackup: { + serializedName: "geoRedundantBackup", type: { name: "String" } + }, + earliestRestoreDate: { + readOnly: true, + serializedName: "earliestRestoreDate", + type: { + name: "DateTime" + } } } } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const Network: msRest.CompositeMapper = { + serializedName: "Network", type: { name: "Composite", - className: "Sku", + className: "Network", modelProperties: { - name: { - required: true, - serializedName: "name", + publicNetworkAccess: { + readOnly: true, + serializedName: "publicNetworkAccess", type: { name: "String" } }, - tier: { - serializedName: "tier", + delegatedSubnetResourceId: { + serializedName: "delegatedSubnetResourceId", type: { name: "String" } }, - capacity: { - serializedName: "capacity", - constraints: { - InclusiveMinimum: 0 - }, + privateDnsZoneArmResourceId: { + serializedName: "privateDnsZoneArmResourceId", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const HighAvailability: msRest.CompositeMapper = { + serializedName: "HighAvailability", + type: { + name: "Composite", + className: "HighAvailability", + modelProperties: { + mode: { + serializedName: "mode", + type: { + name: "String" } }, - size: { - serializedName: "size", + state: { + readOnly: true, + serializedName: "state", type: { name: "String" } }, - family: { - serializedName: "family", + standbyAvailabilityZone: { + readOnly: true, + serializedName: "standbyAvailabilityZone", type: { name: "String" } @@ -350,88 +381,89 @@ export const Sku: msRest.CompositeMapper = { } }; -export const ResourceIdentity: msRest.CompositeMapper = { - serializedName: "ResourceIdentity", +export const MaintenanceWindow: msRest.CompositeMapper = { + serializedName: "MaintenanceWindow", type: { name: "Composite", - className: "ResourceIdentity", + className: "MaintenanceWindow", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + customWindow: { + serializedName: "customWindow", type: { - name: "Uuid" + name: "String" } }, - type: { - serializedName: "type", + startHour: { + serializedName: "startHour", type: { - name: "String" + name: "Number" } }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + startMinute: { + serializedName: "startMinute", + type: { + name: "Number" + } + }, + dayOfWeek: { + serializedName: "dayOfWeek", type: { - name: "Uuid" + name: "Number" } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", type: { name: "Composite", - className: "Resource", + className: "Identity", modelProperties: { - id: { + principalId: { readOnly: true, - serializedName: "id", + serializedName: "principalId", type: { name: "String" } }, - name: { + tenantId: { readOnly: true, - serializedName: "name", + serializedName: "tenantId", type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", type: { - name: "String" + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] } } } } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", type: { name: "Composite", - className: "TrackedResource", + className: "Sku", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + name: { + required: true, + serializedName: "name", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - location: { + tier: { required: true, - serializedName: "location", + serializedName: "tier", type: { name: "String" } @@ -440,174 +472,233 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const Server: msRest.CompositeMapper = { - serializedName: "Server", +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", type: { name: "Composite", - className: "Server", + className: "SystemData", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + createdBy: { + serializedName: "createdBy", type: { - name: "Composite", - className: "ResourceIdentity" + name: "String" } }, - sku: { - serializedName: "sku", + createdByType: { + serializedName: "createdByType", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - administratorLogin: { - serializedName: "properties.administratorLogin", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - version: { - serializedName: "properties.version", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - sslEnforcement: { - serializedName: "properties.sslEnforcement", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] + name: "String" } }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" + name: "DateTime" } - }, - byokEnforcement: { + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { readOnly: true, - serializedName: "properties.byokEnforcement", + serializedName: "id", type: { name: "String" } }, - infrastructureEncryption: { - serializedName: "properties.infrastructureEncryption", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - userVisibleState: { - serializedName: "properties.userVisibleState", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } }, - fullyQualifiedDomainName: { - serializedName: "properties.fullyQualifiedDomainName", + location: { + required: true, + serializedName: "location", type: { name: "String" } - }, - earliestRestoreDate: { - serializedName: "properties.earliestRestoreDate", + } + } + } +}; + +export const Server: msRest.CompositeMapper = { + serializedName: "Server", + type: { + name: "Composite", + className: "Server", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", type: { - name: "DateTime" + name: "Composite", + className: "Identity" } }, - storageProfile: { - serializedName: "properties.storageProfile", + sku: { + serializedName: "sku", type: { name: "Composite", - className: "StorageProfile" + className: "Sku" } }, - replicationRole: { - serializedName: "properties.replicationRole", + administratorLogin: { + serializedName: "properties.administratorLogin", type: { name: "String" } }, - masterServerId: { - serializedName: "properties.masterServerId", + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", type: { name: "String" } }, - replicaCapacity: { - serializedName: "properties.replicaCapacity", - constraints: { - InclusiveMinimum: 0 - }, + version: { + serializedName: "properties.version", type: { - name: "Number" + name: "String" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + minorVersion: { + readOnly: true, + serializedName: "properties.minorVersion", + type: { + name: "String" + } + }, + state: { + readOnly: true, + serializedName: "properties.state", type: { name: "String" } }, - privateEndpointConnections: { + fullyQualifiedDomainName: { readOnly: true, - serializedName: "properties.privateEndpointConnections", + serializedName: "properties.fullyQualifiedDomainName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerPrivateEndpointConnection" - } - } + name: "String" } - } - } - } -}; - -export const ServerForCreate: msRest.CompositeMapper = { - serializedName: "ServerForCreate", - type: { - name: "Composite", - className: "ServerForCreate", - modelProperties: { - identity: { - serializedName: "identity", + }, + storage: { + serializedName: "properties.storage", type: { name: "Composite", - className: "ResourceIdentity" + className: "Storage" } }, - sku: { - serializedName: "sku", + backup: { + serializedName: "properties.backup", type: { name: "Composite", - className: "Sku" + className: "Backup" } }, - properties: { - required: true, - serializedName: "properties", + network: { + serializedName: "properties.network", type: { name: "Composite", - className: "ServerPropertiesForCreate" + className: "Network" } }, - location: { - required: true, - serializedName: "location", + highAvailability: { + serializedName: "properties.highAvailability", + type: { + name: "Composite", + className: "HighAvailability" + } + }, + maintenanceWindow: { + serializedName: "properties.maintenanceWindow", + type: { + name: "Composite", + className: "MaintenanceWindow" + } + }, + sourceServerResourceId: { + serializedName: "properties.sourceServerResourceId", type: { name: "String" } }, - tags: { - serializedName: "tags", + pointInTimeUTC: { + serializedName: "properties.pointInTimeUTC", + type: { + name: "DateTime" + } + }, + availabilityZone: { + serializedName: "properties.availabilityZone", + type: { + name: "String" + } + }, + createMode: { + serializedName: "properties.createMode", + type: { + name: "String" + } + }, + serverTags: { + serializedName: "properties.tags", type: { name: "Dictionary", value: { @@ -616,22 +707,29 @@ export const ServerForCreate: msRest.CompositeMapper = { } } } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const ServerUpdateParameters: msRest.CompositeMapper = { - serializedName: "ServerUpdateParameters", +export const ServerForUpdate: msRest.CompositeMapper = { + serializedName: "ServerForUpdate", type: { name: "Composite", - className: "ServerUpdateParameters", + className: "ServerForUpdate", modelProperties: { - identity: { - serializedName: "identity", + location: { + serializedName: "location", type: { - name: "Composite", - className: "ResourceIdentity" + name: "String" } }, sku: { @@ -641,49 +739,42 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { className: "Sku" } }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, administratorLoginPassword: { serializedName: "properties.administratorLoginPassword", type: { name: "String" } }, - version: { - serializedName: "properties.version", + storage: { + serializedName: "properties.storage", type: { - name: "String" + name: "Composite", + className: "Storage" } }, - sslEnforcement: { - serializedName: "properties.sslEnforcement", + backup: { + serializedName: "properties.backup", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] + name: "Composite", + className: "Backup" } }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + highAvailability: { + serializedName: "properties.highAvailability", type: { - name: "String" + name: "Composite", + className: "HighAvailability" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + maintenanceWindow: { + serializedName: "properties.maintenanceWindow", type: { - name: "String" + name: "Composite", + className: "MaintenanceWindow" } }, - replicationRole: { - serializedName: "properties.replicationRole", + createMode: { + serializedName: "properties.createMode", type: { name: "String" } @@ -740,59 +831,13 @@ export const FirewallRule: msRest.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const VirtualNetworkRule: msRest.CompositeMapper = { - serializedName: "VirtualNetworkRule", - type: { - name: "Composite", - className: "VirtualNetworkRule", - modelProperties: { - ...ProxyResource.type.modelProperties, - virtualNetworkSubnetId: { - required: true, - serializedName: "properties.virtualNetworkSubnetId", - type: { - name: "String" - } - }, - ignoreMissingVnetServiceEndpoint: { - serializedName: "properties.ignoreMissingVnetServiceEndpoint", - type: { - name: "Boolean" - } }, - state: { + systemData: { readOnly: true, - serializedName: "properties.state", - type: { - name: "String" - } - } - } - } -}; - -export const Database: msRest.CompositeMapper = { - serializedName: "Database", - type: { - name: "Composite", - className: "Database", - modelProperties: { - ...ProxyResource.type.modelProperties, - charset: { - serializedName: "properties.charset", - type: { - name: "String" - } - }, - collation: { - serializedName: "properties.collation", + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } @@ -845,6 +890,14 @@ export const Configuration: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -909,6 +962,12 @@ export const Operation: msRest.CompositeMapper = { className: "OperationDisplay" } }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, origin: { readOnly: true, serializedName: "origin", @@ -949,184 +1008,59 @@ export const OperationListResult: msRest.CompositeMapper = { } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const LogFile: msRest.CompositeMapper = { - serializedName: "LogFile", +export const NameAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "NameAvailabilityRequest", type: { name: "Composite", - className: "LogFile", + className: "NameAvailabilityRequest", modelProperties: { - ...ProxyResource.type.modelProperties, - sizeInKB: { - serializedName: "properties.sizeInKB", + name: { + required: true, + serializedName: "name", type: { - name: "Number" + name: "String" } }, - createdTime: { - readOnly: true, - serializedName: "properties.createdTime", + type: { + serializedName: "type", type: { - name: "DateTime" - } - }, - lastModifiedTime: { - readOnly: true, - serializedName: "properties.lastModifiedTime", - type: { - name: "DateTime" - } - }, - logFileType: { - serializedName: "properties.type", - type: { - name: "String" - } - }, - url: { - serializedName: "properties.url", - type: { - name: "String" + name: "String" } } } } }; -export const PerformanceTierServiceLevelObjectives: msRest.CompositeMapper = { - serializedName: "PerformanceTierServiceLevelObjectives", - type: { - name: "Composite", - className: "PerformanceTierServiceLevelObjectives", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - edition: { - serializedName: "edition", - type: { - name: "String" - } - }, - vCore: { - serializedName: "vCore", - type: { - name: "Number" - } - }, - hardwareGeneration: { - serializedName: "hardwareGeneration", - type: { - name: "String" - } - }, - maxBackupRetentionDays: { - serializedName: "maxBackupRetentionDays", - type: { - name: "Number" - } - }, - minBackupRetentionDays: { - serializedName: "minBackupRetentionDays", - type: { - name: "Number" - } - }, - maxStorageMB: { - serializedName: "maxStorageMB", - type: { - name: "Number" - } - }, - minStorageMB: { - serializedName: "minStorageMB", - type: { - name: "Number" - } - } - } - } -}; - -export const PerformanceTierProperties: msRest.CompositeMapper = { - serializedName: "PerformanceTierProperties", +export const NameAvailability: msRest.CompositeMapper = { + serializedName: "NameAvailability", type: { name: "Composite", - className: "PerformanceTierProperties", + className: "NameAvailability", modelProperties: { - id: { - serializedName: "id", + message: { + serializedName: "message", type: { name: "String" } }, - maxBackupRetentionDays: { - serializedName: "maxBackupRetentionDays", - type: { - name: "Number" - } - }, - minBackupRetentionDays: { - serializedName: "minBackupRetentionDays", - type: { - name: "Number" - } - }, - maxStorageMB: { - serializedName: "maxStorageMB", - type: { - name: "Number" - } - }, - minLargeStorageMB: { - serializedName: "minLargeStorageMB", - type: { - name: "Number" - } - }, - maxLargeStorageMB: { - serializedName: "maxLargeStorageMB", - type: { - name: "Number" - } - }, - minStorageMB: { - serializedName: "minStorageMB", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "Number" + name: "Boolean" } }, - serviceLevelObjectives: { - serializedName: "serviceLevelObjectives", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerformanceTierServiceLevelObjectives" - } - } - } - } - } - } -}; - -export const NameAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "NameAvailabilityRequest", - type: { - name: "Composite", - className: "NameAvailabilityRequest", - modelProperties: { name: { - required: true, serializedName: "name", type: { name: "String" @@ -1142,26 +1076,20 @@ export const NameAvailabilityRequest: msRest.CompositeMapper = { } }; -export const NameAvailability: msRest.CompositeMapper = { - serializedName: "NameAvailability", +export const RestartParameter: msRest.CompositeMapper = { + serializedName: "RestartParameter", type: { name: "Composite", - className: "NameAvailability", + className: "RestartParameter", modelProperties: { - message: { - serializedName: "message", - type: { - name: "String" - } - }, - nameAvailable: { - serializedName: "nameAvailable", + restartWithFailover: { + serializedName: "restartWithFailover", type: { name: "Boolean" } }, - reason: { - serializedName: "reason", + failoverMode: { + serializedName: "failoverMode", type: { name: "String" } @@ -1251,92 +1179,81 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; -export const ServerAdministratorResource: msRest.CompositeMapper = { - serializedName: "ServerAdministratorResource", +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", type: { name: "Composite", - className: "ServerAdministratorResource", + className: "AzureEntityResource", modelProperties: { - ...ProxyResource.type.modelProperties, - administratorType: { - required: true, - isConstant: true, - serializedName: "properties.administratorType", - defaultValue: 'ActiveDirectory', - type: { - name: "String" - } - }, - login: { - required: true, - serializedName: "properties.login", + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } - }, - sid: { - required: true, - serializedName: "properties.sid", - type: { - name: "Uuid" - } - }, - tenantId: { - required: true, - serializedName: "properties.tenantId", - type: { - name: "Uuid" - } } } } }; -export const RecoverableServerResource: msRest.CompositeMapper = { - serializedName: "RecoverableServerResource", +export const ResourceModelWithAllowedPropertySetIdentity: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_identity", type: { name: "Composite", - className: "RecoverableServerResource", + className: "ResourceModelWithAllowedPropertySetIdentity", modelProperties: { - ...ProxyResource.type.modelProperties, - lastAvailableBackupDateTime: { - readOnly: true, - serializedName: "properties.lastAvailableBackupDateTime", + ...Identity.type.modelProperties + } + } +}; + +export const ResourceModelWithAllowedPropertySetSku: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_sku", + type: { + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku", + modelProperties: { + ...Sku.type.modelProperties + } + } +}; + +export const Plan: msRest.CompositeMapper = { + serializedName: "Plan", + type: { + name: "Composite", + className: "Plan", + modelProperties: { + name: { + required: true, + serializedName: "name", type: { name: "String" } }, - serviceLevelObjective: { - readOnly: true, - serializedName: "properties.serviceLevelObjective", + publisher: { + required: true, + serializedName: "publisher", type: { name: "String" } }, - edition: { - readOnly: true, - serializedName: "properties.edition", + product: { + required: true, + serializedName: "product", type: { name: "String" } }, - vCore: { - readOnly: true, - serializedName: "properties.vCore", - type: { - name: "Number" - } - }, - hardwareGeneration: { - readOnly: true, - serializedName: "properties.hardwareGeneration", + promotionCode: { + serializedName: "promotionCode", type: { name: "String" } }, version: { - readOnly: true, - serializedName: "properties.version", + serializedName: "version", type: { name: "String" } @@ -1345,161 +1262,72 @@ export const RecoverableServerResource: msRest.CompositeMapper = { } }; -export const AzureEntityResource: msRest.CompositeMapper = { - serializedName: "AzureEntityResource", +export const ResourceModelWithAllowedPropertySetPlan: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet_plan", type: { name: "Composite", - className: "AzureEntityResource", + className: "ResourceModelWithAllowedPropertySetPlan", modelProperties: { - ...Resource.type.modelProperties, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - } + ...Plan.type.modelProperties } } }; -export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { - serializedName: "ServerSecurityAlertPolicy", +export const ResourceModelWithAllowedPropertySet: msRest.CompositeMapper = { + serializedName: "ResourceModelWithAllowedPropertySet", type: { name: "Composite", - className: "ServerSecurityAlertPolicy", + className: "ResourceModelWithAllowedPropertySet", modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - required: true, - serializedName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] - } - }, - disabledAlerts: { - serializedName: "properties.disabledAlerts", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - emailAddresses: { - serializedName: "properties.emailAddresses", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - emailAccountAdmins: { - serializedName: "properties.emailAccountAdmins", - type: { - name: "Boolean" - } - }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - retentionDays: { - serializedName: "properties.retentionDays", - type: { - name: "Number" - } - } - } - } -}; - -export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionStateProperty", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", - modelProperties: { - status: { - required: true, - serializedName: "status", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } }, - description: { - required: true, - serializedName: "description", + location: { + serializedName: "location", type: { name: "String" } }, - actionsRequired: { - readOnly: true, - serializedName: "actionsRequired", + managedBy: { + serializedName: "managedBy", 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", + kind: { + serializedName: "kind", + constraints: { + Pattern: /^[-\w\._,\(\)]+$/ + }, type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + name: "String" } }, - provisioningState: { + etag: { readOnly: true, - serializedName: "properties.provisioningState", + serializedName: "etag", type: { name: "String" } - } - } - } -}; - -export const TagsObject: msRest.CompositeMapper = { - serializedName: "TagsObject", - type: { - name: "Composite", - className: "TagsObject", - modelProperties: { + }, tags: { serializedName: "tags", type: { @@ -1510,93 +1338,57 @@ export const TagsObject: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const PrivateLinkResourceProperties: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourceProperties", - type: { - name: "Composite", - className: "PrivateLinkResourceProperties", - modelProperties: { - groupId: { - readOnly: true, - serializedName: "groupId", + }, + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ResourceModelWithAllowedPropertySetIdentity" } }, - requiredMembers: { - readOnly: true, - serializedName: "requiredMembers", + sku: { + serializedName: "sku", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "ResourceModelWithAllowedPropertySetSku" } - } - } - } -}; - -export const PrivateLinkResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - readOnly: true, - serializedName: "properties", + }, + plan: { + serializedName: "plan", type: { name: "Composite", - className: "PrivateLinkResourceProperties" + className: "ResourceModelWithAllowedPropertySetPlan" } } } } }; -export const ServerKey: msRest.CompositeMapper = { - serializedName: "ServerKey", +export const Database: msRest.CompositeMapper = { + serializedName: "Database", type: { name: "Composite", - className: "ServerKey", + className: "Database", modelProperties: { ...ProxyResource.type.modelProperties, - kind: { - readOnly: true, - serializedName: "kind", - type: { - name: "String" - } - }, - serverKeyType: { - required: true, - isConstant: true, - serializedName: "properties.serverKeyType", - defaultValue: 'AzureKeyVault', + charset: { + serializedName: "properties.charset", type: { name: "String" } }, - uri: { - serializedName: "properties.uri", + collation: { + serializedName: "properties.collation", type: { name: "String" } }, - creationDate: { + systemData: { readOnly: true, - serializedName: "properties.creationDate", + serializedName: "systemData", type: { - name: "DateTime" + name: "Composite", + className: "SystemData" } } } @@ -1620,6 +1412,12 @@ export const ServerListResult: msRest.CompositeMapper = { } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } @@ -1642,32 +1440,8 @@ export const FirewallRuleListResult: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const VirtualNetworkRuleListResult: msRest.CompositeMapper = { - serializedName: "VirtualNetworkRuleListResult", - type: { - name: "Composite", - className: "VirtualNetworkRuleListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkRule" - } - } - } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -1677,28 +1451,6 @@ export const VirtualNetworkRuleListResult: msRest.CompositeMapper = { } }; -export const DatabaseListResult: msRest.CompositeMapper = { - serializedName: "DatabaseListResult", - type: { - name: "Composite", - className: "DatabaseListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Database" - } - } - } - } - } - } -}; - export const ConfigurationListResult: msRest.CompositeMapper = { serializedName: "ConfigurationListResult", type: { @@ -1716,128 +1468,8 @@ export const ConfigurationListResult: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const LogFileListResult: msRest.CompositeMapper = { - serializedName: "LogFileListResult", - type: { - name: "Composite", - className: "LogFileListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogFile" - } - } - } - } - } - } -}; - -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: { - name: "Composite", - className: "PerformanceTierListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerformanceTierProperties" - } - } - } - } - } - } -}; - -export const ServerSecurityAlertPolicyListResult: msRest.CompositeMapper = { - serializedName: "ServerSecurityAlertPolicyListResult", - type: { - name: "Composite", - className: "ServerSecurityAlertPolicyListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerSecurityAlertPolicy" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -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" @@ -1847,11 +1479,11 @@ export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { } }; -export const PrivateLinkResourceListResult: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", +export const CapabilitiesListResult: msRest.CompositeMapper = { + serializedName: "CapabilitiesListResult", type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "CapabilitiesListResult", modelProperties: { value: { readOnly: true, @@ -1861,7 +1493,7 @@ export const PrivateLinkResourceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "CapabilityProperties" } } } @@ -1877,27 +1509,25 @@ export const PrivateLinkResourceListResult: msRest.CompositeMapper = { } }; -export const ServerKeyListResult: msRest.CompositeMapper = { - serializedName: "ServerKeyListResult", +export const DatabaseListResult: msRest.CompositeMapper = { + serializedName: "DatabaseListResult", type: { name: "Composite", - className: "ServerKeyListResult", + className: "DatabaseListResult", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServerKey" + className: "Database" } } } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -1906,12 +1536,3 @@ export const ServerKeyListResult: msRest.CompositeMapper = { } } }; - -export const discriminators = { - 'ServerPropertiesForCreate' : ServerPropertiesForCreate, - 'ServerPropertiesForCreate.Default' : ServerPropertiesForDefaultCreate, - 'ServerPropertiesForCreate.PointInTimeRestore' : ServerPropertiesForRestore, - 'ServerPropertiesForCreate.GeoRestore' : ServerPropertiesForGeoRestore, - 'ServerPropertiesForCreate.Replica' : ServerPropertiesForReplica - -}; diff --git a/sdk/postgresql/arm-postgresql/src/models/operationsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/operationsMappers.ts index 324f42f8d515..cdbd10423173 100644 --- a/sdk/postgresql/arm-postgresql/src/models/operationsMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/operationsMappers.ts @@ -7,7 +7,6 @@ */ export { - discriminators, CloudError, ErrorAdditionalInfo, ErrorResponse, diff --git a/sdk/postgresql/arm-postgresql/src/models/parameters.ts b/sdk/postgresql/arm-postgresql/src/models/parameters.ts index 6a07dcd20cdc..d853ba5ad1e6 100644 --- a/sdk/postgresql/arm-postgresql/src/models/parameters.ts +++ b/sdk/postgresql/arm-postgresql/src/models/parameters.ts @@ -19,43 +19,11 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion0: msRest.OperationQueryParameter = { +export const apiVersion: 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" - } - } -}; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2020-01-01', constraints: { MinLength: 1 }, @@ -94,26 +62,6 @@ export const firewallRuleName: msRest.OperationURLParameter = { } } }; -export const groupName: msRest.OperationURLParameter = { - parameterPath: "groupName", - mapper: { - required: true, - serializedName: "groupName", - type: { - name: "String" - } - } -}; -export const keyName: msRest.OperationURLParameter = { - parameterPath: "keyName", - mapper: { - required: true, - serializedName: "keyName", - type: { - name: "String" - } - } -}; export const locationName: msRest.OperationURLParameter = { parameterPath: "locationName", mapper: { @@ -135,16 +83,6 @@ 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: { @@ -160,18 +98,6 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; -export const securityAlertPolicyName: msRest.OperationURLParameter = { - parameterPath: "securityAlertPolicyName", - mapper: { - required: true, - isConstant: true, - serializedName: "securityAlertPolicyName", - defaultValue: 'Default', - type: { - name: "String" - } - } -}; export const serverName: msRest.OperationURLParameter = { parameterPath: "serverName", mapper: { @@ -195,13 +121,3 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const virtualNetworkRuleName: msRest.OperationURLParameter = { - parameterPath: "virtualNetworkRuleName", - mapper: { - required: true, - serializedName: "virtualNetworkRuleName", - type: { - name: "String" - } - } -}; diff --git a/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts deleted file mode 100644 index 5b375865e84a..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/privateEndpointConnectionsMappers.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - 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 deleted file mode 100644 index 31f4d23ea056..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/privateLinkResourcesMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/recoverableServersMappers.ts b/sdk/postgresql/arm-postgresql/src/models/recoverableServersMappers.ts deleted file mode 100644 index 950533d706b3..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/recoverableServersMappers.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - 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 deleted file mode 100644 index 396224eab6a2..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/replicasMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerListResult, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts deleted file mode 100644 index 26a88d4c302f..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/serverAdministratorsMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerAdministratorResourceListResult, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts deleted file mode 100644 index e9934ae56055..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/serverKeysMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerKeyListResult, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serverParametersMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serverParametersMappers.ts deleted file mode 100644 index 9d129eb3cb85..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/serverParametersMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - ConfigurationListResult, - Database, - ErrorAdditionalInfo, - ErrorResponse, - FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, - ProxyResource, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - 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 deleted file mode 100644 index b1d46e9dc375..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/serverSecurityAlertPoliciesMappers.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, - ProxyResource, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - ServerSecurityAlertPolicyListResult, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts index 11e2c7bb8c80..121df0cf53d1 100644 --- a/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/serversMappers.ts @@ -7,8 +7,8 @@ */ export { - discriminators, AzureEntityResource, + Backup, BaseResource, CloudError, Configuration, @@ -16,33 +16,23 @@ export { ErrorAdditionalInfo, ErrorResponse, FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, + HighAvailability, + Identity, + MaintenanceWindow, + Network, + Plan, ProxyResource, - RecoverableServerResource, Resource, - ResourceIdentity, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + RestartParameter, Server, - ServerAdministratorResource, - ServerForCreate, - ServerKey, + ServerForUpdate, ServerListResult, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerPropertiesForCreate, - ServerPropertiesForDefaultCreate, - ServerPropertiesForGeoRestore, - ServerPropertiesForReplica, - ServerPropertiesForRestore, - ServerSecurityAlertPolicy, - ServerUpdateParameters, Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule + Storage, + SystemData, + TrackedResource } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts deleted file mode 100644 index 0c1ae952541b..000000000000 --- a/sdk/postgresql/arm-postgresql/src/models/virtualNetworkRulesMappers.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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, - FirewallRule, - LogFile, - PrivateEndpointConnection, - PrivateEndpointProperty, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionStateProperty, - ProxyResource, - RecoverableServerResource, - Resource, - ResourceIdentity, - Server, - ServerAdministratorResource, - ServerKey, - ServerPrivateEndpointConnection, - ServerPrivateEndpointConnectionProperties, - ServerPrivateLinkServiceConnectionStateProperty, - ServerSecurityAlertPolicy, - Sku, - StorageProfile, - TrackedResource, - VirtualNetworkRule, - VirtualNetworkRuleListResult -} from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/models/locationBasedPerformanceTierMappers.ts b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkSubnetUsageMappers.ts similarity index 73% rename from sdk/postgresql/arm-postgresql/src/models/locationBasedPerformanceTierMappers.ts rename to sdk/postgresql/arm-postgresql/src/models/virtualNetworkSubnetUsageMappers.ts index b25abbd987af..f575f25ddb83 100644 --- a/sdk/postgresql/arm-postgresql/src/models/locationBasedPerformanceTierMappers.ts +++ b/sdk/postgresql/arm-postgresql/src/models/virtualNetworkSubnetUsageMappers.ts @@ -7,11 +7,10 @@ */ export { - discriminators, CloudError, + DelegatedSubnetUsage, ErrorAdditionalInfo, ErrorResponse, - PerformanceTierListResult, - PerformanceTierProperties, - PerformanceTierServiceLevelObjectives + VirtualNetworkSubnetUsageParameter, + VirtualNetworkSubnetUsageResult } from "../models/mappers"; diff --git a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts index 23d60ee561c9..b91464de1da5 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/checkNameAvailability.ts @@ -61,12 +61,12 @@ export class CheckNameAvailability { const serializer = new msRest.Serializer(Mappers); const executeOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/checkNameAvailability", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/checkNameAvailability", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts index 411db3ba0b14..940a634334bb 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/configurations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/configurations.ts @@ -27,17 +27,35 @@ export class Configurations { } /** - * Updates a configuration of a server. + * List all the configurations in a given server. * @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. * @param [options] The optional parameters - * @returns Promise + * @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 */ - createOrUpdate(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,serverName,configurationName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + 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; } /** @@ -77,35 +95,17 @@ export class Configurations { } /** - * List all the configurations in a given server. + * Updates a configuration of a server. * @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. * @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 + * @returns Promise */ - 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; + update(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serverName,configurationName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -117,7 +117,7 @@ export class Configurations { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(resourceGroupName: string, serverName: string, configurationName: string, parameters: Models.Configuration, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -126,31 +126,58 @@ export class Configurations { parameters, options }, - beginCreateOrUpdateOperationSpec, + beginUpdateOperationSpec, options); } + + /** + * List all the configurations in a given 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 = { +const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName, - Parameters.configurationName + Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.Configuration + bodyMapper: Mappers.ConfigurationListResult }, default: { bodyMapper: Mappers.CloudError @@ -159,23 +186,24 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listByServerOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ConfigurationListResult + bodyMapper: Mappers.Configuration }, default: { bodyMapper: Mappers.CloudError @@ -184,9 +212,9 @@ const listByServerOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/configurations/{configurationName}", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/configurations/{configurationName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -194,7 +222,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -217,3 +245,27 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConfigurationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/databases.ts b/sdk/postgresql/arm-postgresql/src/operations/databases.ts index 3311dbc0d0c1..92c5fdc95bd9 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/databases.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/databases.ts @@ -33,11 +33,11 @@ export class Databases { * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,serverName,databaseName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + create(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,serverName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -130,7 +130,7 @@ export class Databases { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { + beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: Models.Database, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -139,7 +139,7 @@ export class Databases { parameters, options }, - beginCreateOrUpdateOperationSpec, + beginCreateOperationSpec, options); } @@ -162,13 +162,41 @@ export class Databases { beginDeleteMethodOperationSpec, options); } + + /** + * List all the databases in a given 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}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -176,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -194,14 +222,14 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -217,9 +245,9 @@ const listByServerOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { +const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -227,7 +255,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -256,7 +284,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/databases/{databaseName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -264,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -279,3 +307,27 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DatabaseListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts index a9385ad42207..82417e785e5b 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/firewallRules.ts @@ -41,7 +41,7 @@ export class FirewallRules { } /** - * Deletes a server firewall rule. + * Deletes a PostgreSQL server firewall rule. * @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. @@ -54,7 +54,7 @@ export class FirewallRules { } /** - * Gets information about a server firewall rule. + * List all the firewall rules in a given server. * @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. @@ -90,7 +90,7 @@ export class FirewallRules { } /** - * List all the firewall rules in a given server. + * List all the firewall rules in a given 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 @@ -144,7 +144,7 @@ export class FirewallRules { } /** - * Deletes a server firewall rule. + * Deletes a PostgreSQL server firewall rule. * @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. @@ -162,13 +162,41 @@ export class FirewallRules { beginDeleteMethodOperationSpec, options); } + + /** + * List all the firewall rules in a given 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 getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -176,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -194,14 +222,14 @@ const getOperationSpec: msRest.OperationSpec = { const listByServerOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -219,7 +247,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -227,7 +255,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -256,7 +284,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/firewallRules/{firewallRuleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -264,7 +292,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -279,3 +307,27 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.FirewallRuleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/getPrivateDnsZoneSuffix.ts b/sdk/postgresql/arm-postgresql/src/operations/getPrivateDnsZoneSuffix.ts new file mode 100644 index 000000000000..cf523a0e02fd --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/getPrivateDnsZoneSuffix.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/getPrivateDnsZoneSuffixMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a GetPrivateDnsZoneSuffix. */ +export class GetPrivateDnsZoneSuffix { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a GetPrivateDnsZoneSuffix. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Get private DNS zone suffix in the cloud + * @param [options] The optional parameters + * @returns Promise + */ + execute(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + execute(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + execute(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + execute(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + executeOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const executeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.DBForPostgreSql/getPrivateDnsZoneSuffix", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "String" + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/index.ts b/sdk/postgresql/arm-postgresql/src/operations/index.ts index 9863e0697acd..7f293c100d11 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/index.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/index.ts @@ -8,20 +8,11 @@ */ export * from "./servers"; -export * from "./replicas"; export * from "./firewallRules"; -export * from "./virtualNetworkRules"; -export * from "./databases"; export * from "./configurations"; -export * from "./serverParameters"; -export * from "./logFiles"; -export * from "./serverAdministrators"; -export * from "./recoverableServers"; -export * from "./serverBasedPerformanceTier"; -export * from "./locationBasedPerformanceTier"; export * from "./checkNameAvailability"; +export * from "./locationBasedCapabilities"; +export * from "./virtualNetworkSubnetUsage"; export * from "./operations"; -export * from "./serverSecurityAlertPolicies"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./serverKeys"; +export * from "./databases"; +export * from "./getPrivateDnsZoneSuffix"; diff --git a/sdk/postgresql/arm-postgresql/src/operations/locationBasedCapabilities.ts b/sdk/postgresql/arm-postgresql/src/operations/locationBasedCapabilities.ts new file mode 100644 index 000000000000..0bafacc33c84 --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/locationBasedCapabilities.ts @@ -0,0 +1,133 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/locationBasedCapabilitiesMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a LocationBasedCapabilities. */ +export class LocationBasedCapabilities { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a LocationBasedCapabilities. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Get capabilities at specified location in a given subscription. + * @param locationName The name of the location. + * @param [options] The optional parameters + * @returns Promise + */ + execute(locationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param callback The callback + */ + execute(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param options The optional parameters + * @param callback The callback + */ + execute(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + execute(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + executeOperationSpec, + callback) as Promise; + } + + /** + * Get capabilities at specified location in a given subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + executeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + executeNext(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 + */ + executeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + executeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + executeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const executeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/capabilities", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CapabilitiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const executeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CapabilitiesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts b/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts deleted file mode 100644 index 93f28deedf25..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/locationBasedPerformanceTier.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/locationBasedPerformanceTierMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a LocationBasedPerformanceTier. */ -export class LocationBasedPerformanceTier { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a LocationBasedPerformanceTier. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * List all the performance tiers at specified location in a given subscription. - * @param locationName The name of the location. - * @param [options] The optional parameters - * @returns Promise - */ - list(locationName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param locationName The name of the location. - * @param callback The callback - */ - list(locationName: string, callback: msRest.ServiceCallback): void; - /** - * @param locationName The name of the location. - * @param options The optional parameters - * @param callback The callback - */ - list(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - locationName, - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/locations/{locationName}/performanceTiers", - urlParameters: [ - Parameters.subscriptionId, - Parameters.locationName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PerformanceTierListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts b/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts deleted file mode 100644 index b4e3f166ca73..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/logFiles.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/logFilesMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a LogFiles. */ -export class LogFiles { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a LogFiles. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * List all the log files in a given 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; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByServerOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/logFiles", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogFileListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/operations.ts b/sdk/postgresql/arm-postgresql/src/operations/operations.ts index 153e9feadba2..155dbe32fe3d 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/operations.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/operations.ts @@ -54,9 +54,9 @@ export class Operations { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.DBForPostgreSQL/operations", + path: "providers/Microsoft.DBForPostgreSql/operations", queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts b/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts deleted file mode 100644 index 5523107af523..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/privateEndpointConnections.ts +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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 - ], - queryParameters: [ - Parameters.apiVersion1 - ], - 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 deleted file mode 100644 index e4c235b7e8f8..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/privateLinkResources.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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 - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts b/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts deleted file mode 100644 index 2ec7f1537604..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/recoverableServers.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/recoverableServersMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a RecoverableServers. */ -export class RecoverableServers { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a RecoverableServers. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * Gets a recoverable 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 - */ - 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; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/recoverableServers", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.RecoverableServerResource - }, - 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 deleted file mode 100644 index fa52aae1861d..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/replicas.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/replicasMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a Replicas. */ -export class Replicas { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a Replicas. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * List all the replicas for a given 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; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByServerOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/replicas", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts b/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts deleted file mode 100644 index 5ae9b70082b5..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/serverAdministrators.ts +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/serverBasedPerformanceTier.ts b/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts deleted file mode 100644 index 2697145861c5..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/serverBasedPerformanceTier.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/serverBasedPerformanceTierMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a ServerBasedPerformanceTier. */ -export class ServerBasedPerformanceTier { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a ServerBasedPerformanceTier. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * List all the performance tiers for a 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 - */ - 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; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/performanceTiers", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PerformanceTierListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverKeys.ts b/sdk/postgresql/arm-postgresql/src/operations/serverKeys.ts deleted file mode 100644 index f23ae98ad025..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/serverKeys.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/serverKeysMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a ServerKeys. */ -export class ServerKeys { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a ServerKeys. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * Gets a list of Server keys. - * @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; - } - - /** - * Gets a PostgreSQL Server key. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param keyName The name of the PostgreSQL Server key to be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, serverName: string, keyName: 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 keyName The name of the PostgreSQL Server key to be retrieved. - * @param callback The callback - */ - get(resourceGroupName: string, serverName: string, keyName: 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 keyName The name of the PostgreSQL Server key to be retrieved. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, serverName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - keyName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates a PostgreSQL Server key. - * @param serverName The name of the server. - * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created). - * @param parameters The requested PostgreSQL Server key resource state. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(serverName,keyName,parameters,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes the PostgreSQL Server key with the given name. - * @param serverName The name of the server. - * @param keyName The name of the PostgreSQL Server key to be deleted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(serverName,keyName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates or updates a PostgreSQL Server key. - * @param serverName The name of the server. - * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created). - * @param parameters The requested PostgreSQL Server key resource state. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - serverName, - keyName, - parameters, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Deletes the PostgreSQL Server key with the given name. - * @param serverName The name of the server. - * @param keyName The name of the PostgreSQL Server key to be deleted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - serverName, - keyName, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Gets a list of Server keys. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerKeyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.keyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerKey - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}", - urlParameters: [ - Parameters.serverName, - Parameters.keyName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ServerKey, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ServerKey - }, - 202: { - bodyMapper: Mappers.ServerKey - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}", - urlParameters: [ - Parameters.serverName, - Parameters.keyName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerKeyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts b/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts deleted file mode 100644 index f9ec586d5cb4..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/serverParameters.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/serverParametersMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a ServerParameters. */ -export class ServerParameters { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a ServerParameters. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * Update a list of configurations in a given server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param value The parameters for updating a list of server configuration. - * @param [options] The optional parameters - * @returns Promise - */ - listUpdateConfigurations(resourceGroupName: string, serverName: string, value: Models.ConfigurationListResult, options?: msRest.RequestOptionsBase): Promise { - return this.beginListUpdateConfigurations(resourceGroupName,serverName,value,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Update a list of configurations in a given server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param value The parameters for updating a list of server configuration. - * @param [options] The optional parameters - * @returns Promise - */ - beginListUpdateConfigurations(resourceGroupName: string, serverName: string, value: Models.ConfigurationListResult, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - serverName, - value, - options - }, - beginListUpdateConfigurationsOperationSpec, - options); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const beginListUpdateConfigurationsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "value", - mapper: { - ...Mappers.ConfigurationListResult, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ConfigurationListResult - }, - 202: {}, - 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 deleted file mode 100644 index 49ff4a50aed6..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/serverSecurityAlertPolicies.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/serverSecurityAlertPoliciesMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a ServerSecurityAlertPolicies. */ -export class ServerSecurityAlertPolicies { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a ServerSecurityAlertPolicies. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * Get a server's security alert policy. - * @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 updates a threat detection policy. - * @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 - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,serverName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Get the server's threat detection policies. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param [options] The optional parameters - * @returns Promise - */ - listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param callback The callback - */ - listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param options The optional parameters - * @param callback The callback - */ - listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - options - }, - listByServerOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates a threat detection policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The server security alert policy. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerSecurityAlertPolicy, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - serverName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Get the server's threat detection policies. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByServerNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.securityAlertPolicyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerSecurityAlertPolicy - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByServerOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerSecurityAlertPolicyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.securityAlertPolicyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ServerSecurityAlertPolicy, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ServerSecurityAlertPolicy - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByServerNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServerSecurityAlertPolicyListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/servers.ts b/sdk/postgresql/arm-postgresql/src/operations/servers.ts index a03fe311cca5..03f8a8b190f3 100644 --- a/sdk/postgresql/arm-postgresql/src/operations/servers.ts +++ b/sdk/postgresql/arm-postgresql/src/operations/servers.ts @@ -27,14 +27,14 @@ export class Servers { } /** - * Creates a new server, or will overwrite an existing server. + * Creates a new server. * @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 * @returns Promise */ - create(resourceGroupName: string, serverName: string, parameters: Models.ServerForCreate, options?: msRest.RequestOptionsBase): Promise { + create(resourceGroupName: string, serverName: string, parameters: Models.Server, options?: msRest.RequestOptionsBase): Promise { return this.beginCreate(resourceGroupName,serverName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -48,7 +48,7 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, serverName: string, parameters: Models.ServerUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + update(resourceGroupName: string, serverName: string, parameters: Models.ServerForUpdate, options?: msRest.RequestOptionsBase): Promise { return this.beginUpdate(resourceGroupName,serverName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -156,20 +156,44 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - restart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + restart(resourceGroupName: string, serverName: string, options?: Models.ServersRestartOptionalParams): Promise { return this.beginRestart(resourceGroupName,serverName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } /** - * Creates a new server, or will overwrite an existing server. + * Starts 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 + */ + start(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Stops 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 + */ + stop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new server. * @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 * @returns Promise */ - beginCreate(resourceGroupName: string, serverName: string, parameters: Models.ServerForCreate, options?: msRest.RequestOptionsBase): Promise { + beginCreate(resourceGroupName: string, serverName: string, parameters: Models.Server, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -190,7 +214,7 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - beginUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(resourceGroupName: string, serverName: string, parameters: Models.ServerForUpdate, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -227,7 +251,7 @@ export class Servers { * @param [options] The optional parameters * @returns Promise */ - beginRestart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + beginRestart(resourceGroupName: string, serverName: string, options?: Models.ServersBeginRestartOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -237,20 +261,112 @@ export class Servers { beginRestartOperationSpec, options); } + + /** + * Starts 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 + */ + beginStart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Stops 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 + */ + beginStop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * List all the servers in a given resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * List all the servers in a given subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -268,13 +384,13 @@ const getOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -292,12 +408,12 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSQL/servers", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/flexibleServers", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -315,14 +431,14 @@ const listOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -330,7 +446,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.ServerForCreate, + ...Mappers.Server, required: true } }, @@ -351,14 +467,14 @@ const beginCreateOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -366,7 +482,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.ServerUpdateParameters, + ...Mappers.ServerForUpdate, required: true } }, @@ -384,14 +500,14 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -409,14 +525,69 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/restart", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/restart", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.RestartParameter + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -430,3 +601,51 @@ const beginRestartOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts deleted file mode 100644 index c9e901550b6a..000000000000 --- a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkRules.ts +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * 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/virtualNetworkRulesMappers"; -import * as Parameters from "../models/parameters"; -import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; - -/** Class representing a VirtualNetworkRules. */ -export class VirtualNetworkRules { - private readonly client: PostgreSQLManagementClientContext; - - /** - * Create a VirtualNetworkRules. - * @param {PostgreSQLManagementClientContext} client Reference to the service client. - */ - constructor(client: PostgreSQLManagementClientContext) { - this.client = client; - } - - /** - * Gets a virtual network rule. - * @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 - * @returns Promise - */ - get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: 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 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. 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 - * @param callback The callback - */ - get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - virtualNetworkRuleName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates an existing virtual network rule. - * @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. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,serverName,virtualNetworkRuleName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes the virtual network rule with the given name. - * @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 - * @returns Promise - */ - deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,serverName,virtualNetworkRuleName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Gets a list of virtual network rules in 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; - } - - /** - * Creates or updates an existing virtual network rule. - * @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. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - serverName, - virtualNetworkRuleName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Deletes the virtual network rule with the given name. - * @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 - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - serverName, - virtualNetworkRuleName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Gets a list of virtual network rules in 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}/virtualNetworkRules/{virtualNetworkRuleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.subscriptionId, - Parameters.virtualNetworkRuleName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkRule - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByServerOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkRuleListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.subscriptionId, - Parameters.virtualNetworkRuleName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualNetworkRule, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkRule - }, - 201: { - bodyMapper: Mappers.VirtualNetworkRule - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.virtualNetworkRuleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByServerNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkRuleListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkSubnetUsage.ts b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkSubnetUsage.ts new file mode 100644 index 000000000000..dbd7f7574e1f --- /dev/null +++ b/sdk/postgresql/arm-postgresql/src/operations/virtualNetworkSubnetUsage.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/virtualNetworkSubnetUsageMappers"; +import * as Parameters from "../models/parameters"; +import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext"; + +/** Class representing a VirtualNetworkSubnetUsage. */ +export class VirtualNetworkSubnetUsage { + private readonly client: PostgreSQLManagementClientContext; + + /** + * Create a VirtualNetworkSubnetUsage. + * @param {PostgreSQLManagementClientContext} client Reference to the service client. + */ + constructor(client: PostgreSQLManagementClientContext) { + this.client = client; + } + + /** + * Get virtual network subnet usage for a given vNet resource id. + * @param locationName The name of the location. + * @param parameters The required parameters for creating or updating a server. + * @param [options] The optional parameters + * @returns Promise + */ + execute(locationName: string, parameters: Models.VirtualNetworkSubnetUsageParameter, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param parameters The required parameters for creating or updating a server. + * @param callback The callback + */ + execute(locationName: string, parameters: Models.VirtualNetworkSubnetUsageParameter, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param parameters The required parameters for creating or updating a server. + * @param options The optional parameters + * @param callback The callback + */ + execute(locationName: string, parameters: Models.VirtualNetworkSubnetUsageParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + execute(locationName: string, parameters: Models.VirtualNetworkSubnetUsageParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + parameters, + options + }, + executeOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const executeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/locations/{locationName}/checkVirtualNetworkSubnetUsage", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.VirtualNetworkSubnetUsageParameter, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkSubnetUsageResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts index 3ce93955ee2c..b26a82c06e91 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClient.ts @@ -17,23 +17,14 @@ import { PostgreSQLManagementClientContext } from "./postgreSQLManagementClientC class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { // Operation groups servers: operations.Servers; - replicas: operations.Replicas; firewallRules: operations.FirewallRules; - virtualNetworkRules: operations.VirtualNetworkRules; - databases: operations.Databases; configurations: operations.Configurations; - serverParameters: operations.ServerParameters; - logFiles: operations.LogFiles; - serverAdministrators: operations.ServerAdministrators; - recoverableServers: operations.RecoverableServers; - serverBasedPerformanceTier: operations.ServerBasedPerformanceTier; - locationBasedPerformanceTier: operations.LocationBasedPerformanceTier; checkNameAvailability: operations.CheckNameAvailability; + locationBasedCapabilities: operations.LocationBasedCapabilities; + virtualNetworkSubnetUsage: operations.VirtualNetworkSubnetUsage; operations: operations.Operations; - serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; - privateEndpointConnections: operations.PrivateEndpointConnections; - privateLinkResources: operations.PrivateLinkResources; - serverKeys: operations.ServerKeys; + databases: operations.Databases; + getPrivateDnsZoneSuffix: operations.GetPrivateDnsZoneSuffix; /** * Initializes a new instance of the PostgreSQLManagementClient class. @@ -44,23 +35,14 @@ class PostgreSQLManagementClient extends PostgreSQLManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PostgreSQLManagementClientOptions) { super(credentials, subscriptionId, options); this.servers = new operations.Servers(this); - this.replicas = new operations.Replicas(this); this.firewallRules = new operations.FirewallRules(this); - this.virtualNetworkRules = new operations.VirtualNetworkRules(this); - this.databases = new operations.Databases(this); this.configurations = new operations.Configurations(this); - this.serverParameters = new operations.ServerParameters(this); - this.logFiles = new operations.LogFiles(this); - this.serverAdministrators = new operations.ServerAdministrators(this); - this.recoverableServers = new operations.RecoverableServers(this); - this.serverBasedPerformanceTier = new operations.ServerBasedPerformanceTier(this); - this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); + this.locationBasedCapabilities = new operations.LocationBasedCapabilities(this); + this.virtualNetworkSubnetUsage = new operations.VirtualNetworkSubnetUsage(this); this.operations = new operations.Operations(this); - this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); - this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); - this.privateLinkResources = new operations.PrivateLinkResources(this); - this.serverKeys = new operations.ServerKeys(this); + this.databases = new operations.Databases(this); + this.getPrivateDnsZoneSuffix = new operations.GetPrivateDnsZoneSuffix(this); } } diff --git a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts index 7d2c5bb72738..368b4071268c 100644 --- a/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts +++ b/sdk/postgresql/arm-postgresql/src/postgreSQLManagementClientContext.ts @@ -16,6 +16,7 @@ const packageVersion = "5.0.0"; export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; + apiVersion?: string; subscriptionId: string; /** @@ -42,6 +43,7 @@ export class PostgreSQLManagementClientContext extends msRestAzure.AzureServiceC super(credentials, options); + this.apiVersion = '2021-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";