@azure/arm-postgresql-flexible 8.0.0-beta.1 → 8.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +293 -2
  2. package/dist/index.js +134 -115
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/checkMigrationNameAvailabilitySample.js +2 -3
  7. package/dist-esm/samples-dev/checkMigrationNameAvailabilitySample.js.map +1 -1
  8. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +1 -3
  9. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js.map +1 -1
  10. package/dist-esm/samples-dev/migrationsCreateSample.js +43 -3
  11. package/dist-esm/samples-dev/migrationsCreateSample.js.map +1 -1
  12. package/dist-esm/samples-dev/migrationsDeleteSample.js +2 -3
  13. package/dist-esm/samples-dev/migrationsDeleteSample.js.map +1 -1
  14. package/dist-esm/samples-dev/migrationsGetSample.js +2 -3
  15. package/dist-esm/samples-dev/migrationsGetSample.js.map +1 -1
  16. package/dist-esm/samples-dev/migrationsListByTargetServerSample.js +2 -3
  17. package/dist-esm/samples-dev/migrationsListByTargetServerSample.js.map +1 -1
  18. package/dist-esm/samples-dev/migrationsUpdateSample.js +23 -4
  19. package/dist-esm/samples-dev/migrationsUpdateSample.js.map +1 -1
  20. package/dist-esm/samples-dev/serversCreateSample.js +2 -2
  21. package/dist-esm/samples-dev/serversCreateSample.js.map +1 -1
  22. package/dist-esm/samples-dev/serversUpdateSample.js +2 -2
  23. package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
  24. package/dist-esm/src/models/index.d.ts +60 -49
  25. package/dist-esm/src/models/index.d.ts.map +1 -1
  26. package/dist-esm/src/models/index.js +20 -20
  27. package/dist-esm/src/models/index.js.map +1 -1
  28. package/dist-esm/src/models/mappers.d.ts +2 -2
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  30. package/dist-esm/src/models/mappers.js +34 -10
  31. package/dist-esm/src/models/mappers.js.map +1 -1
  32. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts +2 -1
  33. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts.map +1 -1
  34. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js +8 -10
  35. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  36. package/dist-esm/test/postgresql_flexible_operations_test.spec.d.ts +4 -0
  37. package/dist-esm/test/postgresql_flexible_operations_test.spec.d.ts.map +1 -0
  38. package/dist-esm/test/postgresql_flexible_operations_test.spec.js +55 -0
  39. package/dist-esm/test/postgresql_flexible_operations_test.spec.js.map +1 -0
  40. package/package.json +12 -18
  41. package/review/arm-postgresql-flexible.api.md +26 -21
  42. package/src/models/index.ts +60 -49
  43. package/src/models/mappers.ts +34 -10
  44. package/src/postgreSQLManagementFlexibleServerClient.ts +20 -4
  45. package/types/arm-postgresql-flexible.d.ts +69 -57
  46. package/types/tsdoc-metadata.json +1 -1
  47. package/dist-esm/test/sampleTest.d.ts +0 -2
  48. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  49. package/dist-esm/test/sampleTest.js +0 -38
  50. package/dist-esm/test/sampleTest.js.map +0 -1
  51. package/rollup.config.js +0 -122
@@ -260,6 +260,11 @@ export interface UserAssignedIdentity {
260
260
  userAssignedIdentities?: { [propertyName: string]: UserIdentity };
261
261
  /** the types of identities associated with this resource; currently restricted to 'None and UserAssigned' */
262
262
  type: IdentityType;
263
+ /**
264
+ * Tenant id of the server.
265
+ * NOTE: This property will not be serialized. It can only be populated by the server.
266
+ */
267
+ readonly tenantId?: string;
263
268
  }
264
269
 
265
270
  /** Describes a single user-assigned identity associated with the application. */
