Skip to content

Commit 3c6ce1d

Browse files

25 files changed

+605
-87
lines changed

sdk/elastic/arm-elastic/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Release History
22

3+
## 1.0.0-beta.3 (2023-05-15)
4+
5+
**Features**
6+
7+
- Added operation group ElasticVersions
8+
- Added Interface ElasticVersionListFormat
9+
- Added Interface ElasticVersionListProperties
10+
- Added Interface ElasticVersionsListNextOptionalParams
11+
- Added Interface ElasticVersionsListOptionalParams
12+
- Added Interface ElasticVersionsListResponse
13+
- Added Interface UserApiKeyResponseProperties
14+
- Added Type Alias ElasticVersionsListNextResponse
15+
- Added Type Alias ElasticVersionsListOperationResponse
16+
- Interface MonitorProperties has a new optional parameter generateApiKey
17+
- Interface UserApiKeyResponse has a new optional parameter properties
18+
19+
**Breaking Changes**
20+
21+
- Operation Organizations.getApiKey has a new signature
22+
- Interface ElasticMonitorResource no longer has parameter generateApiKey
23+
- Interface UserApiKeyResponse no longer has parameter apiKey
24+
25+
326
## 1.0.0-beta.2 (2023-04-03)
427

528
**Features**

sdk/elastic/arm-elastic/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "9627e7e581c1517585c9f821d89a4903c6514e07",
2+
"commit": "9a20afc353d601769460d42fd13475eecbe61e7d",
33
"readme": "specification/elastic/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elastic\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elastic\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
66
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
7-
"use": "@autorest/typescript@6.0.0-rc.10"
7+
"use": "@autorest/typescript@6.0.1"
88
}

sdk/elastic/arm-elastic/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "js",
44
"TagPrefix": "js/elastic/arm-elastic",
5-
"Tag": "js/elastic/arm-elastic_a57f49477c"
5+
"Tag": "js/elastic/arm-elastic_30c668cbce"
66
}

sdk/elastic/arm-elastic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for MicrosoftElastic.",
6-
"version": "1.0.0-beta.2",
6+
"version": "1.0.0-beta.3",
77
"engines": {
88
"node": ">=14.0.0"
99
},

sdk/elastic/arm-elastic/review/arm-elastic.api.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ export type ElasticDeploymentStatus = string;
144144

