@azure/arm-oracledatabase 1.0.0-alpha.20240530.1 → 1.0.0-alpha.20240626.2

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 (100) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/index.js +1095 -497
  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/autonomousDatabaseBackupsCreateOrUpdateSample.js +28 -1
  7. package/dist-esm/samples-dev/autonomousDatabaseBackupsCreateOrUpdateSample.js.map +1 -1
  8. package/dist-esm/samples-dev/autonomousDatabaseBackupsDeleteSample.js +20 -0
  9. package/dist-esm/samples-dev/autonomousDatabaseBackupsDeleteSample.js.map +1 -1
  10. package/dist-esm/samples-dev/autonomousDatabaseBackupsGetSample.js +20 -0
  11. package/dist-esm/samples-dev/autonomousDatabaseBackupsGetSample.js.map +1 -1
  12. package/dist-esm/samples-dev/autonomousDatabaseBackupsListByAutonomousDatabaseSample.js +36 -1
  13. package/dist-esm/samples-dev/autonomousDatabaseBackupsListByAutonomousDatabaseSample.js.map +1 -1
  14. package/dist-esm/samples-dev/autonomousDatabaseBackupsUpdateSample.js +21 -0
  15. package/dist-esm/samples-dev/autonomousDatabaseBackupsUpdateSample.js.map +1 -1
  16. package/dist-esm/samples-dev/autonomousDatabasesCreateOrUpdateSample.js +75 -2
  17. package/dist-esm/samples-dev/autonomousDatabasesCreateOrUpdateSample.js.map +1 -1
  18. package/dist-esm/samples-dev/autonomousDatabasesFailoverSample.js +20 -0
  19. package/dist-esm/samples-dev/autonomousDatabasesFailoverSample.js.map +1 -1
  20. package/dist-esm/samples-dev/autonomousDatabasesGetSample.js +19 -0
  21. package/dist-esm/samples-dev/autonomousDatabasesGetSample.js.map +1 -1
  22. package/dist-esm/samples-dev/autonomousDatabasesRestoreSample.d.ts +2 -0
  23. package/dist-esm/samples-dev/autonomousDatabasesRestoreSample.d.ts.map +1 -0
  24. package/dist-esm/samples-dev/autonomousDatabasesRestoreSample.js +64 -0
  25. package/dist-esm/samples-dev/autonomousDatabasesRestoreSample.js.map +1 -0
  26. package/dist-esm/samples-dev/autonomousDatabasesShrinkSample.d.ts +2 -0
  27. package/dist-esm/samples-dev/autonomousDatabasesShrinkSample.d.ts.map +1 -0
  28. package/dist-esm/samples-dev/autonomousDatabasesShrinkSample.js +39 -0
  29. package/dist-esm/samples-dev/autonomousDatabasesShrinkSample.js.map +1 -0
  30. package/dist-esm/samples-dev/autonomousDatabasesSwitchoverSample.js +20 -0
  31. package/dist-esm/samples-dev/autonomousDatabasesSwitchoverSample.js.map +1 -1
  32. package/dist-esm/samples-dev/dbNodesActionSample.js +21 -0
  33. package/dist-esm/samples-dev/dbNodesActionSample.js.map +1 -1
  34. package/dist-esm/samples-dev/systemVersionsGetSample.d.ts +2 -0
  35. package/dist-esm/samples-dev/systemVersionsGetSample.d.ts.map +1 -0
  36. package/dist-esm/samples-dev/systemVersionsGetSample.js +58 -0
  37. package/dist-esm/samples-dev/systemVersionsGetSample.js.map +1 -0
  38. package/dist-esm/samples-dev/systemVersionsListByLocationSample.d.ts +2 -0
  39. package/dist-esm/samples-dev/systemVersionsListByLocationSample.d.ts.map +1 -0
  40. package/dist-esm/samples-dev/systemVersionsListByLocationSample.js +88 -0
  41. package/dist-esm/samples-dev/systemVersionsListByLocationSample.js.map +1 -0
  42. package/dist-esm/src/models/index.d.ts +546 -482
  43. package/dist-esm/src/models/index.d.ts.map +1 -1
  44. package/dist-esm/src/models/index.js +182 -178
  45. package/dist-esm/src/models/index.js.map +1 -1
  46. package/dist-esm/src/models/mappers.d.ts +10 -2
  47. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  48. package/dist-esm/src/models/mappers.js +333 -143
  49. package/dist-esm/src/models/mappers.js.map +1 -1
  50. package/dist-esm/src/models/parameters.d.ts +4 -2
  51. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  52. package/dist-esm/src/models/parameters.js +53 -4
  53. package/dist-esm/src/models/parameters.js.map +1 -1
  54. package/dist-esm/src/operations/autonomousDatabases.d.ts +31 -1
  55. package/dist-esm/src/operations/autonomousDatabases.d.ts.map +1 -1
  56. package/dist-esm/src/operations/autonomousDatabases.js +176 -0
  57. package/dist-esm/src/operations/autonomousDatabases.js.map +1 -1
  58. package/dist-esm/src/operations/cloudVmClusters.js +3 -3
  59. package/dist-esm/src/operations/dbNodes.js +1 -1
  60. package/dist-esm/src/operations/index.d.ts +1 -0
  61. package/dist-esm/src/operations/index.d.ts.map +1 -1
  62. package/dist-esm/src/operations/index.js +1 -0
  63. package/dist-esm/src/operations/index.js.map +1 -1
  64. package/dist-esm/src/operations/systemVersions.d.ts +42 -0
  65. package/dist-esm/src/operations/systemVersions.d.ts.map +1 -0
  66. package/dist-esm/src/operations/systemVersions.js +175 -0
  67. package/dist-esm/src/operations/systemVersions.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/autonomousDatabases.d.ts +31 -1
  69. package/dist-esm/src/operationsInterfaces/autonomousDatabases.d.ts.map +1 -1
  70. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  71. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  72. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  73. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  74. package/dist-esm/src/operationsInterfaces/systemVersions.d.ts +19 -0
  75. package/dist-esm/src/operationsInterfaces/systemVersions.d.ts.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/systemVersions.js +9 -0
  77. package/dist-esm/src/operationsInterfaces/systemVersions.js.map +1 -0
  78. package/dist-esm/src/oracleDatabaseManagementClient.d.ts +2 -1
  79. package/dist-esm/src/oracleDatabaseManagementClient.d.ts.map +1 -1
  80. package/dist-esm/src/oracleDatabaseManagementClient.js +3 -2
  81. package/dist-esm/src/oracleDatabaseManagementClient.js.map +1 -1
  82. package/dist-esm/test/oracledatabase_operations_test.spec.d.ts.map +1 -1
  83. package/dist-esm/test/oracledatabase_operations_test.spec.js +5 -1
  84. package/dist-esm/test/oracledatabase_operations_test.spec.js.map +1 -1
  85. package/package.json +1 -1
  86. package/review/arm-oracledatabase.api.md +145 -40
  87. package/src/models/index.ts +568 -484
  88. package/src/models/mappers.ts +344 -143
  89. package/src/models/parameters.ts +55 -3
  90. package/src/operations/autonomousDatabases.ts +252 -0
  91. package/src/operations/cloudVmClusters.ts +3 -3
  92. package/src/operations/dbNodes.ts +1 -1
  93. package/src/operations/index.ts +1 -0
  94. package/src/operations/systemVersions.ts +213 -0
  95. package/src/operationsInterfaces/autonomousDatabases.ts +63 -0
  96. package/src/operationsInterfaces/index.ts +1 -0
  97. package/src/operationsInterfaces/systemVersions.ts +40 -0
  98. package/src/oracleDatabaseManagementClient.ts +5 -1
  99. package/types/arm-oracledatabase.d.ts +629 -499
  100. package/types/tsdoc-metadata.json +1 -1
