Skip to content

Commit 785029b

Browse files
authored
arm-postgresql-flexible (Azure#16136)
1 parent 9a47f3d commit 785029b

26 files changed

+590
-830
lines changed

eng/pipelines/mgmt-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ trigger:
119119
- sdk/policy/arm-policy-profile-hybrid-2019-03-01
120120
- sdk/policyinsights/arm-policyinsights
121121
- sdk/postgresql/arm-postgresql
122+
- sdk/postgresql/arm-postgresql-flexible
122123
- sdk/powerbidedicated/arm-powerbidedicated
123124
- sdk/powerbiembedded/arm-powerbiembedded
124125
- sdk/privatedns/arm-privatedns

eng/pipelines/mgmt-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ pr:
120120
- sdk/policy/arm-policy-profile-hybrid-2019-03-01
121121
- sdk/policyinsights/arm-policyinsights
122122
- sdk/postgresql/arm-postgresql
123+
- sdk/postgresql/arm-postgresql-flexible
123124
- sdk/powerbidedicated/arm-powerbidedicated
124125
- sdk/powerbiembedded/arm-powerbiembedded
125126
- sdk/privatedns/arm-privatedns

sdk/postgresql/arm-postgresql-flexible/README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## Azure PostgreSQLFlexibleManagementClient SDK for JavaScript
1+
## Azure PostgreSQLManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in node.js and in browsers) for PostgreSQLFlexibleManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for PostgreSQLManagementClient.
44

55
### Currently supported environments
66

7-
- Node.js version 8.x.x or higher
8-
- Browser JavaScript
7+
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -36,23 +36,22 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3636

3737
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3838
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
39-
#### nodejs - Authentication, client creation, and get databases as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript.
4040

4141
##### Sample code
4242

4343
```javascript
4444
const { DefaultAzureCredential } = require("@azure/identity");
45-
const { PostgreSQLFlexibleManagementClient } = require("@azure/arm-postgresql-flexible");
45+
const { PostgreSQLManagementClient } = require("@azure/arm-postgresql-flexible");
4646
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
4747

4848
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
4949
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5050
const creds = new DefaultAzureCredential();
51-
const client = new PostgreSQLFlexibleManagementClient(creds, subscriptionId);
51+
const client = new PostgreSQLManagementClient(creds, subscriptionId);
5252
const resourceGroupName = "testresourceGroupName";
5353
const serverName = "testserverName";
54-
const databaseName = "testdatabaseName";
55-
client.databases.get(resourceGroupName, serverName, databaseName).then((result) => {
54+
client.servers.get(resourceGroupName, serverName).then((result) => {
5655
console.log("The result is:");
5756
console.log(result);
5857
}).catch((err) => {
@@ -61,7 +60,7 @@ client.databases.get(resourceGroupName, serverName, databaseName).then((result)
6160
});
6261
```
6362

64-
#### browser - Authentication, client creation, and get databases as an example written in JavaScript.
63+
#### browser - Authentication, client creation, and get servers as an example written in JavaScript.
6564

6665
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6766
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
@@ -88,11 +87,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8887
clientId: "<client id for your Azure AD app>",
8988
tenant: "<optional tenant for your organization>"
9089
});
91-
const client = new Azure.ArmPostgresql.PostgreSQLFlexibleManagementClient(creds, subscriptionId);
90+
const client = new Azure.ArmPostgresqlFlexible.PostgreSQLManagementClient(creds, subscriptionId);
9291
const resourceGroupName = "testresourceGroupName";
9392
const serverName = "testserverName";
94-
const databaseName = "testdatabaseName";
95-
client.databases.get(resourceGroupName, serverName, databaseName).then((result) => {
93+
client.servers.get(resourceGroupName, serverName).then((result) => {
9694
console.log("The result is:");
9795
console.log(result);
9896
}).catch((err) => {
@@ -109,4 +107,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
109107

110108
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
111109

112-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png)
110+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql-flexible//README.png)

sdk/postgresql/arm-postgresql-flexible/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@azure/arm-postgresql-flexible",
33
"author": "Microsoft Corporation",
4-
"description": "PostgreSQLFlexibleManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "1.0.0",
4+
"description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.",
5+
"version": "2.0.0",
66
"dependencies": {
77
"@azure/ms-rest-azure-js": "^2.1.0",
88
"@azure/ms-rest-js": "^2.2.0",
@@ -18,16 +18,16 @@
1818
],
1919
"license": "MIT",
2020
"main": "./dist/arm-postgresql-flexible.js",
21-
"module": "./esm/postgreSQLFlexibleManagementClient.js",
22-
"types": "./esm/postgreSQLFlexibleManagementClient.d.ts",
21+
"module": "./esm/postgreSQLManagementClient.js",
22+
"types": "./esm/postgreSQLManagementClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
2525
"rollup": "^1.18.0",
2626
"rollup-plugin-node-resolve": "^5.2.0",
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/postgresql/arm-postgresql-flexible",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/postgresql/arm-postgresql-flexible/",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/postgresql/arm-postgresql-flexible/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
66
* @type {rollup.RollupFileOptions}
77
*/
88
const config = {
9-
input: "./esm/postgreSQLFlexibleManagementClient.js",
9+
input: "./esm/postgreSQLManagementClient.js",
1010
external: [
1111
"@azure/ms-rest-js",
1212
"@azure/ms-rest-azure-js"

sdk/postgresql/arm-postgresql-flexible/src/models/configurationsMappers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export {
2020
MaintenanceWindow,
2121
Plan,
2222
ProxyResource,
23-
RecoverableServerResource,
2423
Resource,
2524
ResourceModelWithAllowedPropertySet,
2625
ResourceModelWithAllowedPropertySetIdentity,

sdk/postgresql/arm-postgresql-flexible/src/models/databasesMappers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export {
2020
MaintenanceWindow,
2121
Plan,
2222
ProxyResource,
23-
RecoverableServerResource,
2423
Resource,
2524
ResourceModelWithAllowedPropertySet,
2625
ResourceModelWithAllowedPropertySetIdentity,

sdk/postgresql/arm-postgresql-flexible/src/models/firewallRulesMappers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export {
2020
MaintenanceWindow,
2121
Plan,
2222
ProxyResource,
23-
RecoverableServerResource,
2423
Resource,
2524
ResourceModelWithAllowedPropertySet,
2625
ResourceModelWithAllowedPropertySetIdentity,

0 commit comments

Comments
 (0)