Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
42 changes: 21 additions & 21 deletions lib/services/containerRegistryManagement/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.
83 changes: 42 additions & 41 deletions lib/services/containerRegistryManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
# Microsoft Azure SDK for Node.js - ContainerRegistryManagement

This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version: 6.x.x or higher**
- **API version: 2017-03-01**

## Features


## How to Install

```bash
npm install azure-arm-containerregistry
```

## How to Use

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

```javascript
const msRestAzure = require('ms-rest-azure');
const ContainerRegistryManagement = require("azure-arm-containerregistry");

// 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().then((credentials) => {
let client = new ContainerRegistryManagement(credentials, 'your-subscription-id');
client.registries.list().then((registries) => {
console.log('List of registries:');
console.dir(registries, {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-containerregistry
summary: *content

---
# Microsoft Azure SDK for Node.js - ContainerRegistryManagementClient
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-containerregistry
```

## How to use

### Authentication, client creation and get registries as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const ContainerRegistryManagementClient = require("azure-arm-containerregistry");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ContainerRegistryManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const registryName = "testregistryName";
return client.registries.get(resourceGroupName, registryName).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)
21 changes: 21 additions & 0 deletions lib/services/containerRegistryManagement/lib/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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.
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 ContainerRegistryManagementClient extends AzureServiceClient {
export default class ContainerRegistryManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the ContainerRegistryManagementClient class.
* @constructor
Expand Down Expand Up @@ -46,8 +47,6 @@ declare class ContainerRegistryManagementClient extends AzureServiceClient {

subscriptionId: string;

apiVersion: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;
Expand All @@ -59,6 +58,9 @@ declare class ContainerRegistryManagementClient extends AzureServiceClient {
operations: operations.Operations;
replications: operations.Replications;
webhooks: operations.Webhooks;
builds: operations.Builds;
buildSteps: operations.BuildSteps;
buildTasks: operations.BuildTasks;
}

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

super(credentials, options);

this.apiVersion = '2017-10-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -76,10 +75,16 @@ class ContainerRegistryManagementClient extends ServiceClient {
this.operations = new operations.Operations(this);
this.replications = new operations.Replications(this);
this.webhooks = new operations.Webhooks(this);
this.builds = new operations.Builds(this);
this.buildSteps = new operations.BuildSteps(this);
this.buildTasks = new operations.BuildTasks(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = ContainerRegistryManagementClient;
module.exports['default'] = ContainerRegistryManagementClient;
module.exports.ContainerRegistryManagementClient = ContainerRegistryManagementClient;
module.exports.ContainerRegistryManagementModels = models;
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.
*/

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

export default class ContainerRegistryManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the ContainerRegistryManagementClient class.
* @constructor
*
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - The Microsoft Azure subscription ID.
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);

credentials: ServiceClientCredentials;

subscriptionId: string;

apiVersion: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;

generateClientRequestId: boolean;

// Operation groups
registries: operations.Registries;
operations: operations.Operations;
replications: operations.Replications;
webhooks: operations.Webhooks;
}

export { ContainerRegistryManagementClient, models as ContainerRegistryManagementModels };
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* 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.
*/

/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

const msRest = require('ms-rest');
const msRestAzure = require('ms-rest-azure');
const ServiceClient = msRestAzure.AzureServiceClient;

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


/** Class representing a ContainerRegistryManagementClient. */
class ContainerRegistryManagementClient extends ServiceClient {
/**
* Create a ContainerRegistryManagementClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {string} subscriptionId - The Microsoft Azure subscription ID.
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId === null || subscriptionId === undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}

if (!options) options = {};

super(credentials, options);

this.apiVersion = '2017-10-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'https://management.azure.com';
}
this.credentials = credentials;
this.subscriptionId = subscriptionId;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.registries = new operations.Registries(this);
this.operations = new operations.Operations(this);
this.replications = new operations.Replications(this);
this.webhooks = new operations.Webhooks(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = ContainerRegistryManagementClient;
module.exports['default'] = ContainerRegistryManagementClient;
module.exports.ContainerRegistryManagementClient = ContainerRegistryManagementClient;
module.exports.ContainerRegistryManagementModels = models;
Loading