Skip to content
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
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) 2020 Microsoft
Copyright (c) 2021 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
15 changes: 7 additions & 8 deletions sdk/automation/arm-automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-automation

### How to use

#### nodejs - Authentication, client creation and get automationAccount as an example written in TypeScript.
#### nodejs - client creation and listByAutomationAccount privateEndpointConnections as an example written in TypeScript.

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

Expand All @@ -26,18 +26,17 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```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";
import { AutomationClient, AutomationModels, AutomationMappers } from "@azure/arm-automation";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AutomationClient } = require("@azure/arm-automation");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new AutomationClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const automationAccountName = "testautomationAccountName";
client.automationAccount.get(resourceGroupName, automationAccountName).then((result) => {
client.privateEndpointConnections.listByAutomationAccount(resourceGroupName, automationAccountName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -46,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get automationAccount as an example written in JavaScript.
#### browser - Authentication, client creation and listByAutomationAccount privateEndpointConnections as an example written in JavaScript.

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

Expand Down Expand Up @@ -82,7 +81,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
const client = new Azure.ArmAutomation.AutomationClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const automationAccountName = "testautomationAccountName";
client.automationAccount.get(resourceGroupName, automationAccountName).then((result) => {
client.privateEndpointConnections.listByAutomationAccount(resourceGroupName, automationAccountName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/automation/arm-automation/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
81 changes: 40 additions & 41 deletions sdk/automation/arm-automation/src/automationClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand All @@ -17,16 +16,27 @@ import { AutomationClientContext } from "./automationClientContext";

class AutomationClient extends AutomationClientContext {
// Operation groups
privateEndpointConnections: operations.PrivateEndpointConnections;
privateLinkResources: operations.PrivateLinkResources;
python2Package: operations.Python2Package;
agentRegistrationInformation: operations.AgentRegistrationInformation;
dscNode: operations.DscNodeOperations;
nodeReports: operations.NodeReports;
dscNodeConfiguration: operations.DscNodeConfigurationOperations;
dscCompilationJob: operations.DscCompilationJobOperations;
dscCompilationJobStream: operations.DscCompilationJobStream;
nodeCountInformation: operations.NodeCountInformation;
sourceControl: operations.SourceControlOperations;
sourceControlSyncJob: operations.SourceControlSyncJobOperations;
sourceControlSyncJobStreams: operations.SourceControlSyncJobStreams;
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;
Expand All @@ -36,50 +46,49 @@ class AutomationClient extends AutomationClientContext {
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;
dscConfiguration: operations.DscConfigurationOperations;
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;
operations: operations.Operations;
runbookDraft: operations.RunbookDraftOperations;
runbook: operations.RunbookOperations;
testJobStreams: operations.TestJobStreams;
testJob: operations.TestJobOperations;
python2Package: operations.Python2Package;
softwareUpdateConfigurationRuns: operations.SoftwareUpdateConfigurationRuns;
softwareUpdateConfigurationMachineRuns: operations.SoftwareUpdateConfigurationMachineRuns;
webhook: operations.WebhookOperations;

/**
* 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);
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AutomationClientOptions) {
super(credentials, subscriptionId, options);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
this.privateLinkResources = new operations.PrivateLinkResources(this);
this.python2Package = new operations.Python2Package(this);
this.agentRegistrationInformation = new operations.AgentRegistrationInformation(this);
this.dscNode = new operations.DscNodeOperations(this);
this.nodeReports = new operations.NodeReports(this);
this.dscNodeConfiguration = new operations.DscNodeConfigurationOperations(this);
this.dscCompilationJob = new operations.DscCompilationJobOperations(this);
this.dscCompilationJobStream = new operations.DscCompilationJobStream(this);
this.nodeCountInformation = new operations.NodeCountInformation(this);
this.sourceControl = new operations.SourceControlOperations(this);
this.sourceControlSyncJob = new operations.SourceControlSyncJobOperations(this);
this.sourceControlSyncJobStreams = new operations.SourceControlSyncJobStreams(this);
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);
Expand All @@ -89,28 +98,18 @@ class AutomationClient extends AutomationClientContext {
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.dscConfiguration = new operations.DscConfigurationOperations(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.operations = new operations.Operations(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);
this.softwareUpdateConfigurationRuns = new operations.SoftwareUpdateConfigurationRuns(this);
this.softwareUpdateConfigurationMachineRuns = new operations.SoftwareUpdateConfigurationMachineRuns(this);
this.webhook = new operations.WebhookOperations(this);
}
}

Expand Down
14 changes: 3 additions & 11 deletions sdk/automation/arm-automation/src/automationClientContext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand All @@ -18,27 +17,21 @@ const packageVersion = "10.0.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) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, 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 = {};
Expand All @@ -56,7 +49,6 @@ export class AutomationClientContext extends msRestAzure.AzureServiceClient {
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -13,7 +13,6 @@ export {
AutomationAccountCreateOrUpdateParameters,
AutomationAccountListResult,
AutomationAccountUpdateParameters,
AzureQueryProperties,
BaseResource,
Certificate,
Connection,
Expand All @@ -29,32 +28,29 @@ export {
DscNode,
DscNodeConfiguration,
DscNodeExtensionHandlerAssociationProperty,
EncryptionProperties,
ErrorResponse,
Identity,
Job,
JobCollectionItem,
LinuxProperties,
KeyVaultProperties,
Module,
ModuleErrorInfo,
NonAzureQueryProperties,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
Resource,
Runbook,
RunbookAssociationProperty,
RunbookDraft,
RunbookParameter,
Schedule,
ScheduleProperties,
Sku,
SoftwareUpdateConfiguration,
SoftwareUpdateConfigurationTasks,
SourceControl,
TagSettingsProperties,
TargetProperties,
TaskProperties,
TrackedResource,
UpdateConfiguration,
Variable,
Watcher,
Webhook,
WindowsProperties
Webhook
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -10,7 +10,6 @@ export {
AdvancedSchedule,
AdvancedScheduleMonthlyOccurrence,
AutomationAccount,
AzureQueryProperties,
BaseResource,
Certificate,
CertificateCreateOrUpdateParameters,
Expand All @@ -29,32 +28,29 @@ export {
DscNode,
DscNodeConfiguration,
DscNodeExtensionHandlerAssociationProperty,
EncryptionProperties,
ErrorResponse,
Identity,
Job,
JobCollectionItem,
LinuxProperties,
KeyVaultProperties,
Module,
ModuleErrorInfo,
NonAzureQueryProperties,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
Resource,
Runbook,
RunbookAssociationProperty,
RunbookDraft,
RunbookParameter,
Schedule,
ScheduleProperties,
Sku,
SoftwareUpdateConfiguration,
SoftwareUpdateConfigurationTasks,
SourceControl,
TagSettingsProperties,
TargetProperties,
TaskProperties,
TrackedResource,
UpdateConfiguration,
Variable,
Watcher,
Webhook,
WindowsProperties
Webhook
} from "../models/mappers";
Loading