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

[ReleasePR @azure/arm-automation] [Python] track2 config #16014

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
16 changes: 7 additions & 9 deletions sdk/automation/arm-automation/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Azure AutomationClient SDK for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AutomationClient.
This package contains an isomorphic SDK (runs both in node.js and in browsers) for AutomationClient.

### Currently supported environments

- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge, and Firefox.
- Latest versions of Safari, Chrome, Edge and Firefox.

### Prerequisites

Expand All @@ -21,7 +21,6 @@ Install both packages using the below command:
```bash
npm install --save @azure/arm-automation @azure/identity
```

> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.

Expand All @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/

In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.

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

##### Sample code

Expand All @@ -53,7 +51,7 @@ const creds = new DefaultAzureCredential();
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);
}).catch((err) => {
Expand All @@ -62,7 +60,7 @@ client.automationAccount.get(resourceGroupName, automationAccountName).then((res
});
```

#### 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.

In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
Expand All @@ -87,12 +85,12 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
const credential = new InteractiveBrowserCredential(
{
clientId: "<client id for your Azure AD app>",
tenantId: "<optional tenant for your organization>"
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmAutomation.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);
}).catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion sdk/automation/arm-automation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/automation/arm-automation",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/automation/arm-automation",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
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
79 changes: 40 additions & 39 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 @@ -18,16 +17,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 @@ -37,28 +47,19 @@ class AutomationClient extends AutomationClientContext {
fields: operations.Fields;
schedule: operations.ScheduleOperations;
variable: operations.VariableOperations;
webhook: operations.WebhookOperations;
watcher: operations.WatcherOperations;
dscConfiguration: operations.DscConfigurationOperations;
job: operations.JobOperations;
jobStream: operations.JobStreamOperations;
operations: operations.Operations;
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;
webhook: operations.WebhookOperations;

/**
* Initializes a new instance of the AutomationClient class.
Expand All @@ -70,22 +71,31 @@ class AutomationClient extends AutomationClientContext {
* @azure/ms-rest-browserauth are also supported.
* @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 | TokenCredential, subscriptionId: string, countType1: Models.CountType, options?: Models.AutomationClientOptions) {
super(credentials, subscriptionId, countType1, options);
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, 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 @@ -95,28 +105,19 @@ 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.dscConfiguration = new operations.DscConfigurationOperations(this);
this.job = new operations.JobOperations(this);
this.jobStream = new operations.JobStreamOperations(this);
this.operations = new operations.Operations(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);
this.webhook = new operations.WebhookOperations(this);
}
}

Expand Down
22 changes: 7 additions & 15 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 @@ -10,16 +9,15 @@

import * as Models from "./models";
import * as msRest from "@azure/ms-rest-js";
import { TokenCredential } from "@azure/core-auth";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import { TokenCredential } from "@azure/core-auth";

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

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

/**
* Initializes a new instance of the AutomationClient class.
Expand All @@ -31,25 +29,20 @@ export class AutomationClientContext extends msRestAzure.AzureServiceClient {
* @azure/ms-rest-browserauth are also supported.
* @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 | TokenCredential, subscriptionId: string, countType1: Models.CountType, options?: Models.AutomationClientOptions) {
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, 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 = {};
}
if(!options.userAgent) {
if (!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
Expand All @@ -62,12 +55,11 @@ 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) {
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
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 Down Expand Up @@ -29,25 +29,34 @@ export {
DscNode,
DscNodeConfiguration,
DscNodeExtensionHandlerAssociationProperty,
EncryptionProperties,
EncryptionPropertiesIdentity,
ErrorResponse,
Identity,
IdentityUserAssignedIdentitiesValue,
Job,
JobCollectionItem,
KeyVaultProperties,
LinuxProperties,
Module,
ModuleErrorInfo,
NonAzureQueryProperties,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
Resource,
Runbook,
RunbookAssociationProperty,
RunbookDraft,
RunbookParameter,
Schedule,
ScheduleProperties,
Sku,
SoftwareUpdateConfiguration,
SoftwareUpdateConfigurationTasks,
SourceControl,
SUCScheduleProperties,
TagSettingsProperties,
TargetProperties,
TaskProperties,
Expand Down
Loading