145145
// @public
146146
export interface ElasticMonitorResource {
147-
readonly generateApiKey?: boolean;
148147
readonly id?: string;
149148
identity?: IdentityProperties;
150149
location: string;
@@ -207,6 +206,41 @@ export interface ElasticTrafficFilterRule {
207206
source?: string;
208207
}
209208

209+
// @public
210+
export interface ElasticVersionListFormat {
211+
properties?: ElasticVersionListProperties;
212+
}
213+
214+
// @public
215+
export interface ElasticVersionListProperties {
216+
version?: string;
217+
}
218+
219+
// @public
220+
export interface ElasticVersions {
221+
list(region: string, options?: ElasticVersionsListOptionalParams): PagedAsyncIterableIterator<ElasticVersionListFormat>;
222+
}
223+
224+
// @public
225+
export interface ElasticVersionsListNextOptionalParams extends coreClient.OperationOptions {
226+
}
227+
228+
// @public
229+
export type ElasticVersionsListNextResponse = ElasticVersionsListResponse;
230+
231+
// @public
232+
export type ElasticVersionsListOperationResponse = ElasticVersionsListResponse;
233+
234+
// @public
235+
export interface ElasticVersionsListOptionalParams extends coreClient.OperationOptions {
236+
}
237+
238+
// @public
239+
export interface ElasticVersionsListResponse {
240+
nextLink?: string;
241+
value?: ElasticVersionListFormat[];
242+
}
243+
210244
// @public
211245
export interface ErrorResponseBody {
212246
code?: string;
@@ -387,6 +421,8 @@ export class MicrosoftElastic extends coreClient.ServiceClient {
387421
// (undocumented)
388422
detachTrafficFilter: DetachTrafficFilter;
389423
// (undocumented)
424+
elasticVersions: ElasticVersions;
425+
// (undocumented)
390426
externalUser: ExternalUser;
391427
// (undocumented)
392428
listAssociatedTrafficFilters: ListAssociatedTrafficFilters;
@@ -488,6 +524,7 @@ export interface MonitoringTagRulesProperties {
488524
// @public
489525
export interface MonitorProperties {
490526
elasticProperties?: ElasticProperties;
527+
generateApiKey?: boolean;
491528
readonly liftrResourceCategory?: LiftrResourceCategories;
492529
readonly liftrResourcePreference?: number;
493530
monitoringStatus?: MonitoringStatus;
@@ -620,7 +657,7 @@ export type OperationsListResponse = OperationListResult;
620657

621658
// @public
622659
export interface Organizations {
623-
getApiKey(resourceGroupName: string, options?: OrganizationsGetApiKeyOptionalParams): Promise<OrganizationsGetApiKeyResponse>;
660+
getApiKey(options?: OrganizationsGetApiKeyOptionalParams): Promise<OrganizationsGetApiKeyResponse>;
624661
}
625662

626663
// @public
@@ -737,6 +774,12 @@ export interface UpgradableVersionsList {
737774

738775
// @public
739776
export interface UserApiKeyResponse {
777+
// (undocumented)
778+
properties?: UserApiKeyResponseProperties;
779+
}
780+
781+
// @public (undocumented)
782+
export interface UserApiKeyResponseProperties {
740783
apiKey?: string;
741784
}
742785

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT License.
11+
import { MicrosoftElastic } from "@azure/arm-elastic";
12+
import { DefaultAzureCredential } from "@azure/identity";
13+
import * as dotenv from "dotenv";
14+
15+
dotenv.config();
16+
17+
/**
18+
* This sample demonstrates how to Get a list of available versions for a region.
19+
*
20+
* @summary Get a list of available versions for a region.
21+
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_List.json
22+
*/
23+
async function elasticVersionsList() {
24+
const subscriptionId =
25+
process.env["ELASTIC_SUBSCRIPTION_ID"] ||
26+
"00000000-0000-0000-0000-000000000000";
27+
const region = "myregion";
28+
const credential = new DefaultAzureCredential();
29+
const client = new MicrosoftElastic(credential, subscriptionId);
30+
const resArray = new Array();
31+
for await (let item of client.elasticVersions.list(region)) {
32+
resArray.push(item);
33+
}
34+
console.log(resArray);
35+
}
36+
37+
async function main() {
38+
elasticVersionsList();
39+
}
40+
41+
main().catch(console.error);

sdk/elastic/arm-elastic/samples-dev/organizationsGetApiKeySample.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ async function organizationsGetApiKey() {
2424
const subscriptionId =
2525
process.env["ELASTIC_SUBSCRIPTION_ID"] ||
2626
"00000000-0000-0000-0000-000000000000";
27-
const resourceGroupName =
28-
process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
2927
const credential = new DefaultAzureCredential();
3028
const client = new MicrosoftElastic(credential, subscriptionId);
31-
const result = await client.organizations.getApiKey(resourceGroupName);
29+
const result = await client.organizations.getApiKey();
3230
console.log(result);
3331
}
3432

sdk/elastic/arm-elastic/samples/v1-beta/javascript/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ These sample programs show how to use the JavaScript client libraries for in som
1111
| [deploymentInfoListSample.js][deploymentinfolistsample] | Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DeploymentInfo_List.json |
1212
| [detachAndDeleteTrafficFilterDeleteSample.js][detachanddeletetrafficfilterdeletesample] | Detach and Delete traffic filter from the given deployment. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json |
1313
| [detachTrafficFilterUpdateSample.js][detachtrafficfilterupdatesample] | Detach traffic filter for the given deployment. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachTrafficFilters_Update.json |
14+
| [elasticVersionsListSample.js][elasticversionslistsample] | Get a list of available versions for a region. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_List.json |
1415
| [externalUserCreateOrUpdateSample.js][externalusercreateorupdatesample] | Create User inside elastic deployment which are used by customers to perform operations on the elastic deployment x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ExternalUserInfo.json |
1516
| [listAssociatedTrafficFiltersListSample.js][listassociatedtrafficfilterslistsample] | Get the list of all associated traffic filters for the given deployment. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociatedFiltersForDeployment_list.json |
1617
| [monitorUpgradeSample.js][monitorupgradesample] | Upgradable version for a monitor resource. x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitor_Upgrade.json |
@@ -78,6 +79,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP
7879
[deploymentinfolistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/deploymentInfoListSample.js
7980
[detachanddeletetrafficfilterdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/detachAndDeleteTrafficFilterDeleteSample.js
8081
[detachtrafficfilterupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/detachTrafficFilterUpdateSample.js
82+
[elasticversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/elasticVersionsListSample.js
8183
[externalusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/externalUserCreateOrUpdateSample.js
8284
[listassociatedtrafficfilterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/listAssociatedTrafficFiltersListSample.js
8385
[monitorupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elastic/arm-elastic/samples/v1-beta/javascript/monitorUpgradeSample.js
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT License.
11+
const { MicrosoftElastic } = require("@azure/arm-elastic");
12+
const { DefaultAzureCredential } = require("@azure/identity");
13+
require("dotenv").config();
14+
15+
/**
16+
* This sample demonstrates how to Get a list of available versions for a region.
17+
*
18+
* @summary Get a list of available versions for a region.
19+
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_List.json
20+
*/
21+
async function elasticVersionsList() {
22+
const subscriptionId =
23+
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
24+
const region = "myregion";
25+
const credential = new DefaultAzureCredential();
26+
const client = new MicrosoftElastic(credential, subscriptionId);
27+
const resArray = new Array();
28+
for await (let item of client.elasticVersions.list(region)) {
29+
resArray.push(item);
30+
}
31+
console.log(resArray);
32+
}
33+
34+
async function main() {
35+
elasticVersionsList();
36+
}
37+
38+
main().catch(console.error);

sdk/elastic/arm-elastic/samples/v1-beta/javascript/organizationsGetApiKeySample.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ require("dotenv").config();
2121
async function organizationsGetApiKey() {
2222
const subscriptionId =
2323
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
24-
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
2524
const credential = new DefaultAzureCredential();
2625
const client = new MicrosoftElastic(credential, subscriptionId);
27-
const result = await client.organizations.getApiKey(resourceGroupName);
26+
const result = await client.organizations.getApiKey();
2827
console.log(result);
2928
}
3029

0 commit comments

Comments
 (0)