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

[AutoPR automation/resource-manager] Automation for Python #2304

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
2 changes: 1 addition & 1 deletion sdk/automation/arm-automation/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
11 changes: 4 additions & 7 deletions sdk/automation/arm-automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for AutomationClient.

### How to Install

```
```bash
npm install @azure/arm-automation
```

Expand All @@ -19,13 +19,13 @@ npm install @azure/arm-automation

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

```
```bash
npm install @azure/ms-rest-nodeauth
```

##### Sample code

```ts
```typescript
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";
Expand All @@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {

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

```
```bash
npm install @azure/ms-rest-browserauth
```

Expand Down Expand Up @@ -98,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
## Related projects

- [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/sdk/automation/arm-automation/README.png)
125 changes: 125 additions & 0 deletions sdk/automation/arm-automation/lib/automationClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/*
* 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 { AutomationClientContext } from "./automationClientContext";


class AutomationClient extends AutomationClientContext {
// Operation groups
automationAccount: operations.AutomationAccountOperations;
operations: operations.Operations;
statistics: operations.StatisticsOperations;
usages: operations.Usages;
keys: operations.Keys;
certificate: operations.CertificateOperations;
connection: operations.ConnectionOperations;
connectionType: operations.ConnectionTypeOperations;
credential: operations.CredentialOperations;
dscConfiguration: operations.DscConfigurationOperations;
hybridRunbookWorkerGroup: operations.HybridRunbookWorkerGroupOperations;
jobSchedule: operations.JobScheduleOperations;
linkedWorkspace: operations.LinkedWorkspaceOperations;
activity: operations.ActivityOperations;
module: operations.ModuleOperations;
objectDataTypes: operations.ObjectDataTypes;
fields: operations.Fields;
schedule: operations.ScheduleOperations;
variable: operations.VariableOperations;
webhook: operations.WebhookOperations;
watcher: operations.WatcherOperations;
softwareUpdateConfigurations: operations.SoftwareUpdateConfigurations;
softwareUpdateConfigurationRuns: operations.SoftwareUpdateConfigurationRuns;
softwareUpdateConfigurationMachineRuns: operations.SoftwareUpdateConfigurationMachineRuns;
sourceControl: operations.SourceControlOperations;
sourceControlSyncJob: operations.SourceControlSyncJobOperations;
sourceControlSyncJobStreams: operations.SourceControlSyncJobStreams;
job: operations.JobOperations;
jobStream: operations.JobStreamOperations;
agentRegistrationInformation: operations.AgentRegistrationInformation;
dscNode: operations.DscNodeOperations;
nodeReports: operations.NodeReports;
dscCompilationJob: operations.DscCompilationJobOperations;
dscCompilationJobStream: operations.DscCompilationJobStream;
dscNodeConfiguration: operations.DscNodeConfigurationOperations;
nodeCountInformation: operations.NodeCountInformation;
runbookDraft: operations.RunbookDraftOperations;
runbook: operations.RunbookOperations;
testJobStreams: operations.TestJobStreams;
testJob: operations.TestJobOperations;
python2Package: operations.Python2Package;

/**
* Initializes a new instance of the AutomationClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
* subscription. The subscription ID forms part of the URI for every service call.
* @param countType1 The type of counts to retrieve. Possible values include: 'status',
* 'nodeconfiguration'
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, countType1: Models.CountType, options?: Models.AutomationClientOptions) {
super(credentials, subscriptionId, countType1, options);
this.automationAccount = new operations.AutomationAccountOperations(this);
this.operations = new operations.Operations(this);
this.statistics = new operations.StatisticsOperations(this);
this.usages = new operations.Usages(this);
this.keys = new operations.Keys(this);
this.certificate = new operations.CertificateOperations(this);
this.connection = new operations.ConnectionOperations(this);
this.connectionType = new operations.ConnectionTypeOperations(this);
this.credential = new operations.CredentialOperations(this);
this.dscConfiguration = new operations.DscConfigurationOperations(this);
this.hybridRunbookWorkerGroup = new operations.HybridRunbookWorkerGroupOperations(this);
this.jobSchedule = new operations.JobScheduleOperations(this);
this.linkedWorkspace = new operations.LinkedWorkspaceOperations(this);
this.activity = new operations.ActivityOperations(this);
this.module = new operations.ModuleOperations(this);
this.objectDataTypes = new operations.ObjectDataTypes(this);
this.fields = new operations.Fields(this);
this.schedule = new operations.ScheduleOperations(this);
this.variable = new operations.VariableOperations(this);
this.webhook = new operations.WebhookOperations(this);
this.watcher = new operations.WatcherOperations(this);
this.softwareUpdateConfigurations = new operations.SoftwareUpdateConfigurations(this);
this.softwareUpdateConfigurationRuns = new operations.SoftwareUpdateConfigurationRuns(this);
this.softwareUpdateConfigurationMachineRuns = new operations.SoftwareUpdateConfigurationMachineRuns(this);
this.sourceControl = new operations.SourceControlOperations(this);
this.sourceControlSyncJob = new operations.SourceControlSyncJobOperations(this);
this.sourceControlSyncJobStreams = new operations.SourceControlSyncJobStreams(this);
this.job = new operations.JobOperations(this);
this.jobStream = new operations.JobStreamOperations(this);
this.agentRegistrationInformation = new operations.AgentRegistrationInformation(this);
this.dscNode = new operations.DscNodeOperations(this);
this.nodeReports = new operations.NodeReports(this);
this.dscCompilationJob = new operations.DscCompilationJobOperations(this);
this.dscCompilationJobStream = new operations.DscCompilationJobStream(this);
this.dscNodeConfiguration = new operations.DscNodeConfigurationOperations(this);
this.nodeCountInformation = new operations.NodeCountInformation(this);
this.runbookDraft = new operations.RunbookDraftOperations(this);
this.runbook = new operations.RunbookOperations(this);
this.testJobStreams = new operations.TestJobStreams(this);
this.testJob = new operations.TestJobOperations(this);
this.python2Package = new operations.Python2Package(this);
}
}

// Operation Specifications

export {
AutomationClient,
AutomationClientContext,
Models as AutomationModels,
Mappers as AutomationMappers
};
export * from "./operations";
68 changes: 68 additions & 0 deletions sdk/automation/arm-automation/lib/automationClientContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* 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 Models from "./models";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-automation";
const packageVersion = "9.1.0";

export class AutomationClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
countType1: Models.CountType;

/**
* Initializes a new instance of the AutomationClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
* subscription. The subscription ID forms part of the URI for every service call.
* @param countType1 The type of counts to retrieve. Possible values include: 'status',
* 'nodeconfiguration'
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, countType1: Models.CountType, options?: Models.AutomationClientOptions) {
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId == undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}
if (countType1 == undefined) {
throw new Error('\'countType1\' cannot be null.');
}

if (!options) {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
this.subscriptionId = subscriptionId;
this.countType1 = countType1;

if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/

export {
Activity,
ActivityParameterSet,
ActivityParameter,
ActivityParameterValidationSet,
ActivityOutputType,
ErrorResponse,
ActivityListResult
} from "../models/mappers";

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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.
*/

export {
AgentRegistration,
AgentRegistrationKeys,
ErrorResponse,
AgentRegistrationRegenerateKeyParameter
} from "../models/mappers";

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* 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.
*/

export {
AutomationAccountUpdateParameters,
Sku,
AutomationAccount,
TrackedResource,
Resource,
BaseResource,
ErrorResponse,
AutomationAccountCreateOrUpdateParameters,
AutomationAccountListResult,
ProxyResource,
Certificate,
Connection,
ConnectionTypeAssociationProperty,
Credential,
DscConfiguration,
DscConfigurationParameter,
ContentSource,
ContentHash,
Module,
ContentLink,
ModuleErrorInfo,
Schedule,
AdvancedSchedule,
AdvancedScheduleMonthlyOccurrence,
Variable,
Webhook,
RunbookAssociationProperty,
Watcher,
SoftwareUpdateConfiguration,
UpdateConfiguration,
WindowsProperties,
LinuxProperties,
TargetProperties,
AzureQueryProperties,
TagSettingsProperties,
NonAzureQueryProperties,
ScheduleProperties,
SoftwareUpdateConfigurationTasks,
TaskProperties,
SourceControl,
Job,
JobCollectionItem,
DscNode,
DscNodeExtensionHandlerAssociationProperty,
DscCompilationJob,
DscConfigurationAssociationProperty,
DscNodeConfiguration,
Runbook,
RunbookParameter,
RunbookDraft
} from "../models/mappers";

Loading