Skip to content

Commit d18bd1a

Browse files
author
SDK Automation
committed
Update from master
1 parent d51b305 commit d18bd1a

27 files changed

+8941
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
## Azure AppPlatformManagementClient SDK for JavaScript
2+
3+
This package contains an isomorphic SDK for AppPlatformManagementClient.
4+
5+
### Currently supported environments
6+
7+
- Node.js version 6.x.x or higher
8+
- Browser JavaScript
9+
10+
### How to Install
11+
12+
```bash
13+
npm install @azure/arm-appplatform
14+
```
15+
16+
### How to use
17+
18+
#### nodejs - Authentication, client creation and get services as an example written in TypeScript.
19+
20+
##### Install @azure/ms-rest-nodeauth
21+
22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23+
```bash
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
25+
```
26+
27+
##### Sample code
28+
29+
```typescript
30+
import * as msRest from "@azure/ms-rest-js";
31+
import * as msRestAzure from "@azure/ms-rest-azure-js";
32+
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
33+
import { AppPlatformManagementClient, AppPlatformManagementModels, AppPlatformManagementMappers } from "@azure/arm-appplatform";
34+
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
35+
36+
msRestNodeAuth.interactiveLogin().then((creds) => {
37+
const client = new AppPlatformManagementClient(creds, subscriptionId);
38+
const resourceGroupName = "testresourceGroupName";
39+
const serviceName = "testserviceName";
40+
client.services.get(resourceGroupName, serviceName).then((result) => {
41+
console.log("The result is:");
42+
console.log(result);
43+
});
44+
}).catch((err) => {
45+
console.error(err);
46+
});
47+
```
48+
49+
#### browser - Authentication, client creation and get services as an example written in JavaScript.
50+
51+
##### Install @azure/ms-rest-browserauth
52+
53+
```bash
54+
npm install @azure/ms-rest-browserauth
55+
```
56+
57+
##### Sample code
58+
59+
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
60+
61+
- index.html
62+
```html
63+
<!DOCTYPE html>
64+
<html lang="en">
65+
<head>
66+
<title>@azure/arm-appplatform sample</title>
67+
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
68+
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
69+
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
70+
<script src="node_modules/@azure/arm-appplatform/dist/arm-appplatform.js"></script>
71+
<script type="text/javascript">
72+
const subscriptionId = "<Subscription_Id>";
73+
const authManager = new msAuth.AuthManager({
74+
clientId: "<client id for your Azure AD app>",
75+
tenant: "<optional tenant for your organization>"
76+
});
77+
authManager.finalizeLogin().then((res) => {
78+
if (!res.isLoggedIn) {
79+
// may cause redirects
80+
authManager.login();
81+
}
82+
const client = new Azure.ArmAppplatform.AppPlatformManagementClient(res.creds, subscriptionId);
83+
const resourceGroupName = "testresourceGroupName";
84+
const serviceName = "testserviceName";
85+
client.services.get(resourceGroupName, serviceName).then((result) => {
86+
console.log("The result is:");
87+
console.log(result);
88+
}).catch((err) => {
89+
console.log("An error occurred:");
90+
console.error(err);
91+
});
92+
});
93+
</script>
94+
</head>
95+
<body></body>
96+
</html>
97+
```
98+
99+
## Related projects
100+
101+
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
102+
103+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/appplatform/arm-appplatform/README.png)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "@azure/arm-appplatform",
3+
"author": "Microsoft Corporation",
4+
"description": "AppPlatformManagementClient Library with typescript type definitions for node.js and browser.",
5+
"version": "1.0.0",
6+
"dependencies": {
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^1.10.0"
10+
},
11+
"keywords": [
12+
"node",
13+
"azure",
14+
"typescript",
15+
"browser",
16+
"isomorphic"
17+
],
18+
"license": "MIT",
19+
"main": "./dist/arm-appplatform.js",
20+
"module": "./esm/appPlatformManagementClient.js",
21+
"types": "./esm/appPlatformManagementClient.d.ts",
22+
"devDependencies": {
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
26+
"rollup-plugin-sourcemaps": "^0.4.2",
27+
"uglify-js": "^3.6.0"
28+
},
29+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/appplatform/arm-appplatform",
30+
"repository": {
31+
"type": "git",
32+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
33+
},
34+
"bugs": {
35+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
36+
},
37+
"files": [
38+
"dist/**/*.js",
39+
"dist/**/*.js.map",
40+
"dist/**/*.d.ts",
41+
"dist/**/*.d.ts.map",
42+
"esm/**/*.js",
43+
"esm/**/*.js.map",
44+
"esm/**/*.d.ts",
45+
"esm/**/*.d.ts.map",
46+
"src/**/*.ts",
47+
"README.md",
48+
"rollup.config.js",
49+
"tsconfig.json"
50+
],
51+
"scripts": {
52+
"build": "tsc && rollup -c rollup.config.js && npm run minify",
53+
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-appplatform.js.map'\" -o ./dist/arm-appplatform.min.js ./dist/arm-appplatform.js",
54+
"prepack": "npm install && npm run build"
55+
},
56+
"sideEffects": false,
57+
"autoPublish": true
58+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import rollup from "rollup";
2+
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
5+
/**
6+
* @type {rollup.RollupFileOptions}
7+
*/
8+
const config = {
9+
input: "./esm/appPlatformManagementClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
14+
output: {
15+
file: "./dist/arm-appplatform.js",
16+
format: "umd",
17+
name: "Azure.ArmAppplatform",
18+
sourcemap: true,
19+
globals: {
20+
"@azure/ms-rest-js": "msRest",
21+
"@azure/ms-rest-azure-js": "msRestAzure"
22+
},
23+
banner: `/*
24+
* Copyright (c) Microsoft Corporation. All rights reserved.
25+
* Licensed under the MIT License. See License.txt in the project root for license information.
26+
*
27+
* Code generated by Microsoft (R) AutoRest Code Generator.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
29+
*/`
30+
},
31+
plugins: [
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
34+
]
35+
};
36+
37+
export default config;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
* Changes may cause incorrect behavior and will be lost if the code is
8+
* regenerated.
9+
*/
10+
11+
import * as msRest from "@azure/ms-rest-js";
12+
import * as Models from "./models";
13+
import * as Mappers from "./models/mappers";
14+
import * as operations from "./operations";
15+
import { AppPlatformManagementClientContext } from "./appPlatformManagementClientContext";
16+
17+
18+
class AppPlatformManagementClient extends AppPlatformManagementClientContext {
19+
// Operation groups
20+
services: operations.Services;
21+
apps: operations.Apps;
22+
bindings: operations.Bindings;
23+
certificates: operations.Certificates;
24+
customDomains: operations.CustomDomains;
25+
deployments: operations.Deployments;
26+
operations: operations.Operations;
27+
sku: operations.SkuOperations;
28+
29+
/**
30+
* Initializes a new instance of the AppPlatformManagementClient class.
31+
* @param credentials Credentials needed for the client to connect to Azure.
32+
* @param subscriptionId Gets subscription ID which uniquely identify the Microsoft Azure
33+
* subscription. The subscription ID forms part of the URI for every service call.
34+
* @param [options] The parameter options
35+
*/
36+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AppPlatformManagementClientOptions) {
37+
super(credentials, subscriptionId, options);
38+
this.services = new operations.Services(this);
39+
this.apps = new operations.Apps(this);
40+
this.bindings = new operations.Bindings(this);
41+
this.certificates = new operations.Certificates(this);
42+
this.customDomains = new operations.CustomDomains(this);
43+
this.deployments = new operations.Deployments(this);
44+
this.operations = new operations.Operations(this);
45+
this.sku = new operations.SkuOperations(this);
46+
}
47+
}
48+
49+
// Operation Specifications
50+
51+
export {
52+
AppPlatformManagementClient,
53+
AppPlatformManagementClientContext,
54+
Models as AppPlatformManagementModels,
55+
Mappers as AppPlatformManagementMappers
56+
};
57+
export * from "./operations";
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
* Changes may cause incorrect behavior and will be lost if the code is
8+
* regenerated.
9+
*/
10+
11+
import * as Models from "./models";
12+
import * as msRest from "@azure/ms-rest-js";
13+
import * as msRestAzure from "@azure/ms-rest-azure-js";
14+
15+
const packageName = "@azure/arm-appplatform";
16+
const packageVersion = "1.0.0";
17+
18+
export class AppPlatformManagementClientContext extends msRestAzure.AzureServiceClient {
19+
credentials: msRest.ServiceClientCredentials;
20+
apiVersion?: string;
21+
subscriptionId: string;
22+
23+
/**
24+
* Initializes a new instance of the AppPlatformManagementClient class.
25+
* @param credentials Credentials needed for the client to connect to Azure.
26+
* @param subscriptionId Gets subscription ID which uniquely identify the Microsoft Azure
27+
* subscription. The subscription ID forms part of the URI for every service call.
28+
* @param [options] The parameter options
29+
*/
30+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AppPlatformManagementClientOptions) {
31+
if (credentials == undefined) {
32+
throw new Error('\'credentials\' cannot be null.');
33+
}
34+
if (subscriptionId == undefined) {
35+
throw new Error('\'subscriptionId\' cannot be null.');
36+
}
37+
38+
if (!options) {
39+
options = {};
40+
}
41+
if(!options.userAgent) {
42+
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
43+
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
44+
}
45+
46+
super(credentials, options);
47+
48+
this.apiVersion = '2019-05-01-preview';
49+
this.acceptLanguage = 'en-US';
50+
this.longRunningOperationRetryTimeout = 30;
51+
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
52+
this.requestContentType = "application/json; charset=utf-8";
53+
this.credentials = credentials;
54+
this.subscriptionId = subscriptionId;
55+
56+
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
57+
this.acceptLanguage = options.acceptLanguage;
58+
}
59+
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
60+
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
61+
}
62+
}
63+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
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+
export {
10+
AppResource,
11+
AppResourceCollection,
12+
AppResourceProperties,
13+
BaseResource,
14+
BindingResource,
15+
BindingResourceProperties,
16+
CertificateProperties,
17+
CertificateResource,
18+
CloudError,
19+
ClusterResourceProperties,
20+
ConfigServerGitProperty,
21+
ConfigServerProperties,
22+
ConfigServerSettings,
23+
CustomDomainProperties,
24+
CustomDomainResource,
25+
DeploymentInstance,
26+
DeploymentResource,
27+
DeploymentResourceProperties,
28+
DeploymentSettings,
29+
ErrorModel,
30+
GitPatternRepository,
31+
ManagedIdentityProperties,
32+
NetworkProfile,
33+
PersistentDisk,
34+
ProxyResource,
35+
Resource,
36+
ResourceUploadDefinition,
37+
ServiceResource,
38+
Sku,
39+
TemporaryDisk,
40+
TraceProperties,
41+
TrackedResource,
42+
UserSourceInfo
43+
} from "../models/mappers";

0 commit comments

Comments
 (0)