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-managedapplications] Include Tags in GetSubscription and Deployment APIs #7551

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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
27 changes: 16 additions & 11 deletions sdk/managedapplications/arm-managedapplications/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Azure ManagedApplicationClient SDK for JavaScript
## Azure ApplicationClient SDK for JavaScript

This package contains an isomorphic SDK for ManagedApplicationClient.
This package contains an isomorphic SDK for ApplicationClient.

### Currently supported environments

Expand All @@ -15,12 +15,13 @@ npm install @azure/arm-managedapplications

### How to use

#### nodejs - Authentication, client creation and listOperations as an example written in TypeScript.
#### nodejs - Authentication, client creation and get applications as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand All @@ -29,12 +30,14 @@ npm install @azure/ms-rest-nodeauth
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { ManagedApplicationClient, ManagedApplicationModels, ManagedApplicationMappers } from "@azure/arm-managedapplications";
import { ApplicationClient, ApplicationModels, ApplicationMappers } from "@azure/arm-managedapplications";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ManagedApplicationClient(creds, subscriptionId);
client.listOperations().then((result) => {
const client = new ApplicationClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const applicationName = "testapplicationName";
client.applications.get(resourceGroupName, applicationName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -43,7 +46,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

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

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -76,8 +79,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
// may cause redirects
authManager.login();
}
const client = new Azure.ArmManagedapplications.ManagedApplicationClient(res.creds, subscriptionId);
client.listOperations().then((result) => {
const client = new Azure.ArmManagedapplications.ApplicationClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const applicationName = "testapplicationName";
client.applications.get(resourceGroupName, applicationName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -95,4 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [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%2Fsdk%2Fmanagedapplications%2Farm-managedapplications%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/managedapplications/arm-managedapplications/README.png)
20 changes: 10 additions & 10 deletions sdk/managedapplications/arm-managedapplications/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@azure/arm-managedapplications",
"author": "Microsoft Corporation",
"description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.",
"description": "ApplicationClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.2",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -17,14 +17,14 @@
],
"license": "MIT",
"main": "./dist/arm-managedapplications.js",
"module": "./esm/managedApplicationClient.js",
"types": "./esm/managedApplicationClient.d.ts",
"module": "./esm/applicationClient.js",
"types": "./esm/applicationClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications",
"repository": {
Expand Down
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/managedApplicationClient.js",
input: "./esm/applicationClient.js",
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
Expand All @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* 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/mappers";
import * as operations from "./operations";
import { ApplicationClientContext } from "./applicationClientContext";


class ApplicationClient extends ApplicationClientContext {
// Operation groups
applications: operations.Applications;
applicationDefinitions: operations.ApplicationDefinitions;

/**
* Initializes a new instance of the ApplicationClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId The ID of the target subscription.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) {
super(credentials, subscriptionId, options);
this.applications = new operations.Applications(this);
this.applicationDefinitions = new operations.ApplicationDefinitions(this);
}
}

// Operation Specifications

export {
ApplicationClient,
ApplicationClientContext,
Models as ApplicationModels,
Mappers as ApplicationMappers
};
export * from "./operations";
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ import * as msRestAzure from "@azure/ms-rest-azure-js";
const packageName = "@azure/arm-managedapplications";
const packageVersion = "1.0.2";

export class ManagedApplicationClientContext extends msRestAzure.AzureServiceClient {
export class ApplicationClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;

/**
* Initializes a new instance of the ManagedApplicationClient class.
* Initializes a new instance of the ApplicationClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId The ID of the target subscription.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) {
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
Expand All @@ -44,7 +44,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli

super(credentials, options);

this.apiVersion = '2016-09-01-preview';
this.apiVersion = '2018-06-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*/

export {
Appliance,
ApplianceArtifact,
ApplianceDefinition,
ApplianceListResult,
AppliancePatchable,
ApplianceProviderAuthorization,
Application,
ApplicationArtifact,
ApplicationDefinition,
ApplicationDefinitionListResult,
ApplicationPatchable,
ApplicationProviderAuthorization,
BaseResource,
ErrorResponse,
GenericResource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*/

export {
Appliance,
ApplianceArtifact,
ApplianceDefinition,
ApplianceDefinitionListResult,
AppliancePatchable,
ApplianceProviderAuthorization,
Application,
ApplicationArtifact,
ApplicationDefinition,
ApplicationListResult,
ApplicationPatchable,
ApplicationProviderAuthorization,
BaseResource,
ErrorResponse,
GenericResource,
Expand Down
Loading