@azure/arm-baremetalinfrastructure 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/README.md +2 -2
- package/dist/index.js +1234 -194
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/azureBareMetalInstancesGetSample.js +3 -3
- package/dist-esm/samples-dev/azureBareMetalInstancesListByResourceGroupSample.js +6 -11
- package/dist-esm/samples-dev/azureBareMetalInstancesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/azureBareMetalInstancesListBySubscriptionSample.js +6 -11
- package/dist-esm/samples-dev/azureBareMetalInstancesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/azureBareMetalInstancesRestartSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesRestartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesRestartSample.js +39 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesRestartSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesShutdownSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesShutdownSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesShutdownSample.js +39 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesShutdownSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesStartSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesStartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesStartSample.js +39 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesStartSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalInstancesUpdateSample.js +6 -6
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesCreateSample.js +56 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesGetSample.js +39 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListByResourceGroupSample.js +54 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListBySubscriptionSample.js +53 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesUpdateSample.js +60 -0
- package/dist-esm/samples-dev/azureBareMetalStorageInstancesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +4 -9
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/src/bareMetalInfrastructureClient.d.ts +3 -2
- package/dist-esm/src/bareMetalInfrastructureClient.d.ts.map +1 -1
- package/dist-esm/src/bareMetalInfrastructureClient.js +5 -4
- package/dist-esm/src/bareMetalInfrastructureClient.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +370 -81
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +60 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +17 -7
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +372 -96
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +3 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +27 -6
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/azureBareMetalInstances.d.ts +65 -14
- package/dist-esm/src/operations/azureBareMetalInstances.d.ts.map +1 -1
- package/dist-esm/src/operations/azureBareMetalInstances.js +290 -30
- package/dist-esm/src/operations/azureBareMetalInstances.js.map +1 -1
- package/dist-esm/src/operations/azureBareMetalStorageInstances.d.ts +93 -0
- package/dist-esm/src/operations/azureBareMetalStorageInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/azureBareMetalStorageInstances.js +404 -0
- package/dist-esm/src/operations/azureBareMetalStorageInstances.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/operations.js +4 -9
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/azureBareMetalInstances.d.ts +61 -10
- package/dist-esm/src/operationsInterfaces/azureBareMetalInstances.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/azureBareMetalStorageInstances.d.ts +55 -0
- package/dist-esm/src/operationsInterfaces/azureBareMetalStorageInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureBareMetalStorageInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/azureBareMetalStorageInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/test/baremetalinfrastructure_operations_test.spec.js +7 -9
- package/dist-esm/test/baremetalinfrastructure_operations_test.spec.js.map +1 -1
- package/package.json +17 -19
- package/review/arm-baremetalinfrastructure.api.md +244 -19
- package/src/bareMetalInfrastructureClient.ts +17 -5
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +417 -84
- package/src/models/mappers.ts +388 -98
- package/src/models/parameters.ts +34 -6
- package/src/operations/azureBareMetalInstances.ts +401 -13
- package/src/operations/azureBareMetalStorageInstances.ts +498 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/operations.ts +1 -1
- package/src/operationsInterfaces/azureBareMetalInstances.ts +105 -9
- package/src/operationsInterfaces/azureBareMetalStorageInstances.ts +99 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/types/arm-baremetalinfrastructure.d.ts +516 -80
- package/types/tsdoc-metadata.json +1 -1
- package/rollup.config.js +0 -122
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { Tags as TagsMapper } from "../models/mappers";
|
|
8
|
+
import { ForceState as ForceStateMapper, Tags as TagsMapper, AzureBareMetalStorageInstance as AzureBareMetalStorageInstanceMapper } from "../models/mappers";
|
|
9
9
|
export const accept = {
|
|
10
10
|
parameterPath: "accept",
|
|
11
11
|
mapper: {
|
|
@@ -31,7 +31,7 @@ export const $host = {
|
|
|
31
31
|
export const apiVersion = {
|
|
32
32
|
parameterPath: "apiVersion",
|
|
33
33
|
mapper: {
|
|
34
|
-
defaultValue: "
|
|
34
|
+
defaultValue: "2023-08-04-preview",
|
|
35
35
|
isConstant: true,
|
|
36
36
|
serializedName: "api-version",
|
|
37
37
|
type: {
|
|
@@ -42,13 +42,10 @@ export const apiVersion = {
|
|
|
42
42
|
export const subscriptionId = {
|
|
43
43
|
parameterPath: "subscriptionId",
|
|
44
44
|
mapper: {
|
|
45
|
-
constraints: {
|
|
46
|
-
MinLength: 1
|
|
47
|
-
},
|
|
48
45
|
serializedName: "subscriptionId",
|
|
49
46
|
required: true,
|
|
50
47
|
type: {
|
|
51
|
-
name: "
|
|
48
|
+
name: "Uuid"
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
};
|
|
@@ -69,6 +66,9 @@ export const resourceGroupName = {
|
|
|
69
66
|
export const azureBareMetalInstanceName = {
|
|
70
67
|
parameterPath: "azureBareMetalInstanceName",
|
|
71
68
|
mapper: {
|
|
69
|
+
constraints: {
|
|
70
|
+
Pattern: new RegExp("^[a-zA-Z0-9]+$")
|
|
71
|
+
},
|
|
72
72
|
serializedName: "azureBareMetalInstanceName",
|
|
73
73
|
required: true,
|
|
74
74
|
type: {
|
|
@@ -87,6 +87,10 @@ export const contentType = {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
+
export const forceParameter = {
|
|
91
|
+
parameterPath: ["options", "forceParameter"],
|
|
92
|
+
mapper: ForceStateMapper
|
|
93
|
+
};
|
|
90
94
|
export const tagsParameter = {
|
|
91
95
|
parameterPath: "tagsParameter",
|
|
92
96
|
mapper: TagsMapper
|
|
@@ -102,4 +106,21 @@ export const nextLink = {
|
|
|
102
106
|
},
|
|
103
107
|
skipEncoding: true
|
|
104
108
|
};
|
|
109
|
+
export const azureBareMetalStorageInstanceName = {
|
|
110
|
+
parameterPath: "azureBareMetalStorageInstanceName",
|
|
111
|
+
mapper: {
|
|
112
|
+
constraints: {
|
|
113
|
+
Pattern: new RegExp(".*")
|
|
114
|
+
},
|
|
115
|
+
serializedName: "azureBareMetalStorageInstanceName",
|
|
116
|
+
required: true,
|
|
117
|
+
type: {
|
|
118
|
+
name: "String"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export const requestBodyParameters = {
|
|
123
|
+
parameterPath: "requestBodyParameters",
|
|
124
|
+
mapper: AzureBareMetalStorageInstanceMapper
|
|
125
|
+
};
|
|
105
126
|
//# sourceMappingURL=parameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/models/parameters.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
2
|
import { AzureBareMetalInstances } from "../operationsInterfaces";
|
|
3
3
|
import { BareMetalInfrastructureClient } from "../bareMetalInfrastructureClient";
|
|
4
|
-
import {
|
|
4
|
+
import { SimplePollerLike, OperationState } from "@azure/core-lro";
|
|
5
|
+
import { AzureBareMetalInstance, AzureBareMetalInstancesListBySubscriptionOptionalParams, AzureBareMetalInstancesListByResourceGroupOptionalParams, AzureBareMetalInstancesStartOptionalParams, AzureBareMetalInstancesStartResponse, AzureBareMetalInstancesRestartOptionalParams, AzureBareMetalInstancesRestartResponse, AzureBareMetalInstancesShutdownOptionalParams, AzureBareMetalInstancesShutdownResponse, AzureBareMetalInstancesGetOptionalParams, AzureBareMetalInstancesGetResponse, Tags, AzureBareMetalInstancesUpdateOptionalParams, AzureBareMetalInstancesUpdateResponse } from "../models";
|
|
5
6
|
/** Class containing AzureBareMetalInstances operations. */
|
|
6
7
|
export declare class AzureBareMetalInstancesImpl implements AzureBareMetalInstances {
|
|
7
8
|
private readonly client;
|
|
@@ -11,16 +12,16 @@ export declare class AzureBareMetalInstancesImpl implements AzureBareMetalInstan
|
|
|
11
12
|
*/
|
|
12
13
|
constructor(client: BareMetalInfrastructureClient);
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
-
* various properties of each Azure
|
|
15
|
+
* Returns a list of Azure Bare Metal Instances in the specified subscription. The operations returns
|
|
16
|
+
* various properties of each Azure Bare Metal Instance.
|
|
16
17
|
* @param options The options parameters.
|
|
17
18
|
*/
|
|
18
19
|
listBySubscription(options?: AzureBareMetalInstancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator<AzureBareMetalInstance>;
|
|
19
20
|
private listBySubscriptionPagingPage;
|
|
20
21
|
private listBySubscriptionPagingAll;
|
|
21
22
|
/**
|
|
22
|
-
* Gets a list of
|
|
23
|
-
* operations returns various properties of each Azure
|
|
23
|
+
* Gets a list of Azure Bare Metal Instances in the specified subscription and resource group. The
|
|
24
|
+
* operations returns various properties of each Azure Bare Metal Instance.
|
|
24
25
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
25
26
|
* @param options The options parameters.
|
|
26
27
|
*/
|
|
@@ -28,30 +29,80 @@ export declare class AzureBareMetalInstancesImpl implements AzureBareMetalInstan
|
|
|
28
29
|
private listByResourceGroupPagingPage;
|
|
29
30
|
private listByResourceGroupPagingAll;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
32
|
+
* The operation to start an Azure Bare Metal instance
|
|
33
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
34
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
35
|
+
* ResourceName.
|
|
36
|
+
* @param options The options parameters.
|
|
37
|
+
*/
|
|
38
|
+
beginStart(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesStartOptionalParams): Promise<SimplePollerLike<OperationState<AzureBareMetalInstancesStartResponse>, AzureBareMetalInstancesStartResponse>>;
|
|
39
|
+
/**
|
|
40
|
+
* The operation to start an Azure Bare Metal instance
|
|
41
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
42
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
43
|
+
* ResourceName.
|
|
44
|
+
* @param options The options parameters.
|
|
45
|
+
*/
|
|
46
|
+
beginStartAndWait(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesStartOptionalParams): Promise<AzureBareMetalInstancesStartResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* The operation to restart an Azure Bare Metal Instance
|
|
49
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
50
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
51
|
+
* ResourceName.
|
|
52
|
+
* @param options The options parameters.
|
|
53
|
+
*/
|
|
54
|
+
beginRestart(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesRestartOptionalParams): Promise<SimplePollerLike<OperationState<AzureBareMetalInstancesRestartResponse>, AzureBareMetalInstancesRestartResponse>>;
|
|
55
|
+
/**
|
|
56
|
+
* The operation to restart an Azure Bare Metal Instance
|
|
57
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
58
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
59
|
+
* ResourceName.
|
|
60
|
+
* @param options The options parameters.
|
|
61
|
+
*/
|
|
62
|
+
beginRestartAndWait(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesRestartOptionalParams): Promise<AzureBareMetalInstancesRestartResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* The operation to shutdown an Azure Bare Metal Instance
|
|
65
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
66
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
67
|
+
* ResourceName.
|
|
68
|
+
* @param options The options parameters.
|
|
69
|
+
*/
|
|
70
|
+
beginShutdown(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesShutdownOptionalParams): Promise<SimplePollerLike<OperationState<AzureBareMetalInstancesShutdownResponse>, AzureBareMetalInstancesShutdownResponse>>;
|
|
71
|
+
/**
|
|
72
|
+
* The operation to shutdown an Azure Bare Metal Instance
|
|
73
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
74
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
75
|
+
* ResourceName.
|
|
76
|
+
* @param options The options parameters.
|
|
77
|
+
*/
|
|
78
|
+
beginShutdownAndWait(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesShutdownOptionalParams): Promise<AzureBareMetalInstancesShutdownResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* Returns a list of Azure Bare Metal Instances in the specified subscription. The operations returns
|
|
81
|
+
* various properties of each Azure Bare Metal Instance.
|
|
33
82
|
* @param options The options parameters.
|
|
34
83
|
*/
|
|
35
84
|
private _listBySubscription;
|
|
36
85
|
/**
|
|
37
|
-
* Gets a list of
|
|
38
|
-
* operations returns various properties of each Azure
|
|
86
|
+
* Gets a list of Azure Bare Metal Instances in the specified subscription and resource group. The
|
|
87
|
+
* operations returns various properties of each Azure Bare Metal Instance.
|
|
39
88
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
40
89
|
* @param options The options parameters.
|
|
41
90
|
*/
|
|
42
91
|
private _listByResourceGroup;
|
|
43
92
|
/**
|
|
44
|
-
* Gets an Azure
|
|
93
|
+
* Gets an Azure Bare Metal Instance for the specified subscription, resource group, and instance name.
|
|
45
94
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
46
|
-
* @param azureBareMetalInstanceName Name of the Azure
|
|
95
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
96
|
+
* ResourceName.
|
|
47
97
|
* @param options The options parameters.
|
|
48
98
|
*/
|
|
49
99
|
get(resourceGroupName: string, azureBareMetalInstanceName: string, options?: AzureBareMetalInstancesGetOptionalParams): Promise<AzureBareMetalInstancesGetResponse>;
|
|
50
100
|
/**
|
|
51
|
-
* Patches the Tags field of a Azure
|
|
52
|
-
* and instance name.
|
|
101
|
+
* Patches the Tags field of a Azure Bare Metal Instance for the specified subscription, resource
|
|
102
|
+
* group, and instance name.
|
|
53
103
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
54
|
-
* @param azureBareMetalInstanceName Name of the Azure
|
|
104
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
105
|
+
* ResourceName.
|
|
55
106
|
* @param tagsParameter Request body that only contains the new Tags field
|
|
56
107
|
* @param options The options parameters.
|
|
57
108
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureBareMetalInstances.d.ts","sourceRoot":"","sources":["../../../src/operations/azureBareMetalInstances.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EACL,sBAAsB,EAEtB,uDAAuD,EAGvD,wDAAwD,EAExD,wCAAwC,EACxC,kCAAkC,EAClC,IAAI,EACJ,2CAA2C,EAC3C,qCAAqC,EAGtC,MAAM,WAAW,CAAC;AAGnB,2DAA2D;AAC3D,qBAAa,2BAA4B,YAAW,uBAAuB;IACzE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IAEvD;;;OAGG;gBACS,MAAM,EAAE,6BAA6B;IAIjD;;;;OAIG;IACI,kBAAkB,CACvB,OAAO,CAAC,EAAE,uDAAuD,GAChE,0BAA0B,CAAC,sBAAsB,CAAC;YAkBtC,4BAA4B;YAsB5B,2BAA2B;IAQ1C;;;;;OAKG;IACI,mBAAmB,CACxB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,wDAAwD,GACjE,0BAA0B,CAAC,sBAAsB,CAAC;YAsBtC,6BAA6B;YA2B7B,4BAA4B;IAY3C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAU5B
|
|
1
|
+
{"version":3,"file":"azureBareMetalInstances.d.ts","sourceRoot":"","sources":["../../../src/operations/azureBareMetalInstances.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
|
|
9
9
|
import { setContinuationToken } from "../pagingHelper";
|
|
10
10
|
import * as coreClient from "@azure/core-client";
|
|
11
11
|
import * as Mappers from "../models/mappers";
|
|
12
12
|
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { createHttpPoller } from "@azure/core-lro";
|
|
14
|
+
import { createLroSpec } from "../lroImpl";
|
|
13
15
|
/// <reference lib="esnext.asynciterable" />
|
|
14
16
|
/** Class containing AzureBareMetalInstances operations. */
|
|
15
17
|
export class AzureBareMetalInstancesImpl {
|
|
@@ -21,8 +23,8 @@ export class AzureBareMetalInstancesImpl {
|
|
|
21
23
|
this.client = client;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
25
|
-
* various properties of each Azure
|
|
26
|
+
* Returns a list of Azure Bare Metal Instances in the specified subscription. The operations returns
|
|
27
|
+
* various properties of each Azure Bare Metal Instance.
|
|
26
28
|
* @param options The options parameters.
|
|
27
29
|
*/
|
|
28
30
|
listBySubscription(options) {
|
|
@@ -66,16 +68,11 @@ export class AzureBareMetalInstancesImpl {
|
|
|
66
68
|
return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
|
67
69
|
var _a, e_1, _b, _c;
|
|
68
70
|
try {
|
|
69
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
|
71
|
+
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
70
72
|
_c = _f.value;
|
|
71
73
|
_d = false;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
-
}
|
|
76
|
-
finally {
|
|
77
|
-
_d = true;
|
|
78
|
-
}
|
|
74
|
+
const page = _c;
|
|
75
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -88,8 +85,8 @@ export class AzureBareMetalInstancesImpl {
|
|
|
88
85
|
});
|
|
89
86
|
}
|
|
90
87
|
/**
|
|
91
|
-
* Gets a list of
|
|
92
|
-
* operations returns various properties of each Azure
|
|
88
|
+
* Gets a list of Azure Bare Metal Instances in the specified subscription and resource group. The
|
|
89
|
+
* operations returns various properties of each Azure Bare Metal Instance.
|
|
93
90
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
94
91
|
* @param options The options parameters.
|
|
95
92
|
*/
|
|
@@ -134,16 +131,11 @@ export class AzureBareMetalInstancesImpl {
|
|
|
134
131
|
return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
135
132
|
var _a, e_2, _b, _c;
|
|
136
133
|
try {
|
|
137
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
|
134
|
+
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
138
135
|
_c = _f.value;
|
|
139
136
|
_d = false;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
143
|
-
}
|
|
144
|
-
finally {
|
|
145
|
-
_d = true;
|
|
146
|
-
}
|
|
137
|
+
const page = _c;
|
|
138
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
147
139
|
}
|
|
148
140
|
}
|
|
149
141
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -156,16 +148,190 @@ export class AzureBareMetalInstancesImpl {
|
|
|
156
148
|
});
|
|
157
149
|
}
|
|
158
150
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
151
|
+
* The operation to start an Azure Bare Metal instance
|
|
152
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
153
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
154
|
+
* ResourceName.
|
|
155
|
+
* @param options The options parameters.
|
|
156
|
+
*/
|
|
157
|
+
beginStart(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
return this.client.sendOperationRequest(args, spec);
|
|
161
|
+
});
|
|
162
|
+
const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
var _a;
|
|
164
|
+
let currentRawResponse = undefined;
|
|
165
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
166
|
+
const callback = (rawResponse, flatResponse) => {
|
|
167
|
+
currentRawResponse = rawResponse;
|
|
168
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
169
|
+
};
|
|
170
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
171
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
172
|
+
return {
|
|
173
|
+
flatResponse,
|
|
174
|
+
rawResponse: {
|
|
175
|
+
statusCode: currentRawResponse.status,
|
|
176
|
+
body: currentRawResponse.parsedBody,
|
|
177
|
+
headers: currentRawResponse.headers.toJSON()
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
const lro = createLroSpec({
|
|
182
|
+
sendOperationFn,
|
|
183
|
+
args: { resourceGroupName, azureBareMetalInstanceName, options },
|
|
184
|
+
spec: startOperationSpec
|
|
185
|
+
});
|
|
186
|
+
const poller = yield createHttpPoller(lro, {
|
|
187
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
188
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
189
|
+
resourceLocationConfig: "location"
|
|
190
|
+
});
|
|
191
|
+
yield poller.poll();
|
|
192
|
+
return poller;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The operation to start an Azure Bare Metal instance
|
|
197
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
198
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
199
|
+
* ResourceName.
|
|
200
|
+
* @param options The options parameters.
|
|
201
|
+
*/
|
|
202
|
+
beginStartAndWait(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
const poller = yield this.beginStart(resourceGroupName, azureBareMetalInstanceName, options);
|
|
205
|
+
return poller.pollUntilDone();
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The operation to restart an Azure Bare Metal Instance
|
|
210
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
211
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
212
|
+
* ResourceName.
|
|
213
|
+
* @param options The options parameters.
|
|
214
|
+
*/
|
|
215
|
+
beginRestart(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
return this.client.sendOperationRequest(args, spec);
|
|
219
|
+
});
|
|
220
|
+
const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
var _a;
|
|
222
|
+
let currentRawResponse = undefined;
|
|
223
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
224
|
+
const callback = (rawResponse, flatResponse) => {
|
|
225
|
+
currentRawResponse = rawResponse;
|
|
226
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
227
|
+
};
|
|
228
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
229
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
230
|
+
return {
|
|
231
|
+
flatResponse,
|
|
232
|
+
rawResponse: {
|
|
233
|
+
statusCode: currentRawResponse.status,
|
|
234
|
+
body: currentRawResponse.parsedBody,
|
|
235
|
+
headers: currentRawResponse.headers.toJSON()
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
});
|
|
239
|
+
const lro = createLroSpec({
|
|
240
|
+
sendOperationFn,
|
|
241
|
+
args: { resourceGroupName, azureBareMetalInstanceName, options },
|
|
242
|
+
spec: restartOperationSpec
|
|
243
|
+
});
|
|
244
|
+
const poller = yield createHttpPoller(lro, {
|
|
245
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
246
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
247
|
+
resourceLocationConfig: "location"
|
|
248
|
+
});
|
|
249
|
+
yield poller.poll();
|
|
250
|
+
return poller;
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* The operation to restart an Azure Bare Metal Instance
|
|
255
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
256
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
257
|
+
* ResourceName.
|
|
258
|
+
* @param options The options parameters.
|
|
259
|
+
*/
|
|
260
|
+
beginRestartAndWait(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
const poller = yield this.beginRestart(resourceGroupName, azureBareMetalInstanceName, options);
|
|
263
|
+
return poller.pollUntilDone();
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* The operation to shutdown an Azure Bare Metal Instance
|
|
268
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
269
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
270
|
+
* ResourceName.
|
|
271
|
+
* @param options The options parameters.
|
|
272
|
+
*/
|
|
273
|
+
beginShutdown(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
return this.client.sendOperationRequest(args, spec);
|
|
277
|
+
});
|
|
278
|
+
const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
var _a;
|
|
280
|
+
let currentRawResponse = undefined;
|
|
281
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
282
|
+
const callback = (rawResponse, flatResponse) => {
|
|
283
|
+
currentRawResponse = rawResponse;
|
|
284
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
285
|
+
};
|
|
286
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
287
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
288
|
+
return {
|
|
289
|
+
flatResponse,
|
|
290
|
+
rawResponse: {
|
|
291
|
+
statusCode: currentRawResponse.status,
|
|
292
|
+
body: currentRawResponse.parsedBody,
|
|
293
|
+
headers: currentRawResponse.headers.toJSON()
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
});
|
|
297
|
+
const lro = createLroSpec({
|
|
298
|
+
sendOperationFn,
|
|
299
|
+
args: { resourceGroupName, azureBareMetalInstanceName, options },
|
|
300
|
+
spec: shutdownOperationSpec
|
|
301
|
+
});
|
|
302
|
+
const poller = yield createHttpPoller(lro, {
|
|
303
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
304
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
305
|
+
resourceLocationConfig: "location"
|
|
306
|
+
});
|
|
307
|
+
yield poller.poll();
|
|
308
|
+
return poller;
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* The operation to shutdown an Azure Bare Metal Instance
|
|
313
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
314
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
315
|
+
* ResourceName.
|
|
316
|
+
* @param options The options parameters.
|
|
317
|
+
*/
|
|
318
|
+
beginShutdownAndWait(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const poller = yield this.beginShutdown(resourceGroupName, azureBareMetalInstanceName, options);
|
|
321
|
+
return poller.pollUntilDone();
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Returns a list of Azure Bare Metal Instances in the specified subscription. The operations returns
|
|
326
|
+
* various properties of each Azure Bare Metal Instance.
|
|
161
327
|
* @param options The options parameters.
|
|
162
328
|
*/
|
|
163
329
|
_listBySubscription(options) {
|
|
164
330
|
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
|
165
331
|
}
|
|
166
332
|
/**
|
|
167
|
-
* Gets a list of
|
|
168
|
-
* operations returns various properties of each Azure
|
|
333
|
+
* Gets a list of Azure Bare Metal Instances in the specified subscription and resource group. The
|
|
334
|
+
* operations returns various properties of each Azure Bare Metal Instance.
|
|
169
335
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
170
336
|
* @param options The options parameters.
|
|
171
337
|
*/
|
|
@@ -173,19 +339,21 @@ export class AzureBareMetalInstancesImpl {
|
|
|
173
339
|
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
174
340
|
}
|
|
175
341
|
/**
|
|
176
|
-
* Gets an Azure
|
|
342
|
+
* Gets an Azure Bare Metal Instance for the specified subscription, resource group, and instance name.
|
|
177
343
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
178
|
-
* @param azureBareMetalInstanceName Name of the Azure
|
|
344
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
345
|
+
* ResourceName.
|
|
179
346
|
* @param options The options parameters.
|
|
180
347
|
*/
|
|
181
348
|
get(resourceGroupName, azureBareMetalInstanceName, options) {
|
|
182
349
|
return this.client.sendOperationRequest({ resourceGroupName, azureBareMetalInstanceName, options }, getOperationSpec);
|
|
183
350
|
}
|
|
184
351
|
/**
|
|
185
|
-
* Patches the Tags field of a Azure
|
|
186
|
-
* and instance name.
|
|
352
|
+
* Patches the Tags field of a Azure Bare Metal Instance for the specified subscription, resource
|
|
353
|
+
* group, and instance name.
|
|
187
354
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
188
|
-
* @param azureBareMetalInstanceName Name of the Azure
|
|
355
|
+
* @param azureBareMetalInstanceName Name of the Azure Bare Metal Instance, also known as the
|
|
356
|
+
* ResourceName.
|
|
189
357
|
* @param tagsParameter Request body that only contains the new Tags field
|
|
190
358
|
* @param options The options parameters.
|
|
191
359
|
*/
|
|
@@ -212,6 +380,98 @@ export class AzureBareMetalInstancesImpl {
|
|
|
212
380
|
}
|
|
213
381
|
// Operation Specifications
|
|
214
382
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
383
|
+
const startOperationSpec = {
|
|
384
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/start",
|
|
385
|
+
httpMethod: "POST",
|
|
386
|
+
responses: {
|
|
387
|
+
200: {
|
|
388
|
+
bodyMapper: Mappers.OperationStatus
|
|
389
|
+
},
|
|
390
|
+
201: {
|
|
391
|
+
bodyMapper: Mappers.OperationStatus
|
|
392
|
+
},
|
|
393
|
+
202: {
|
|
394
|
+
bodyMapper: Mappers.OperationStatus
|
|
395
|
+
},
|
|
396
|
+
204: {
|
|
397
|
+
bodyMapper: Mappers.OperationStatus
|
|
398
|
+
},
|
|
399
|
+
default: {
|
|
400
|
+
bodyMapper: Mappers.ErrorResponse
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
queryParameters: [Parameters.apiVersion],
|
|
404
|
+
urlParameters: [
|
|
405
|
+
Parameters.$host,
|
|
406
|
+
Parameters.subscriptionId,
|
|
407
|
+
Parameters.resourceGroupName,
|
|
408
|
+
Parameters.azureBareMetalInstanceName
|
|
409
|
+
],
|
|
410
|
+
headerParameters: [Parameters.accept],
|
|
411
|
+
serializer
|
|
412
|
+
};
|
|
413
|
+
const restartOperationSpec = {
|
|
414
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/restart",
|
|
415
|
+
httpMethod: "POST",
|
|
416
|
+
responses: {
|
|
417
|
+
200: {
|
|
418
|
+
bodyMapper: Mappers.OperationStatus
|
|
419
|
+
},
|
|
420
|
+
201: {
|
|
421
|
+
bodyMapper: Mappers.OperationStatus
|
|
422
|
+
},
|
|
423
|
+
202: {
|
|
424
|
+
bodyMapper: Mappers.OperationStatus
|
|
425
|
+
},
|
|
426
|
+
204: {
|
|
427
|
+
bodyMapper: Mappers.OperationStatus
|
|
428
|
+
},
|
|
429
|
+
default: {
|
|
430
|
+
bodyMapper: Mappers.ErrorResponse
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
requestBody: Parameters.forceParameter,
|
|
434
|
+
queryParameters: [Parameters.apiVersion],
|
|
435
|
+
urlParameters: [
|
|
436
|
+
Parameters.$host,
|
|
437
|
+
Parameters.subscriptionId,
|
|
438
|
+
Parameters.resourceGroupName,
|
|
439
|
+
Parameters.azureBareMetalInstanceName
|
|
440
|
+
],
|
|
441
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
442
|
+
mediaType: "json",
|
|
443
|
+
serializer
|
|
444
|
+
};
|
|
445
|
+
const shutdownOperationSpec = {
|
|
446
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/shutdown",
|
|
447
|
+
httpMethod: "POST",
|
|
448
|
+
responses: {
|
|
449
|
+
200: {
|
|
450
|
+
bodyMapper: Mappers.OperationStatus
|
|
451
|
+
},
|
|
452
|
+
201: {
|
|
453
|
+
bodyMapper: Mappers.OperationStatus
|
|
454
|
+
},
|
|
455
|
+
202: {
|
|
456
|
+
bodyMapper: Mappers.OperationStatus
|
|
457
|
+
},
|
|
458
|
+
204: {
|
|
459
|
+
bodyMapper: Mappers.OperationStatus
|
|
460
|
+
},
|
|
461
|
+
default: {
|
|
462
|
+
bodyMapper: Mappers.ErrorResponse
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
queryParameters: [Parameters.apiVersion],
|
|
466
|
+
urlParameters: [
|
|
467
|
+
Parameters.$host,
|
|
468
|
+
Parameters.subscriptionId,
|
|
469
|
+
Parameters.resourceGroupName,
|
|
470
|
+
Parameters.azureBareMetalInstanceName
|
|
471
|
+
],
|
|
472
|
+
headerParameters: [Parameters.accept],
|
|
473
|
+
serializer
|
|
474
|
+
};
|
|
215
475
|
const listBySubscriptionOperationSpec = {
|
|
216
476
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances",
|
|
217
477
|
httpMethod: "GET",
|