Skip to content

Commit

Permalink
Generated from f8f9d9560e3772c360a6e883516bb7691156691c
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Nov 2, 2020
1 parent b853e0d commit f77332a
Show file tree
Hide file tree
Showing 24 changed files with 1,560 additions and 3,699 deletions.
15 changes: 7 additions & 8 deletions sdk/containerservice/arm-containerservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-containerservice

### How to use

#### nodejs - Authentication, client creation and list openShiftManagedClusters as an example written in TypeScript.
#### nodejs - client creation and list operations as an example written in TypeScript.

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

Expand All @@ -26,16 +26,15 @@ 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 { ContainerServiceClient, ContainerServiceModels, ContainerServiceMappers } from "@azure/arm-containerservice";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ContainerServiceClient(creds, subscriptionId);
client.openShiftManagedClusters.list().then((result) => {
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -44,7 +43,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and list openShiftManagedClusters as an example written in JavaScript.
#### browser - Authentication, client creation and list operations as an example written in JavaScript.

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

Expand Down Expand Up @@ -78,7 +77,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
authManager.login();
}
const client = new Azure.ArmContainerservice.ContainerServiceClient(res.creds, subscriptionId);
client.openShiftManagedClusters.list().then((result) => {
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/containerservice/arm-containerservice/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
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,12 +16,12 @@ import { ContainerServiceClientContext } from "./containerServiceClientContext";

class ContainerServiceClient extends ContainerServiceClientContext {
// Operation groups
openShiftManagedClusters: operations.OpenShiftManagedClusters;
containerServices: operations.ContainerServices;
operations: operations.Operations;
managedClusters: operations.ManagedClusters;
agentPools: operations.AgentPools;
privateEndpointConnections: operations.PrivateEndpointConnections;
privateLinkResources: operations.PrivateLinkResources;
resolvePrivateLinkServiceId: operations.ResolvePrivateLinkServiceId;

/**
* Initializes a new instance of the ContainerServiceClient class.
Expand All @@ -33,12 +32,12 @@ class ContainerServiceClient extends ContainerServiceClientContext {
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ContainerServiceClientOptions) {
super(credentials, subscriptionId, options);
this.openShiftManagedClusters = new operations.OpenShiftManagedClusters(this);
this.containerServices = new operations.ContainerServices(this);
this.operations = new operations.Operations(this);
this.managedClusters = new operations.ManagedClusters(this);
this.agentPools = new operations.AgentPools(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
this.privateLinkResources = new operations.PrivateLinkResources(this);
this.resolvePrivateLinkServiceId = new operations.ResolvePrivateLinkServiceId(this);
}
}

Expand Down
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,6 +17,7 @@ const packageVersion = "11.2.0";
export class ContainerServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;

/**
* Initializes a new instance of the ContainerServiceClient class.
Expand All @@ -37,24 +37,25 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.apiVersion = '2020-11-01';
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;

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,13 +1,12 @@
/*
* 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.
*/

export {
discriminators,
AgentPool,
AgentPoolAvailableVersions,
AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem,
Expand All @@ -17,20 +16,10 @@ export {
AgentPoolUpgradeSettings,
BaseResource,
CloudError,
ContainerService,
ContainerServiceAgentPoolProfile,
ContainerServiceCustomProfile,
ContainerServiceDiagnosticsProfile,
ContainerServiceLinuxProfile,
ContainerServiceMasterProfile,
ContainerServiceNetworkProfile,
ContainerServiceOrchestratorProfile,
ContainerServiceServicePrincipalProfile,
ContainerServiceSshConfiguration,
ContainerServiceSshPublicKey,
ContainerServiceVMDiagnostics,
ContainerServiceWindowsProfile,
KeyVaultSecretRef,
ManagedCluster,
ManagedClusterAADProfile,
ManagedClusterAccessProfile,
Expand All @@ -39,30 +28,26 @@ export {
ManagedClusterAgentPoolProfile,
ManagedClusterAgentPoolProfileProperties,
ManagedClusterAPIServerAccessProfile,
ManagedClusterAutoUpgradeProfile,
ManagedClusterIdentity,
ManagedClusterIdentityUserAssignedIdentitiesValue,
ManagedClusterLoadBalancerProfile,
ManagedClusterLoadBalancerProfileManagedOutboundIPs,
ManagedClusterLoadBalancerProfileOutboundIPPrefixes,
ManagedClusterLoadBalancerProfileOutboundIPs,
ManagedClusterPodIdentity,
ManagedClusterPodIdentityException,
ManagedClusterPodIdentityProfile,
ManagedClusterPodIdentityProvisioningInfo,
ManagedClusterPropertiesAutoScalerProfile,
ManagedClusterPropertiesIdentityProfileValue,
ManagedClusterServicePrincipalProfile,
ManagedClusterSKU,
ManagedClusterWindowsProfile,
NetworkProfile,
OpenShiftManagedCluster,
OpenShiftManagedClusterAADIdentityProvider,
OpenShiftManagedClusterAgentPoolProfile,
OpenShiftManagedClusterAuthProfile,
OpenShiftManagedClusterBaseIdentityProvider,
OpenShiftManagedClusterIdentityProvider,
OpenShiftManagedClusterMasterPoolProfile,
OpenShiftRouterProfile,
PowerState,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkServiceConnectionState,
PurchasePlan,
Resource,
ResourceReference,
SubResource,
Expand Down

This file was deleted.

Loading

0 comments on commit f77332a

Please sign in to comment.