@@ -0,0 +1,213 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { SystemVersions } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { OracleDatabaseManagementClient } from "../oracleDatabaseManagementClient";
16
+ import {
17
+ SystemVersion,
18
+ SystemVersionsListByLocationNextOptionalParams,
19
+ SystemVersionsListByLocationOptionalParams,
20
+ SystemVersionsListByLocationResponse,
21
+ SystemVersionsGetOptionalParams,
22
+ SystemVersionsGetResponse,
23
+ SystemVersionsListByLocationNextResponse,
24
+ } from "../models";
25
+
26
+ /// <reference lib="esnext.asynciterable" />
27
+ /** Class containing SystemVersions operations. */
28
+ export class SystemVersionsImpl implements SystemVersions {
29
+ private readonly client: OracleDatabaseManagementClient;
30
+
31
+ /**
32
+ * Initialize a new instance of the class SystemVersions class.
33
+ * @param client Reference to the service client
34
+ */
35
+ constructor(client: OracleDatabaseManagementClient) {
36
+ this.client = client;
37
+ }
38
+
39
+ /**
40
+ * List SystemVersion resources by Location
41
+ * @param location The name of the Azure region.
42
+ * @param options The options parameters.
43
+ */
44
+ public listByLocation(
45
+ location: string,
46
+ options?: SystemVersionsListByLocationOptionalParams,
47
+ ): PagedAsyncIterableIterator<SystemVersion> {
48
+ const iter = this.listByLocationPagingAll(location, options);
49
+ return {
50
+ next() {
51
+ return iter.next();
52
+ },
53
+ [Symbol.asyncIterator]() {
54
+ return this;
55
+ },
56
+ byPage: (settings?: PageSettings) => {
57
+ if (settings?.maxPageSize) {
58
+ throw new Error("maxPageSize is not supported by this operation.");
59
+ }
60
+ return this.listByLocationPagingPage(location, options, settings);
61
+ },
62
+ };
63
+ }
64
+
65
+ private async *listByLocationPagingPage(
66
+ location: string,
67
+ options?: SystemVersionsListByLocationOptionalParams,
68
+ settings?: PageSettings,
69
+ ): AsyncIterableIterator<SystemVersion[]> {
70
+ let result: SystemVersionsListByLocationResponse;
71
+ let continuationToken = settings?.continuationToken;
72
+ if (!continuationToken) {
73
+ result = await this._listByLocation(location, options);
74
+ let page = result.value || [];
75
+ continuationToken = result.nextLink;
76
+ setContinuationToken(page, continuationToken);
77
+ yield page;
78
+ }
79
+ while (continuationToken) {
80
+ result = await this._listByLocationNext(
81
+ location,
82
+ continuationToken,
83
+ options,
84
+ );
85
+ continuationToken = result.nextLink;
86
+ let page = result.value || [];
87
+ setContinuationToken(page, continuationToken);
88
+ yield page;
89
+ }
90
+ }
91
+
92
+ private async *listByLocationPagingAll(
93
+ location: string,
94
+ options?: SystemVersionsListByLocationOptionalParams,
95
+ ): AsyncIterableIterator<SystemVersion> {
96
+ for await (const page of this.listByLocationPagingPage(location, options)) {
97
+ yield* page;
98
+ }
99
+ }
100
+
101
+ /**
102
+ * List SystemVersion resources by Location
103
+ * @param location The name of the Azure region.
104
+ * @param options The options parameters.
105
+ */
106
+ private _listByLocation(
107
+ location: string,
108
+ options?: SystemVersionsListByLocationOptionalParams,
109
+ ): Promise<SystemVersionsListByLocationResponse> {
110
+ return this.client.sendOperationRequest(
111
+ { location, options },
112
+ listByLocationOperationSpec,
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Get a SystemVersion
118
+ * @param location The name of the Azure region.
119
+ * @param systemversionname SystemVersion name
120
+ * @param options The options parameters.
121
+ */
122
+ get(
123
+ location: string,
124
+ systemversionname: string,
125
+ options?: SystemVersionsGetOptionalParams,
126
+ ): Promise<SystemVersionsGetResponse> {
127
+ return this.client.sendOperationRequest(
128
+ { location, systemversionname, options },
129
+ getOperationSpec,
130
+ );
131
+ }
132
+
133
+ /**
134
+ * ListByLocationNext
135
+ * @param location The name of the Azure region.
136
+ * @param nextLink The nextLink from the previous successful call to the ListByLocation method.
137
+ * @param options The options parameters.
138
+ */
139
+ private _listByLocationNext(
140
+ location: string,
141
+ nextLink: string,
142
+ options?: SystemVersionsListByLocationNextOptionalParams,
143
+ ): Promise<SystemVersionsListByLocationNextResponse> {
144
+ return this.client.sendOperationRequest(
145
+ { location, nextLink, options },
146
+ listByLocationNextOperationSpec,
147
+ );
148
+ }
149
+ }
150
+ // Operation Specifications
151
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
152
+
153
+ const listByLocationOperationSpec: coreClient.OperationSpec = {
154
+ path: "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions",
155
+ httpMethod: "GET",
156
+ responses: {
157
+ 200: {
158
+ bodyMapper: Mappers.SystemVersionListResult,
159
+ },
160
+ default: {
161
+ bodyMapper: Mappers.ErrorResponse,
162
+ },
163
+ },
164
+ queryParameters: [Parameters.apiVersion],
165
+ urlParameters: [
166
+ Parameters.$host,
167
+ Parameters.subscriptionId,
168
+ Parameters.location,
169
+ ],
170
+ headerParameters: [Parameters.accept],
171
+ serializer,
172
+ };
173
+ const getOperationSpec: coreClient.OperationSpec = {
174
+ path: "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}",
175
+ httpMethod: "GET",
176
+ responses: {
177
+ 200: {
178
+ bodyMapper: Mappers.SystemVersion,
179
+ },
180
+ default: {
181
+ bodyMapper: Mappers.ErrorResponse,
182
+ },
183
+ },
184
+ queryParameters: [Parameters.apiVersion],
185
+ urlParameters: [
186
+ Parameters.$host,
187
+ Parameters.subscriptionId,
188
+ Parameters.location,
189
+ Parameters.systemversionname,
190
+ ],
191
+ headerParameters: [Parameters.accept],
192
+ serializer,
193
+ };
194
+ const listByLocationNextOperationSpec: coreClient.OperationSpec = {
195
+ path: "{nextLink}",
196
+ httpMethod: "GET",
197
+ responses: {
198
+ 200: {
199
+ bodyMapper: Mappers.SystemVersionListResult,
200
+ },
201
+ default: {
202
+ bodyMapper: Mappers.ErrorResponse,
203
+ },
204
+ },
205
+ urlParameters: [
206
+ Parameters.$host,
207
+ Parameters.nextLink,
208
+ Parameters.subscriptionId,
209
+ Parameters.location,
210
+ ],
211
+ headerParameters: [Parameters.accept],
212
+ serializer,
213
+ };
@@ -27,6 +27,11 @@ import {
27
27
  GenerateAutonomousDatabaseWalletDetails,
28
28
  AutonomousDatabasesGenerateWalletOptionalParams,
29
29
  AutonomousDatabasesGenerateWalletResponse,
30
+ RestoreAutonomousDatabaseDetails,
31
+ AutonomousDatabasesRestoreOptionalParams,
32
+ AutonomousDatabasesRestoreResponse,
33
+ AutonomousDatabasesShrinkOptionalParams,
34
+ AutonomousDatabasesShrinkResponse,
30
35
  AutonomousDatabasesSwitchoverOptionalParams,
31
36
  AutonomousDatabasesSwitchoverResponse,
32
37
  } from "../models";
@@ -194,6 +199,64 @@ export interface AutonomousDatabases {
194
199
  body: GenerateAutonomousDatabaseWalletDetails,
195
200
  options?: AutonomousDatabasesGenerateWalletOptionalParams,
196
201
  ): Promise<AutonomousDatabasesGenerateWalletResponse>;
202
+ /**
203
+ * Restores an Autonomous Database based on the provided request parameters.
204
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
205
+ * @param autonomousdatabasename The database name.
206
+ * @param body The content of the action request
207
+ * @param options The options parameters.
208
+ */
209
+ beginRestore(
210
+ resourceGroupName: string,
211
+ autonomousdatabasename: string,
212
+ body: RestoreAutonomousDatabaseDetails,
213
+ options?: AutonomousDatabasesRestoreOptionalParams,
214
+ ): Promise<
215
+ SimplePollerLike<
216
+ OperationState<AutonomousDatabasesRestoreResponse>,
217
+ AutonomousDatabasesRestoreResponse
218
+ >
219
+ >;
220
+ /**
221
+ * Restores an Autonomous Database based on the provided request parameters.
222
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
223
+ * @param autonomousdatabasename The database name.
224
+ * @param body The content of the action request
225
+ * @param options The options parameters.
226
+ */
227
+ beginRestoreAndWait(
228
+ resourceGroupName: string,
229
+ autonomousdatabasename: string,
230
+ body: RestoreAutonomousDatabaseDetails,
231
+ options?: AutonomousDatabasesRestoreOptionalParams,
232
+ ): Promise<AutonomousDatabasesRestoreResponse>;
233
+ /**
234
+ * This operation shrinks the current allocated storage down to the current actual used data storage.
235
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
236
+ * @param autonomousdatabasename The database name.
237
+ * @param options The options parameters.
238
+ */
239
+ beginShrink(
240
+ resourceGroupName: string,
241
+ autonomousdatabasename: string,
242
+ options?: AutonomousDatabasesShrinkOptionalParams,
243
+ ): Promise<
244
+ SimplePollerLike<
245
+ OperationState<AutonomousDatabasesShrinkResponse>,
246
+ AutonomousDatabasesShrinkResponse
247
+ >
248
+ >;
249
+ /**
250
+ * This operation shrinks the current allocated storage down to the current actual used data storage.
251
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
252
+ * @param autonomousdatabasename The database name.
253
+ * @param options The options parameters.
254
+ */
255
+ beginShrinkAndWait(
256
+ resourceGroupName: string,
257
+ autonomousdatabasename: string,
258
+ options?: AutonomousDatabasesShrinkOptionalParams,
259
+ ): Promise<AutonomousDatabasesShrinkResponse>;
197
260
  /**
198
261
  * Perform switchover action on Autonomous Database
199
262
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -17,6 +17,7 @@ export * from "./dbSystemShapes";
17
17
  export * from "./dnsPrivateViews";
18
18
  export * from "./dnsPrivateZones";
19
19
  export * from "./giVersions";
20
+ export * from "./systemVersions";
20
21
  export * from "./oracleSubscriptions";
21
22
  export * from "./autonomousDatabaseBackups";
22
23
  export * from "./dbServers";
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ SystemVersion,
12
+ SystemVersionsListByLocationOptionalParams,
13
+ SystemVersionsGetOptionalParams,
14
+ SystemVersionsGetResponse,
15
+ } from "../models";
16
+
17
+ /// <reference lib="esnext.asynciterable" />
18
+ /** Interface representing a SystemVersions. */
19
+ export interface SystemVersions {
20
+ /**
21
+ * List SystemVersion resources by Location
22
+ * @param location The name of the Azure region.
23
+ * @param options The options parameters.
24
+ */
25
+ listByLocation(
26
+ location: string,
27
+ options?: SystemVersionsListByLocationOptionalParams,
28
+ ): PagedAsyncIterableIterator<SystemVersion>;
29
+ /**
30
+ * Get a SystemVersion
31
+ * @param location The name of the Azure region.
32
+ * @param systemversionname SystemVersion name
33
+ * @param options The options parameters.
34
+ */
35
+ get(
36
+ location: string,
37
+ systemversionname: string,
38
+ options?: SystemVersionsGetOptionalParams,
39
+ ): Promise<SystemVersionsGetResponse>;
40
+ }
@@ -26,6 +26,7 @@ import {
26
26
  DnsPrivateViewsImpl,
27
27
  DnsPrivateZonesImpl,
28
28
  GiVersionsImpl,
29
+ SystemVersionsImpl,
29
30
  OracleSubscriptionsImpl,
30
31
  AutonomousDatabaseBackupsImpl,
31
32
  DbServersImpl,
@@ -44,6 +45,7 @@ import {
44
45
  DnsPrivateViews,
45
46
  DnsPrivateZones,
46
47
  GiVersions,
48
+ SystemVersions,
47
49
  OracleSubscriptions,
48
50
  AutonomousDatabaseBackups,
49
51
  DbServers,
@@ -84,7 +86,7 @@ export class OracleDatabaseManagementClient extends coreClient.ServiceClient {
84
86
  credential: credentials,
85
87
  };
86
88
 
87
- const packageDetails = `azsdk-js-arm-oracledatabase/1.0.0-beta.1`;
89
+ const packageDetails = `azsdk-js-arm-oracledatabase/1.0.0-beta.2`;
88
90
  const userAgentPrefix =
89
91
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
90
92
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -154,6 +156,7 @@ export class OracleDatabaseManagementClient extends coreClient.ServiceClient {
154
156
  this.dnsPrivateViews = new DnsPrivateViewsImpl(this);
155
157
  this.dnsPrivateZones = new DnsPrivateZonesImpl(this);
156
158
  this.giVersions = new GiVersionsImpl(this);
159
+ this.systemVersions = new SystemVersionsImpl(this);
157
160
  this.oracleSubscriptions = new OracleSubscriptionsImpl(this);
158
161
  this.autonomousDatabaseBackups = new AutonomousDatabaseBackupsImpl(this);
159
162
  this.dbServers = new DbServersImpl(this);
@@ -201,6 +204,7 @@ export class OracleDatabaseManagementClient extends coreClient.ServiceClient {
201
204
  dnsPrivateViews: DnsPrivateViews;
202
205
  dnsPrivateZones: DnsPrivateZones;
203
206
  giVersions: GiVersions;
207
+ systemVersions: SystemVersions;
204
208
  oracleSubscriptions: OracleSubscriptions;
205
209
  autonomousDatabaseBackups: AutonomousDatabaseBackups;
206
210
  dbServers: DbServers;