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

[AutoPR] automation/resource-manager #2483

Merged
7 commits merged into from
Mar 28, 2018
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
2 changes: 2 additions & 0 deletions codegen_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"automation": {
"resource-manager": {
"packageName": "azure-arm-automation",
"packageVersion": "3.0.0-preview",
"generateReadmeMd": true,
"dir": "automationManagement",
"source": "automation/resource-manager/readme.md"
}
Expand Down
4 changes: 2 additions & 2 deletions lib/services/automationManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft
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
Expand All @@ -18,4 +18,4 @@ 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.
SOFTWARE.
49 changes: 23 additions & 26 deletions lib/services/automationManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Microsoft Azure SDK for Node.js - AutomationManagement

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

## Features

Expand All @@ -12,29 +11,27 @@ This project provides a Node.js package for accessing Azure. Right now it suppor
npm install azure-arm-automation
```

## How to Use

### Authentication, client creation and listing automation accounts as an example

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

// 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 AutomationManagement(credentials, 'your-subscription-id');
client.automationAccounts.listByResourceGroup('test-rg').then((automationAccounts) => {
console.log('List of Automation Accounts:');
console.dir(automationAccounts, {depth: null, colors: true});
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
```
## How to use

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

```javascript
const msRestAzure = require("ms-rest-azure");
const AutomationClient = require("azure-arm-automation");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new AutomationClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const automationAccountName = "testautomationAccountName";
return client.automationAccount.get(resourceGroupName, automationAccountName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).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)
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
21 changes: 14 additions & 7 deletions lib/services/automationManagement/lib/automationClient.d.ts
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 AutomationClient extends AzureServiceClient {
export default class AutomationClient extends AzureServiceClient {
/**
* Initializes a new instance of the AutomationClient class.
* @constructor
Expand Down Expand Up @@ -44,8 +45,6 @@ declare class AutomationClient extends AzureServiceClient {

credentials: ServiceClientCredentials;

apiVersion: string;

subscriptionId: string;

acceptLanguage: string;
Expand All @@ -59,31 +58,39 @@ declare class AutomationClient extends AzureServiceClient {
operations: operations.Operations;
statisticsOperations: operations.StatisticsOperations;
usages: operations.Usages;
keys: operations.Keys;
certificateOperations: operations.CertificateOperations;
connectionOperations: operations.ConnectionOperations;
connectionTypeOperations: operations.ConnectionTypeOperations;
credentialOperations: operations.CredentialOperations;
dscCompilationJobOperations: operations.DscCompilationJobOperations;
dscCompilationJobStream: operations.DscCompilationJobStream;
dscConfigurationOperations: operations.DscConfigurationOperations;
agentRegistrationInformation: operations.AgentRegistrationInformation;
dscNodeOperations: operations.DscNodeOperations;
nodeReports: operations.NodeReports;
dscNodeConfigurationOperations: operations.DscNodeConfigurationOperations;
hybridRunbookWorkerGroupOperations: operations.HybridRunbookWorkerGroupOperations;
jobOperations: operations.JobOperations;
jobStreamOperations: operations.JobStreamOperations;
jobScheduleOperations: operations.JobScheduleOperations;
linkedWorkspaceOperations: operations.LinkedWorkspaceOperations;
activityOperations: operations.ActivityOperations;
moduleOperations: operations.ModuleOperations;
objectDataTypes: operations.ObjectDataTypes;
fields: operations.Fields;
runbookDraftOperations: operations.RunbookDraftOperations;
runbookOperations: operations.RunbookOperations;
testJobStreams: operations.TestJobStreams;
testJobs: operations.TestJobs;
testJobOperations: operations.TestJobOperations;
scheduleOperations: operations.ScheduleOperations;
variableOperations: operations.VariableOperations;
webhookOperations: operations.WebhookOperations;
softwareUpdateConfigurations: operations.SoftwareUpdateConfigurations;
softwareUpdateConfigurationRuns: operations.SoftwareUpdateConfigurationRuns;
softwareUpdateConfigurationMachineRuns: operations.SoftwareUpdateConfigurationMachineRuns;
sourceControlOperations: operations.SourceControlOperations;
sourceControlSyncJobOperations: operations.SourceControlSyncJobOperations;
jobOperations: operations.JobOperations;
jobStreamOperations: operations.JobStreamOperations;
}

export = AutomationClient;
export { AutomationClient, models as AutomationModels };
18 changes: 14 additions & 4 deletions lib/services/automationManagement/lib/automationClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class AutomationClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2015-10-31';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -76,35 +75,46 @@ class AutomationClient extends ServiceClient {
this.operations = new operations.Operations(this);
this.statisticsOperations = new operations.StatisticsOperations(this);
this.usages = new operations.Usages(this);
this.keys = new operations.Keys(this);
this.certificateOperations = new operations.CertificateOperations(this);
this.connectionOperations = new operations.ConnectionOperations(this);
this.connectionTypeOperations = new operations.ConnectionTypeOperations(this);
this.credentialOperations = new operations.CredentialOperations(this);
this.dscCompilationJobOperations = new operations.DscCompilationJobOperations(this);
this.dscCompilationJobStream = new operations.DscCompilationJobStream(this);
this.dscConfigurationOperations = new operations.DscConfigurationOperations(this);
this.agentRegistrationInformation = new operations.AgentRegistrationInformation(this);
this.dscNodeOperations = new operations.DscNodeOperations(this);
this.nodeReports = new operations.NodeReports(this);
this.dscNodeConfigurationOperations = new operations.DscNodeConfigurationOperations(this);
this.hybridRunbookWorkerGroupOperations = new operations.HybridRunbookWorkerGroupOperations(this);
this.jobOperations = new operations.JobOperations(this);
this.jobStreamOperations = new operations.JobStreamOperations(this);
this.jobScheduleOperations = new operations.JobScheduleOperations(this);
this.linkedWorkspaceOperations = new operations.LinkedWorkspaceOperations(this);
this.activityOperations = new operations.ActivityOperations(this);
this.moduleOperations = new operations.ModuleOperations(this);
this.objectDataTypes = new operations.ObjectDataTypes(this);
this.fields = new operations.Fields(this);
this.runbookDraftOperations = new operations.RunbookDraftOperations(this);
this.runbookOperations = new operations.RunbookOperations(this);
this.testJobStreams = new operations.TestJobStreams(this);
this.testJobs = new operations.TestJobs(this);
this.testJobOperations = new operations.TestJobOperations(this);
this.scheduleOperations = new operations.ScheduleOperations(this);
this.variableOperations = new operations.VariableOperations(this);
this.webhookOperations = new operations.WebhookOperations(this);
this.softwareUpdateConfigurations = new operations.SoftwareUpdateConfigurations(this);
this.softwareUpdateConfigurationRuns = new operations.SoftwareUpdateConfigurationRuns(this);
this.softwareUpdateConfigurationMachineRuns = new operations.SoftwareUpdateConfigurationMachineRuns(this);
this.sourceControlOperations = new operations.SourceControlOperations(this);
this.sourceControlSyncJobOperations = new operations.SourceControlSyncJobOperations(this);
this.jobOperations = new operations.JobOperations(this);
this.jobStreamOperations = new operations.JobStreamOperations(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = AutomationClient;
module.exports['default'] = AutomationClient;
module.exports.AutomationClient = AutomationClient;
module.exports.AutomationModels = models;
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AgentRegistrationRegenerateKeyParameter {
/**
* Create a AgentRegistrationRegenerateKeyParameter.
* @member {string} keyName Gets or sets the agent registration key name -
* Primary or Secondary. Possible values include: 'Primary', 'Secondary'
* primary or secondary. Possible values include: 'primary', 'secondary'
* @member {string} [name] Gets or sets the name of the resource.
* @member {string} [location] Gets or sets the location of the resource.
* @member {object} [tags] Gets or sets the tags attached to the resource.
Expand Down
15 changes: 14 additions & 1 deletion lib/services/automationManagement/lib/models/certificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@

'use strict';

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

/**
* Definition of the certificate.
*
* @extends models['BaseResource']
*/
class Certificate {
class Certificate extends models['BaseResource'] {
/**
* Create a Certificate.
* @member {string} [id] Gets the id of the resource.
* @member {string} [name] Gets the name of the certificate.
* @member {string} [type] Resource type
* @member {string} [thumbprint] Gets the thumbprint of the certificate.
* @member {date} [expiryTime] Gets the expiry time of the certificate.
* @member {boolean} [isExportable] Gets the is exportable flag of the
Expand All @@ -28,6 +32,7 @@ class Certificate {
* @member {string} [description] Gets or sets the description.
*/
constructor() {
super();
}

/**
Expand Down Expand Up @@ -60,6 +65,14 @@ class Certificate {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
thumbprint: {
required: false,
readOnly: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class CertificateUpdateParameters {
/**
* Create a CertificateUpdateParameters.
* @member {string} name Gets or sets the name of the certificate.
* @member {string} [name] Gets or sets the name of the certificate.
* @member {string} [description] Gets or sets the description of the
* certificate.
*/
Expand All @@ -39,7 +39,7 @@ class CertificateUpdateParameters {
className: 'CertificateUpdateParameters',
modelProperties: {
name: {
required: true,
required: false,
serializedName: 'name',
type: {
name: 'String'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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';

/**
* object returned when requesting a collection of software update
* configuration
*
*/
class CollectionItemUpdateConfiguration {
/**
* Create a CollectionItemUpdateConfiguration.
* @member {array} [azureVirtualMachines] List of azure resource Ids for
* azure virtual machines targeted by the software update configuration.
* @member {moment.duration} [duration] Maximum time allowed for the software
* update configuration run. Duration needs to be specified using the format
* PT[n]H[n]M[n]S as per ISO8601
*/
constructor() {
}

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

module.exports = CollectionItemUpdateConfiguration;
13 changes: 12 additions & 1 deletion lib/services/automationManagement/lib/models/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ const models = require('./index');
/**
* Definition of the connection.
*
* @extends models['BaseResource']
*/
class Connection {
class Connection extends models['BaseResource'] {
/**
* Create a Connection.
* @member {string} [id] Gets the id of the resource.
* @member {string} [name] Gets the name of the connection.
* @member {string} [type] Resource type
* @member {object} [connectionType] Gets or sets the connectionType of the
* connection.
* @member {string} [connectionType.name] Gets or sets the name of the
Expand All @@ -32,6 +34,7 @@ class Connection {
* @member {string} [description] Gets or sets the description.
*/
constructor() {
super();
}

/**
Expand Down Expand Up @@ -64,6 +67,14 @@ class Connection {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
connectionType: {
required: false,
serializedName: 'properties.connectionType',
Expand Down
Loading