@@ -277,7 +282,7 @@ export interface Storage {
277
282
  /** Flag to enable / disable Storage Auto grow for flexible server. */
278
283
  autoGrow?: StorageAutoGrow;
279
284
  /** Name of storage tier for IOPS. */
280
- iopsTier?: AzureManagedDiskPerformanceTiers;
285
+ tier?: AzureManagedDiskPerformanceTiers;
281
286
  /**
282
287
  * Storage tier IOPS quantity.
283
288
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -326,16 +331,16 @@ export interface Backup {
326
331
  readonly earliestRestoreDate?: Date;
327
332
  }
328
333
 
329
- /** Network properties of a server */
334
+ /** Network properties of a server. */
330
335
  export interface Network {
331
336
  /**
332
337
  * public network access is enabled or not
333
338
  * NOTE: This property will not be serialized. It can only be populated by the server.
334
339
  */
335
340
  readonly publicNetworkAccess?: ServerPublicNetworkAccessState;
336
- /** delegated subnet arm resource id. */
341
+ /** Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. */
337
342
  delegatedSubnetResourceId?: string;
338
- /** private dns zone arm resource id. */
343
+ /** Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. */
339
344
  privateDnsZoneArmResourceId?: string;
340
345
  }
341
346
 
@@ -395,6 +400,8 @@ export interface ServerForUpdate {
395
400
  createMode?: CreateModeForUpdate;
396
401
  /** Replication role of the server */
397
402
  replicationRole?: ReplicationRole;
403
+ /** Network properties of a server. These are required to be passed only in case if server is a private access server. */
404
+ network?: Network;
398
405
  }
399
406
 
400
407
  /** A list of servers. */
@@ -445,11 +452,11 @@ export interface DbServerMetadata {
445
452
  /** Storage size in MB for database server */
446
453
  storageMb?: number;
447
454
  /** SKU for the database server */
448
- sku?: ServerSkuAutoGenerated;
455
+ sku?: ServerSku;
449
456
  }
450
457
 
451
458
  /** Sku information related properties of a server. */
452
- export interface ServerSkuAutoGenerated {
459
+ export interface ServerSku {
453
460
  /** The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. */
454
461
  name: string;
455
462
  /** The tier of the particular SKU, e.g. Burstable. */
@@ -460,6 +467,10 @@ export interface ServerSkuAutoGenerated {
460
467
  export interface MigrationSecretParameters {
461
468
  /** Admin credentials for source and target servers */
462
469
  adminCredentials: AdminCredentials;
470
+ /** Gets or sets the username for the source server. This user need not be an admin. */
471
+ sourceServerUsername?: string;
472
+ /** Gets or sets the username for the target server. This user need not be an admin. */
473
+ targetServerUsername?: string;
463
474
  }
464
475
 
465
476
  /** Server admin credentials. */
@@ -486,19 +497,19 @@ export interface MigrationResourceForPatch {
486
497
  dbsToMigrate?: string[];
487
498
  /** Indicates whether to setup LogicalReplicationOnSourceDb, if needed */
488
499
  setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceDbEnum;
489
- /** Indicates whether the databases on the target server can be overwritten, if already present. If set to Disabled, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
500
+ /** Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
490
501
  overwriteDbsInTarget?: OverwriteDbsInTargetEnum;
491
502
  /** Start time in UTC for migration window */
492
503
  migrationWindowStartTimeInUtc?: Date;
493
504
  /** Indicates whether the data migration should start right away */
494
505
  startDataMigration?: StartDataMigrationEnum;
495
- /** To trigger cutover for entire migration we need to send this flag as Enabled */
506
+ /** To trigger cutover for entire migration we need to send this flag as True */
496
507
  triggerCutover?: TriggerCutoverEnum;
497
- /** When you want to trigger cutover for specific databases send triggerCutover flag as Enabled and database names in this array */
508
+ /** When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array */
498
509
  dbsToTriggerCutoverOn?: string[];
499
- /** To trigger cancel for entire migration we need to send this flag as Enabled */
510
+ /** To trigger cancel for entire migration we need to send this flag as True */
500
511
  cancel?: CancelEnum;
501
- /** When you want to trigger cancel for specific databases send cancel flag as Enabled and database names in this array */
512
+ /** When you want to trigger cancel for specific databases send cancel flag as True and database names in this array */
502
513
  dbsToCancelMigrationOn?: string[];
503
514
  /** There are two types of migration modes Online and Offline */
504
515
  migrationMode?: MigrationMode;
@@ -785,7 +796,7 @@ export interface StorageEditionCapability extends CapabilityBase {
785
796
  }
786
797
 
787
798
  /** Sku capability */
788
- export interface ServerSku extends CapabilityBase {
799
+ export interface ServerSkuCapability extends CapabilityBase {
789
800
  /**
790
801
  * Sku name
791
802
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -839,7 +850,7 @@ export interface FlexibleServerEditionCapability extends CapabilityBase {
839
850
  * List of supported server SKUs.
840
851
  * NOTE: This property will not be serialized. It can only be populated by the server.
841
852
  */
842
- readonly supportedServerSkus?: ServerSku[];
853
+ readonly supportedServerSkus?: ServerSkuCapability[];
843
854
  }
844
855
 
845
856
  /** Server version capabilities. */
@@ -1137,7 +1148,7 @@ export interface Server extends TrackedResource {
1137
1148
  dataEncryption?: DataEncryption;
1138
1149
  /** Backup properties of a server. */
1139
1150
  backup?: Backup;
1140
- /** Network properties of a server. */
1151
+ /** Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server. */
1141
1152
  network?: Network;
1142
1153
  /** High availability properties of a server. */
1143
1154
  highAvailability?: HighAvailability;
@@ -1201,7 +1212,7 @@ export interface MigrationResource extends TrackedResource {
1201
1212
  dbsToMigrate?: string[];
1202
1213
  /** Indicates whether to setup LogicalReplicationOnSourceDb, if needed */
1203
1214
  setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceDbEnum;
1204
- /** Indicates whether the databases on the target server can be overwritten, if already present. If set to Disabled, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
1215
+ /** Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
1205
1216
  overwriteDbsInTarget?: OverwriteDbsInTargetEnum;
1206
1217
  /** Start time in UTC for migration window */
1207
1218
  migrationWindowStartTimeInUtc?: Date;
@@ -1209,13 +1220,13 @@ export interface MigrationResource extends TrackedResource {
1209
1220
  migrationWindowEndTimeInUtc?: Date;
1210
1221
  /** Indicates whether the data migration should start right away */
1211
1222
  startDataMigration?: StartDataMigrationEnum;
1212
- /** To trigger cutover for entire migration we need to send this flag as Enabled */
1223
+ /** To trigger cutover for entire migration we need to send this flag as True */
1213
1224
  triggerCutover?: TriggerCutoverEnum;
1214
- /** When you want to trigger cutover for specific databases send triggerCutover flag as Enabled and database names in this array */
1225
+ /** When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array */
1215
1226
  dbsToTriggerCutoverOn?: string[];
1216
- /** To trigger cancel for entire migration we need to send this flag as Enabled */
1227
+ /** To trigger cancel for entire migration we need to send this flag as True */
1217
1228
  cancel?: CancelEnum;
1218
- /** When you want to trigger cancel for specific databases send cancel flag as Enabled and database names in this array */
1229
+ /** When you want to trigger cancel for specific databases send cancel flag as True and database names in this array */
1219
1230
  dbsToCancelMigrationOn?: string[];
1220
1231
  }
1221
1232
 
@@ -2060,10 +2071,10 @@ export type MigrationMode = string;
2060
2071
 
2061
2072
  /** Known values of {@link LogicalReplicationOnSourceDbEnum} that the service accepts. */
2062
2073
  export enum KnownLogicalReplicationOnSourceDbEnum {
2063
- /** Enabled */
2064
- Enabled = "Enabled",
2065
- /** Disabled */
2066
- Disabled = "Disabled"
2074
+ /** True */
2075
+ True = "True",
2076
+ /** False */
2077
+ False = "False"
2067
2078
  }
2068
2079
 
2069
2080
  /**
@@ -2071,17 +2082,17 @@ export enum KnownLogicalReplicationOnSourceDbEnum {
2071
2082
  * {@link KnownLogicalReplicationOnSourceDbEnum} can be used interchangeably with LogicalReplicationOnSourceDbEnum,
2072
2083
  * this enum contains the known values that the service supports.
2073
2084
  * ### Known values supported by the service
2074
- * **Enabled** \
2075
- * **Disabled**
2085
+ * **True** \
2086
+ * **False**
2076
2087
  */
2077
2088
  export type LogicalReplicationOnSourceDbEnum = string;
2078
2089
 
2079
2090
  /** Known values of {@link OverwriteDbsInTargetEnum} that the service accepts. */
2080
2091
  export enum KnownOverwriteDbsInTargetEnum {
2081
- /** Enabled */
2082
- Enabled = "Enabled",
2083
- /** Disabled */
2084
- Disabled = "Disabled"
2092
+ /** True */
2093
+ True = "True",
2094
+ /** False */
2095
+ False = "False"
2085
2096
  }
2086
2097
 
2087
2098
  /**
@@ -2089,17 +2100,17 @@ export enum KnownOverwriteDbsInTargetEnum {
2089
2100
  * {@link KnownOverwriteDbsInTargetEnum} can be used interchangeably with OverwriteDbsInTargetEnum,
2090
2101
  * this enum contains the known values that the service supports.
2091
2102
  * ### Known values supported by the service
2092
- * **Enabled** \
2093
- * **Disabled**
2103
+ * **True** \
2104
+ * **False**
2094
2105
  */
2095
2106
  export type OverwriteDbsInTargetEnum = string;
2096
2107
 
2097
2108
  /** Known values of {@link StartDataMigrationEnum} that the service accepts. */
2098
2109
  export enum KnownStartDataMigrationEnum {
2099
- /** Enabled */
2100
- Enabled = "Enabled",
2101
- /** Disabled */
2102
- Disabled = "Disabled"
2110
+ /** True */
2111
+ True = "True",
2112
+ /** False */
2113
+ False = "False"
2103
2114
  }
2104
2115
 
2105
2116
  /**
@@ -2107,17 +2118,17 @@ export enum KnownStartDataMigrationEnum {
2107
2118
  * {@link KnownStartDataMigrationEnum} can be used interchangeably with StartDataMigrationEnum,
2108
2119
  * this enum contains the known values that the service supports.
2109
2120
  * ### Known values supported by the service
2110
- * **Enabled** \
2111
- * **Disabled**
2121
+ * **True** \
2122
+ * **False**
2112
2123
  */
2113
2124
  export type StartDataMigrationEnum = string;
2114
2125
 
2115
2126
  /** Known values of {@link TriggerCutoverEnum} that the service accepts. */
2116
2127
  export enum KnownTriggerCutoverEnum {
2117
- /** Enabled */
2118
- Enabled = "Enabled",
2119
- /** Disabled */
2120
- Disabled = "Disabled"
2128
+ /** True */
2129
+ True = "True",
2130
+ /** False */
2131
+ False = "False"
2121
2132
  }
2122
2133
 
2123
2134
  /**
@@ -2125,17 +2136,17 @@ export enum KnownTriggerCutoverEnum {
2125
2136
  * {@link KnownTriggerCutoverEnum} can be used interchangeably with TriggerCutoverEnum,
2126
2137
  * this enum contains the known values that the service supports.
2127
2138
  * ### Known values supported by the service
2128
- * **Enabled** \
2129
- * **Disabled**
2139
+ * **True** \
2140
+ * **False**
2130
2141
  */
2131
2142
  export type TriggerCutoverEnum = string;
2132
2143
 
2133
2144
  /** Known values of {@link CancelEnum} that the service accepts. */
2134
2145
  export enum KnownCancelEnum {
2135
- /** Enabled */
2136
- Enabled = "Enabled",
2137
- /** Disabled */
2138
- Disabled = "Disabled"
2146
+ /** True */
2147
+ True = "True",
2148
+ /** False */
2149
+ False = "False"
2139
2150
  }
2140
2151
 
2141
2152
  /**
@@ -2143,8 +2154,8 @@ export enum KnownCancelEnum {
2143
2154
  * {@link KnownCancelEnum} can be used interchangeably with CancelEnum,
2144
2155
  * this enum contains the known values that the service supports.
2145
2156
  * ### Known values supported by the service
2146
- * **Enabled** \
2147
- * **Disabled**
2157
+ * **True** \
2158
+ * **False**
2148
2159
  */
2149
2160
  export type CancelEnum = string;
2150
2161
 
@@ -574,6 +574,13 @@ export const UserAssignedIdentity: coreClient.CompositeMapper = {
574
574
  type: {
575
575
  name: "String"
576
576
  }
577
+ },
578
+ tenantId: {
579
+ serializedName: "tenantId",
580
+ readOnly: true,
581
+ type: {
582
+ name: "String"
583
+ }
577
584
  }
578
585
  }
579
586
  }
@@ -617,8 +624,8 @@ export const Storage: coreClient.CompositeMapper = {
617
624
  name: "String"
618
625
  }
619
626
  },
620
- iopsTier: {
621
- serializedName: "iopsTier",
627
+ tier: {
628
+ serializedName: "tier",
622
629
  type: {
623
630
  name: "String"
624
631
  }
@@ -757,14 +764,12 @@ export const Network: coreClient.CompositeMapper = {
757
764
  }
758
765
  },
759
766
  delegatedSubnetResourceId: {
760
- defaultValue: "",
761
767
  serializedName: "delegatedSubnetResourceId",
762
768
  type: {
763
769
  name: "String"
764
770
  }
765
771
  },
766
772
  privateDnsZoneArmResourceId: {
767
- defaultValue: "",
768
773
  serializedName: "privateDnsZoneArmResourceId",
769
774
  type: {
770
775
  name: "String"
@@ -932,6 +937,13 @@ export const ServerForUpdate: coreClient.CompositeMapper = {
932
937
  type: {
933
938
  name: "String"
934
939
  }
940
+ },
941
+ network: {
942
+ serializedName: "properties.network",
943
+ type: {
944
+ name: "Composite",
945
+ className: "Network"
946
+ }
935
947
  }
936
948
  }
937
949
  }
@@ -1038,17 +1050,17 @@ export const DbServerMetadata: coreClient.CompositeMapper = {
1038
1050
  serializedName: "sku",
1039
1051
  type: {
1040
1052
  name: "Composite",
1041
- className: "ServerSkuAutoGenerated"
1053
+ className: "ServerSku"
1042
1054
  }
1043
1055
  }
1044
1056
  }
1045
1057
  }
1046
1058
  };
1047
1059
 
1048
- export const ServerSkuAutoGenerated: coreClient.CompositeMapper = {
1060
+ export const ServerSku: coreClient.CompositeMapper = {
1049
1061
  type: {
1050
1062
  name: "Composite",
1051
- className: "ServerSkuAutoGenerated",
1063
+ className: "ServerSku",
1052
1064
  modelProperties: {
1053
1065
  name: {
1054
1066
  serializedName: "name",
@@ -1079,6 +1091,18 @@ export const MigrationSecretParameters: coreClient.CompositeMapper = {
1079
1091
  name: "Composite",
1080
1092
  className: "AdminCredentials"
1081
1093
  }
1094
+ },
1095
+ sourceServerUsername: {
1096
+ serializedName: "sourceServerUsername",
1097
+ type: {
1098
+ name: "String"
1099
+ }
1100
+ },
1101
+ targetServerUsername: {
1102
+ serializedName: "targetServerUsername",
1103
+ type: {
1104
+ name: "String"
1105
+ }
1082
1106
  }
1083
1107
  }
1084
1108
  }
@@ -1841,10 +1865,10 @@ export const StorageEditionCapability: coreClient.CompositeMapper = {
1841
1865
  }
1842
1866
  };
1843
1867
 
1844
- export const ServerSku: coreClient.CompositeMapper = {
1868
+ export const ServerSkuCapability: coreClient.CompositeMapper = {
1845
1869
  type: {
1846
1870
  name: "Composite",
1847
- className: "ServerSku",
1871
+ className: "ServerSkuCapability",
1848
1872
  modelProperties: {
1849
1873
  ...CapabilityBase.type.modelProperties,
1850
1874
  name: {
@@ -1944,7 +1968,7 @@ export const FlexibleServerEditionCapability: coreClient.CompositeMapper = {
1944
1968
  element: {
1945
1969
  type: {
1946
1970
  name: "Composite",
1947
- className: "ServerSku"
1971
+ className: "ServerSkuCapability"
1948
1972
  }
1949
1973
  }
1950
1974
  }
@@ -65,7 +65,7 @@ import {
65
65
 
66
66
  export class PostgreSQLManagementFlexibleServerClient extends coreClient.ServiceClient {
67
67
  $host: string;
68
- subscriptionId: string;
68
+ subscriptionId?: string;
69
69
  apiVersion: string;
70
70
 
71
71
  /**
@@ -78,12 +78,28 @@ export class PostgreSQLManagementFlexibleServerClient extends coreClient.Service
78
78
  credentials: coreAuth.TokenCredential,
79
79
  subscriptionId: string,
80
80
  options?: PostgreSQLManagementFlexibleServerClientOptionalParams
81
+ );
82
+ constructor(
83
+ credentials: coreAuth.TokenCredential,
84
+ options?: PostgreSQLManagementFlexibleServerClientOptionalParams
85
+ );
86
+ constructor(
87
+ credentials: coreAuth.TokenCredential,
88
+ subscriptionIdOrOptions?:
89
+ | PostgreSQLManagementFlexibleServerClientOptionalParams
90
+ | string,
91
+ options?: PostgreSQLManagementFlexibleServerClientOptionalParams
81
92
  ) {
82
93
  if (credentials === undefined) {
83
94
  throw new Error("'credentials' cannot be null");
84
95
  }
85
- if (subscriptionId === undefined) {
86
- throw new Error("'subscriptionId' cannot be null");
96
+
97
+ let subscriptionId: string | undefined;
98
+
99
+ if (typeof subscriptionIdOrOptions === "string") {
100
+ subscriptionId = subscriptionIdOrOptions;
101
+ } else if (typeof subscriptionIdOrOptions === "object") {
102
+ options = subscriptionIdOrOptions;
87
103
  }
88
104
 
89
105
  // Initializing default values for options
@@ -95,7 +111,7 @@ export class PostgreSQLManagementFlexibleServerClient extends coreClient.Service
95
111
  credential: credentials
96
112
  };
97
113
 
98
- const packageDetails = `azsdk-js-arm-postgresql-flexible/8.0.0-beta.1`;
114
+ const packageDetails = `azsdk-js-arm-postgresql-flexible/8.0.0-beta.3`;
99
115
  const userAgentPrefix =
100
116
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
101
117
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`