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 packages/@azure/arm-containerservice/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
20 changes: 8 additions & 12 deletions packages/@azure/arm-containerservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ This package contains an isomorphic SDK for ContainerServiceClient.

### How to Install

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

### How to use

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

##### 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 @@ -34,9 +34,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ContainerServiceClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const resourceName = "testresourceName";
client.openShiftManagedClusters.get(resourceGroupName, resourceName).then((result) => {
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -45,11 +43,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get 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

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

Expand Down Expand Up @@ -79,9 +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);
const resourceGroupName = "testresourceGroupName";
const resourceName = "testresourceName";
client.openShiftManagedClusters.get(resourceGroupName, resourceName).then((result) => {
client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import { ContainerServiceClientContext } from "./containerServiceClientContext";

class ContainerServiceClient extends ContainerServiceClientContext {
// Operation groups
openShiftManagedClusters: operations.OpenShiftManagedClusters;
containerServices: operations.ContainerServices;
operations: operations.Operations;
managedClusters: operations.ManagedClusters;

Expand All @@ -31,8 +29,6 @@ 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const packageVersion = "0.1.0";
export class ContainerServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;

/**
* Initializes a new instance of the ContainerServiceClient class.
Expand All @@ -44,6 +45,7 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien

super(credentials, options);

this.apiVersion = '2019-02-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Loading