Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR containerinstance/resource-manager] Adding June Swagger Update - Azure Container Instance #2934

Merged
Merged
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
42 changes: 21 additions & 21 deletions lib/services/containerinstanceManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
78 changes: 40 additions & 38 deletions lib/services/containerinstanceManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# Microsoft Azure SDK for Node.js - ContainerInstanceManagement

This project provides a Node.js package for accessing the Azure PAS. Right now it supports:
- **Node.js version: 6.x.x or higher**

## How to Install

```bash
npm install azure-arm-containerinstance
```

## How to Use

### Authentication, client creation and listing containerGroups as an example

```javascript
var msRestAzure = require('ms-rest-azure');
var ContainerInstanceManagementClient = require("azure-arm-containerinstance");

// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin(function(err, credentials) {
let client = new ContainerInstanceManagementClient(credentials, 'your-subscription-id');
client.containerGroups.list().then((containerGroups) => {
console.log('List of containerGroups:');
console.dir(containerGroups, {depth: null, colors: true});
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
---
uid: azure-arm-containerinstance
summary: *content

---
# Microsoft Azure SDK for Node.js - ContainerInstanceManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-containerinstance
```

## How to use

### Authentication, client creation and list containerGroups as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const ContainerInstanceManagementClient = require("azure-arm-containerinstance");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ContainerInstanceManagementClient(creds, subscriptionId);
return client.containerGroups.list().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

import { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

declare class ContainerInstanceManagementClient extends AzureServiceClient {
export default class ContainerInstanceManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the ContainerInstanceManagementClient class.
* @constructor
Expand Down Expand Up @@ -59,6 +60,7 @@ declare class ContainerInstanceManagementClient extends AzureServiceClient {
operations: operations.Operations;
containerGroupUsage: operations.ContainerGroupUsage;
containerLogs: operations.ContainerLogs;
startContainer: operations.StartContainer;
}

export = ContainerInstanceManagementClient;
export { ContainerInstanceManagementClient, models as ContainerInstanceManagementModels };
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ContainerInstanceManagementClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-02-01-preview';
this.apiVersion = '2018-06-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -76,10 +76,14 @@ class ContainerInstanceManagementClient extends ServiceClient {
this.operations = new operations.Operations(this);
this.containerGroupUsage = new operations.ContainerGroupUsage(this);
this.containerLogs = new operations.ContainerLogs(this);
this.startContainer = new operations.StartContainer(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = ContainerInstanceManagementClient;
module.exports['default'] = ContainerInstanceManagementClient;
module.exports.ContainerInstanceManagementClient = ContainerInstanceManagementClient;
module.exports.ContainerInstanceManagementModels = models;
46 changes: 46 additions & 0 deletions lib/services/containerinstanceManagement/lib/models/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,36 @@ class Container {
* instance.
* @member {array} [volumeMounts] The volume mounts available to the
* container instance.
* @member {object} [livenessProbe] The liveness probe.
* @member {object} [livenessProbe.exec] The execution command to probe
* @member {array} [livenessProbe.exec.command] The commands to execute
* within the container.
* @member {object} [livenessProbe.httpGet] The Http Get settings to probe
* @member {string} [livenessProbe.httpGet.path] The path to probe.
* @member {number} [livenessProbe.httpGet.port] The port number to probe.
* @member {string} [livenessProbe.httpGet.scheme] The scheme. Possible
* values include: 'http', 'https'
* @member {number} [livenessProbe.initialDelaySeconds] The initial delay
* seconds.
* @member {number} [livenessProbe.periodSeconds] The period seconds.
* @member {number} [livenessProbe.failureThreshold] The failure threshold.
* @member {number} [livenessProbe.successThreshold] The success threshold.
* @member {number} [livenessProbe.timeoutSeconds] The timeout seconds.
* @member {object} [readinessProbe] The readiness probe.
* @member {object} [readinessProbe.exec] The execution command to probe
* @member {array} [readinessProbe.exec.command] The commands to execute
* within the container.
* @member {object} [readinessProbe.httpGet] The Http Get settings to probe
* @member {string} [readinessProbe.httpGet.path] The path to probe.
* @member {number} [readinessProbe.httpGet.port] The port number to probe.
* @member {string} [readinessProbe.httpGet.scheme] The scheme. Possible
* values include: 'http', 'https'
* @member {number} [readinessProbe.initialDelaySeconds] The initial delay
* seconds.
* @member {number} [readinessProbe.periodSeconds] The period seconds.
* @member {number} [readinessProbe.failureThreshold] The failure threshold.
* @member {number} [readinessProbe.successThreshold] The success threshold.
* @member {number} [readinessProbe.timeoutSeconds] The timeout seconds.
*/
constructor() {
}
Expand Down Expand Up @@ -180,6 +210,22 @@ class Container {
}
}
}
},
livenessProbe: {
required: false,
serializedName: 'properties.livenessProbe',
type: {
name: 'Composite',
className: 'ContainerProbe'
}
},
readinessProbe: {
required: false,
serializedName: 'properties.readinessProbe',
type: {
name: 'Composite',
className: 'ContainerProbe'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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.
*/

'use strict';

/**
* The container execution command, for liveness or readiness probe
*
*/
class ContainerExec {
/**
* Create a ContainerExec.
* @member {array} [command] The commands to execute within the container.
*/
constructor() {
}

/**
* Defines the metadata of ContainerExec
*
* @returns {object} metadata of ContainerExec
*
*/
mapper() {
return {
required: false,
serializedName: 'ContainerExec',
type: {
name: 'Composite',
className: 'ContainerExec',
modelProperties: {
command: {
required: false,
serializedName: 'command',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}

module.exports = ContainerExec;
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* 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.
*/

'use strict';

const models = require('./index');

/**
* The start container exec request.
*
*/
class ContainerExecRequest {
/**
* Create a ContainerExecRequest.
* @member {string} [command] The command to be executed.
* @member {object} [terminalSize] The size of the terminal.
* @member {number} [terminalSize.row] The row size of the terminal
* @member {number} [terminalSize.column] The column size of the terminal
*/
constructor() {
}

/**
* Defines the metadata of ContainerExecRequest
*
* @returns {object} metadata of ContainerExecRequest
*
*/
mapper() {
return {
required: false,
serializedName: 'ContainerExecRequest',
type: {
name: 'Composite',
className: 'ContainerExecRequest',
modelProperties: {
command: {
required: false,
serializedName: 'command',
type: {
name: 'String'
}
},
terminalSize: {
required: false,
serializedName: 'terminalSize',
type: {
name: 'Composite',
className: 'ContainerExecRequestTerminalSize'
}
}
}
}
};
}
}

module.exports = ContainerExecRequest;
Loading