Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR @azure/arm-postgresql-flexible] Fix S360 items for FSPG swagger #16174

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions sdk/postgresql/arm-postgresql-flexible/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Azure PostgreSQLFlexibleManagementClient SDK for JavaScript
## Azure PostgreSQLManagementClient SDK for JavaScript

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

### Currently supported environments

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

### Prerequisites

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

In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
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.
#### nodejs - Authentication, client creation, and get databases as an example written in JavaScript.
#### nodejs - Authentication, client creation, and get servers as an example written in JavaScript.

##### Sample code

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

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

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

In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- 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.
Expand All @@ -88,11 +87,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
clientId: "<client id for your Azure AD app>",
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmPostgresql.PostgreSQLFlexibleManagementClient(creds, subscriptionId);
const client = new Azure.ArmPostgresqlFlexible.PostgreSQLManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const serverName = "testserverName";
const databaseName = "testdatabaseName";
client.databases.get(resourceGroupName, serverName, databaseName).then((result) => {
client.servers.get(resourceGroupName, serverName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -109,4 +107,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t

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

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/postgresql/arm-postgresql-flexible//README.png)
8 changes: 4 additions & 4 deletions sdk/postgresql/arm-postgresql-flexible/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure/arm-postgresql-flexible",
"author": "Microsoft Corporation",
"description": "PostgreSQLFlexibleManagementClient Library with typescript type definitions for node.js and browser.",
"description": "PostgreSQLManagementClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.1.0",
Expand All @@ -18,16 +18,16 @@
],
"license": "MIT",
"main": "./dist/arm-postgresql-flexible.js",
"module": "./esm/postgreSQLFlexibleManagementClient.js",
"types": "./esm/postgreSQLFlexibleManagementClient.d.ts",
"module": "./esm/postgreSQLManagementClient.js",
"types": "./esm/postgreSQLManagementClient.d.ts",
"devDependencies": {
"typescript": "^3.6.0",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/postgresql/arm-postgresql-flexible",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/postgresql/arm-postgresql-flexible/",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
2 changes: 1 addition & 1 deletion sdk/postgresql/arm-postgresql-flexible/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./esm/postgreSQLFlexibleManagementClient.js",
input: "./esm/postgreSQLManagementClient.js",
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

export {
AzureEntityResource,
Backup,
BaseResource,
CloudError,
Configuration,
Expand All @@ -16,20 +17,20 @@ export {
ErrorAdditionalInfo,
ErrorResponse,
FirewallRule,
HighAvailability,
Identity,
MaintenanceWindow,
Network,
Plan,
ProxyResource,
RecoverableServerResource,
Resource,
ResourceModelWithAllowedPropertySet,
ResourceModelWithAllowedPropertySetIdentity,
ResourceModelWithAllowedPropertySetPlan,
ResourceModelWithAllowedPropertySetSku,
Server,
ServerPropertiesDelegatedSubnetArguments,
ServerPropertiesPrivateDnsZoneArguments,
Sku,
StorageProfile,
Storage,
SystemData,
TrackedResource
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

export {
AzureEntityResource,
Backup,
BaseResource,
CloudError,
Configuration,
Expand All @@ -16,20 +17,20 @@ export {
ErrorAdditionalInfo,
ErrorResponse,
FirewallRule,
HighAvailability,
Identity,
MaintenanceWindow,
Network,
Plan,
ProxyResource,
RecoverableServerResource,
Resource,
ResourceModelWithAllowedPropertySet,
ResourceModelWithAllowedPropertySetIdentity,
ResourceModelWithAllowedPropertySetPlan,
ResourceModelWithAllowedPropertySetSku,
Server,
ServerPropertiesDelegatedSubnetArguments,
ServerPropertiesPrivateDnsZoneArguments,
Sku,
StorageProfile,
Storage,
SystemData,
TrackedResource
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

export {
AzureEntityResource,
Backup,
BaseResource,
CloudError,
Configuration,
Expand All @@ -16,20 +17,20 @@ export {
ErrorResponse,
FirewallRule,
FirewallRuleListResult,
HighAvailability,
Identity,
MaintenanceWindow,
Network,
Plan,
ProxyResource,
RecoverableServerResource,
Resource,
ResourceModelWithAllowedPropertySet,
ResourceModelWithAllowedPropertySetIdentity,
ResourceModelWithAllowedPropertySetPlan,
ResourceModelWithAllowedPropertySetSku,
Server,
ServerPropertiesDelegatedSubnetArguments,
ServerPropertiesPrivateDnsZoneArguments,
Sku,
StorageProfile,
Storage,
SystemData,
TrackedResource
} from "../models/mappers";
Loading