@azure/arm-scvmm 1.0.0-alpha.20220704.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 +12 -10
- package/README.md +7 -7
- package/dist/index.js +50 -1
- 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/src/models/index.d.ts +33 -11
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +21 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/scvmm.d.ts +2 -0
- package/dist-esm/src/scvmm.d.ts.map +1 -1
- package/dist-esm/src/scvmm.js +29 -0
- package/dist-esm/src/scvmm.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +11 -8
- package/review/arm-scvmm.api.md +21 -41
- package/src/models/index.ts +33 -11
- package/src/scvmm.ts +34 -0
- package/types/arm-scvmm.d.ts +35 -11
- package/types/tsdoc-metadata.json +1 -1
package/src/models/index.ts
CHANGED
|
@@ -899,19 +899,20 @@ export interface InventoryItemDetails {
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
/** The Cloud inventory item. */
|
|
902
|
-
export
|
|
902
|
+
export interface CloudInventoryItem extends InventoryItemProperties {
|
|
903
903
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
904
904
|
inventoryType: "Cloud";
|
|
905
|
-
}
|
|
905
|
+
}
|
|
906
906
|
|
|
907
907
|
/** The Virtual network inventory item. */
|
|
908
|
-
export
|
|
908
|
+
export interface VirtualNetworkInventoryItem extends InventoryItemProperties {
|
|
909
909
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
910
910
|
inventoryType: "VirtualNetwork";
|
|
911
|
-
}
|
|
911
|
+
}
|
|
912
912
|
|
|
913
913
|
/** The Virtual machine template inventory item. */
|
|
914
|
-
export
|
|
914
|
+
export interface VirtualMachineTemplateInventoryItem
|
|
915
|
+
extends InventoryItemProperties {
|
|
915
916
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
916
917
|
inventoryType: "VirtualMachineTemplate";
|
|
917
918
|
/**
|
|
@@ -934,10 +935,10 @@ export type VirtualMachineTemplateInventoryItem = InventoryItemProperties & {
|
|
|
934
935
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
935
936
|
*/
|
|
936
937
|
readonly osName?: string;
|
|
937
|
-
}
|
|
938
|
+
}
|
|
938
939
|
|
|
939
940
|
/** The Virtual machine inventory item. */
|
|
940
|
-
export
|
|
941
|
+
export interface VirtualMachineInventoryItem extends InventoryItemProperties {
|
|
941
942
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
942
943
|
inventoryType: "VirtualMachine";
|
|
943
944
|
/**
|
|
@@ -959,13 +960,13 @@ export type VirtualMachineInventoryItem = InventoryItemProperties & {
|
|
|
959
960
|
ipAddresses?: string[];
|
|
960
961
|
/** Cloud inventory resource details where the VM is present. */
|
|
961
962
|
cloud?: InventoryItemDetails;
|
|
962
|
-
}
|
|
963
|
+
}
|
|
963
964
|
|
|
964
965
|
/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
|
|
965
|
-
export
|
|
966
|
+
export interface ProxyResource extends Resource {}
|
|
966
967
|
|
|
967
968
|
/** Defines the inventory item. */
|
|
968
|
-
export
|
|
969
|
+
export interface InventoryItem extends ProxyResource {
|
|
969
970
|
/**
|
|
970
971
|
* The system data.
|
|
971
972
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
@@ -995,7 +996,7 @@ export type InventoryItem = ProxyResource & {
|
|
|
995
996
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
996
997
|
*/
|
|
997
998
|
readonly provisioningState?: string;
|
|
998
|
-
}
|
|
999
|
+
}
|
|
999
1000
|
|
|
1000
1001
|
/** Defines headers for AvailabilitySets_createOrUpdate operation. */
|
|
1001
1002
|
export interface AvailabilitySetsCreateOrUpdateHeaders {
|
|
@@ -1011,9 +1012,13 @@ export interface AvailabilitySetsDeleteHeaders {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
1013
1014
|
export enum KnownCreatedByType {
|
|
1015
|
+
/** User */
|
|
1014
1016
|
User = "User",
|
|
1017
|
+
/** Application */
|
|
1015
1018
|
Application = "Application",
|
|
1019
|
+
/** ManagedIdentity */
|
|
1016
1020
|
ManagedIdentity = "ManagedIdentity",
|
|
1021
|
+
/** Key */
|
|
1017
1022
|
Key = "Key"
|
|
1018
1023
|
}
|
|
1019
1024
|
|
|
@@ -1031,8 +1036,11 @@ export type CreatedByType = string;
|
|
|
1031
1036
|
|
|
1032
1037
|
/** Known values of {@link OsType} that the service accepts. */
|
|
1033
1038
|
export enum KnownOsType {
|
|
1039
|
+
/** Windows */
|
|
1034
1040
|
Windows = "Windows",
|
|
1041
|
+
/** Linux */
|
|
1035
1042
|
Linux = "Linux",
|
|
1043
|
+
/** Other */
|
|
1036
1044
|
Other = "Other"
|
|
1037
1045
|
}
|
|
1038
1046
|
|
|
@@ -1049,7 +1057,9 @@ export type OsType = string;
|
|
|
1049
1057
|
|
|
1050
1058
|
/** Known values of {@link LimitCpuForMigration} that the service accepts. */
|
|
1051
1059
|
export enum KnownLimitCpuForMigration {
|
|
1060
|
+
/** False */
|
|
1052
1061
|
False = "false",
|
|
1062
|
+
/** True */
|
|
1053
1063
|
True = "true"
|
|
1054
1064
|
}
|
|
1055
1065
|
|
|
@@ -1065,7 +1075,9 @@ export type LimitCpuForMigration = string;
|
|
|
1065
1075
|
|
|
1066
1076
|
/** Known values of {@link DynamicMemoryEnabled} that the service accepts. */
|
|
1067
1077
|
export enum KnownDynamicMemoryEnabled {
|
|
1078
|
+
/** False */
|
|
1068
1079
|
False = "false",
|
|
1080
|
+
/** True */
|
|
1069
1081
|
True = "true"
|
|
1070
1082
|
}
|
|
1071
1083
|
|
|
@@ -1081,7 +1093,9 @@ export type DynamicMemoryEnabled = string;
|
|
|
1081
1093
|
|
|
1082
1094
|
/** Known values of {@link AllocationMethod} that the service accepts. */
|
|
1083
1095
|
export enum KnownAllocationMethod {
|
|
1096
|
+
/** Dynamic */
|
|
1084
1097
|
Dynamic = "Dynamic",
|
|
1098
|
+
/** Static */
|
|
1085
1099
|
Static = "Static"
|
|
1086
1100
|
}
|
|
1087
1101
|
|
|
@@ -1097,7 +1111,9 @@ export type AllocationMethod = string;
|
|
|
1097
1111
|
|
|
1098
1112
|
/** Known values of {@link CreateDiffDisk} that the service accepts. */
|
|
1099
1113
|
export enum KnownCreateDiffDisk {
|
|
1114
|
+
/** False */
|
|
1100
1115
|
False = "false",
|
|
1116
|
+
/** True */
|
|
1101
1117
|
True = "true"
|
|
1102
1118
|
}
|
|
1103
1119
|
|
|
@@ -1113,7 +1129,9 @@ export type CreateDiffDisk = string;
|
|
|
1113
1129
|
|
|
1114
1130
|
/** Known values of {@link IsCustomizable} that the service accepts. */
|
|
1115
1131
|
export enum KnownIsCustomizable {
|
|
1132
|
+
/** False */
|
|
1116
1133
|
False = "false",
|
|
1134
|
+
/** True */
|
|
1117
1135
|
True = "true"
|
|
1118
1136
|
}
|
|
1119
1137
|
|
|
@@ -1129,9 +1147,13 @@ export type IsCustomizable = string;
|
|
|
1129
1147
|
|
|
1130
1148
|
/** Known values of {@link InventoryType} that the service accepts. */
|
|
1131
1149
|
export enum KnownInventoryType {
|
|
1150
|
+
/** Cloud */
|
|
1132
1151
|
Cloud = "Cloud",
|
|
1152
|
+
/** VirtualNetwork */
|
|
1133
1153
|
VirtualNetwork = "VirtualNetwork",
|
|
1154
|
+
/** VirtualMachineTemplate */
|
|
1134
1155
|
VirtualMachineTemplate = "VirtualMachineTemplate",
|
|
1156
|
+
/** VirtualMachine */
|
|
1135
1157
|
VirtualMachine = "VirtualMachine"
|
|
1136
1158
|
}
|
|
1137
1159
|
|
package/src/scvmm.ts
CHANGED
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
10
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
11
16
|
import * as coreAuth from "@azure/core-auth";
|
|
12
17
|
import {
|
|
13
18
|
VmmServersImpl,
|
|
@@ -120,6 +125,35 @@ export class Scvmm extends coreClient.ServiceClient {
|
|
|
120
125
|
this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this);
|
|
121
126
|
this.availabilitySets = new AvailabilitySetsImpl(this);
|
|
122
127
|
this.inventoryItems = new InventoryItemsImpl(this);
|
|
128
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
132
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
133
|
+
if (!apiVersion) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const apiVersionPolicy = {
|
|
137
|
+
name: "CustomApiVersionPolicy",
|
|
138
|
+
async sendRequest(
|
|
139
|
+
request: PipelineRequest,
|
|
140
|
+
next: SendRequest
|
|
141
|
+
): Promise<PipelineResponse> {
|
|
142
|
+
const param = request.url.split("?");
|
|
143
|
+
if (param.length > 1) {
|
|
144
|
+
const newParams = param[1].split("&").map((item) => {
|
|
145
|
+
if (item.indexOf("api-version") > -1) {
|
|
146
|
+
return "api-version=" + apiVersion;
|
|
147
|
+
} else {
|
|
148
|
+
return item;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
152
|
+
}
|
|
153
|
+
return next(request);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
123
157
|
}
|
|
124
158
|
|
|
125
159
|
vmmServers: VmmServers;
|
package/types/arm-scvmm.d.ts
CHANGED
|
@@ -299,10 +299,10 @@ export declare interface CloudCapacity {
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
/** The Cloud inventory item. */
|
|
302
|
-
export declare
|
|
302
|
+
export declare interface CloudInventoryItem extends InventoryItemProperties {
|
|
303
303
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
304
304
|
inventoryType: "Cloud";
|
|
305
|
-
}
|
|
305
|
+
}
|
|
306
306
|
|
|
307
307
|
/** List of Clouds. */
|
|
308
308
|
export declare interface CloudListResult {
|
|
@@ -547,7 +547,7 @@ export declare interface HardwareProfileUpdate {
|
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
/** Defines the inventory item. */
|
|
550
|
-
export declare
|
|
550
|
+
export declare interface InventoryItem extends ProxyResource {
|
|
551
551
|
/**
|
|
552
552
|
* The system data.
|
|
553
553
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
@@ -577,7 +577,7 @@ export declare type InventoryItem = ProxyResource & {
|
|
|
577
577
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
578
578
|
*/
|
|
579
579
|
readonly provisioningState?: string;
|
|
580
|
-
}
|
|
580
|
+
}
|
|
581
581
|
|
|
582
582
|
/** Defines the resource properties. */
|
|
583
583
|
export declare interface InventoryItemDetails {
|
|
@@ -716,54 +716,75 @@ export declare type IsCustomizable = string;
|
|
|
716
716
|
|
|
717
717
|
/** Known values of {@link AllocationMethod} that the service accepts. */
|
|
718
718
|
export declare enum KnownAllocationMethod {
|
|
719
|
+
/** Dynamic */
|
|
719
720
|
Dynamic = "Dynamic",
|
|
721
|
+
/** Static */
|
|
720
722
|
Static = "Static"
|
|
721
723
|
}
|
|
722
724
|
|
|
723
725
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
724
726
|
export declare enum KnownCreatedByType {
|
|
727
|
+
/** User */
|
|
725
728
|
User = "User",
|
|
729
|
+
/** Application */
|
|
726
730
|
Application = "Application",
|
|
731
|
+
/** ManagedIdentity */
|
|
727
732
|
ManagedIdentity = "ManagedIdentity",
|
|
733
|
+
/** Key */
|
|
728
734
|
Key = "Key"
|
|
729
735
|
}
|
|
730
736
|
|
|
731
737
|
/** Known values of {@link CreateDiffDisk} that the service accepts. */
|
|
732
738
|
export declare enum KnownCreateDiffDisk {
|
|
739
|
+
/** False */
|
|
733
740
|
False = "false",
|
|
741
|
+
/** True */
|
|
734
742
|
True = "true"
|
|
735
743
|
}
|
|
736
744
|
|
|
737
745
|
/** Known values of {@link DynamicMemoryEnabled} that the service accepts. */
|
|
738
746
|
export declare enum KnownDynamicMemoryEnabled {
|
|
747
|
+
/** False */
|
|
739
748
|
False = "false",
|
|
749
|
+
/** True */
|
|
740
750
|
True = "true"
|
|
741
751
|
}
|
|
742
752
|
|
|
743
753
|
/** Known values of {@link InventoryType} that the service accepts. */
|
|
744
754
|
export declare enum KnownInventoryType {
|
|
755
|
+
/** Cloud */
|
|
745
756
|
Cloud = "Cloud",
|
|
757
|
+
/** VirtualNetwork */
|
|
746
758
|
VirtualNetwork = "VirtualNetwork",
|
|
759
|
+
/** VirtualMachineTemplate */
|
|
747
760
|
VirtualMachineTemplate = "VirtualMachineTemplate",
|
|
761
|
+
/** VirtualMachine */
|
|
748
762
|
VirtualMachine = "VirtualMachine"
|
|
749
763
|
}
|
|
750
764
|
|
|
751
765
|
/** Known values of {@link IsCustomizable} that the service accepts. */
|
|
752
766
|
export declare enum KnownIsCustomizable {
|
|
767
|
+
/** False */
|
|
753
768
|
False = "false",
|
|
769
|
+
/** True */
|
|
754
770
|
True = "true"
|
|
755
771
|
}
|
|
756
772
|
|
|
757
773
|
/** Known values of {@link LimitCpuForMigration} that the service accepts. */
|
|
758
774
|
export declare enum KnownLimitCpuForMigration {
|
|
775
|
+
/** False */
|
|
759
776
|
False = "false",
|
|
777
|
+
/** True */
|
|
760
778
|
True = "true"
|
|
761
779
|
}
|
|
762
780
|
|
|
763
781
|
/** Known values of {@link OsType} that the service accepts. */
|
|
764
782
|
export declare enum KnownOsType {
|
|
783
|
+
/** Windows */
|
|
765
784
|
Windows = "Windows",
|
|
785
|
+
/** Linux */
|
|
766
786
|
Linux = "Linux",
|
|
787
|
+
/** Other */
|
|
767
788
|
Other = "Other"
|
|
768
789
|
}
|
|
769
790
|
|
|
@@ -898,7 +919,8 @@ export declare interface OsProfile {
|
|
|
898
919
|
export declare type OsType = string;
|
|
899
920
|
|
|
900
921
|
/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
|
|
901
|
-
export declare
|
|
922
|
+
export declare interface ProxyResource extends Resource {
|
|
923
|
+
}
|
|
902
924
|
|
|
903
925
|
/** Common fields that are returned in the response for all Azure Resource Manager resources */
|
|
904
926
|
export declare interface Resource {
|
|
@@ -969,6 +991,8 @@ export declare class Scvmm extends coreClient.ServiceClient {
|
|
|
969
991
|
* @param options The parameter options
|
|
970
992
|
*/
|
|
971
993
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ScvmmOptionalParams);
|
|
994
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
995
|
+
private addCustomApiVersionPolicy;
|
|
972
996
|
vmmServers: VmmServers;
|
|
973
997
|
operations: Operations;
|
|
974
998
|
clouds: Clouds;
|
|
@@ -1196,7 +1220,7 @@ export declare interface VirtualMachineDeleteCheckpoint {
|
|
|
1196
1220
|
}
|
|
1197
1221
|
|
|
1198
1222
|
/** The Virtual machine inventory item. */
|
|
1199
|
-
export declare
|
|
1223
|
+
export declare interface VirtualMachineInventoryItem extends InventoryItemProperties {
|
|
1200
1224
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1201
1225
|
inventoryType: "VirtualMachine";
|
|
1202
1226
|
/**
|
|
@@ -1218,7 +1242,7 @@ export declare type VirtualMachineInventoryItem = InventoryItemProperties & {
|
|
|
1218
1242
|
ipAddresses?: string[];
|
|
1219
1243
|
/** Cloud inventory resource details where the VM is present. */
|
|
1220
1244
|
cloud?: InventoryItemDetails;
|
|
1221
|
-
}
|
|
1245
|
+
}
|
|
1222
1246
|
|
|
1223
1247
|
/** List of VirtualMachines. */
|
|
1224
1248
|
export declare interface VirtualMachineListResult {
|
|
@@ -1625,7 +1649,7 @@ export declare interface VirtualMachineTemplate {
|
|
|
1625
1649
|
}
|
|
1626
1650
|
|
|
1627
1651
|
/** The Virtual machine template inventory item. */
|
|
1628
|
-
export declare
|
|
1652
|
+
export declare interface VirtualMachineTemplateInventoryItem extends InventoryItemProperties {
|
|
1629
1653
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1630
1654
|
inventoryType: "VirtualMachineTemplate";
|
|
1631
1655
|
/**
|
|
@@ -1648,7 +1672,7 @@ export declare type VirtualMachineTemplateInventoryItem = InventoryItemPropertie
|
|
|
1648
1672
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1649
1673
|
*/
|
|
1650
1674
|
readonly osName?: string;
|
|
1651
|
-
}
|
|
1675
|
+
}
|
|
1652
1676
|
|
|
1653
1677
|
/** List of VirtualMachineTemplates. */
|
|
1654
1678
|
export declare interface VirtualMachineTemplateListResult {
|
|
@@ -1864,10 +1888,10 @@ export declare interface VirtualNetwork {
|
|
|
1864
1888
|
}
|
|
1865
1889
|
|
|
1866
1890
|
/** The Virtual network inventory item. */
|
|
1867
|
-
export declare
|
|
1891
|
+
export declare interface VirtualNetworkInventoryItem extends InventoryItemProperties {
|
|
1868
1892
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1869
1893
|
inventoryType: "VirtualNetwork";
|
|
1870
|
-
}
|
|
1894
|
+
}
|
|
1871
1895
|
|
|
1872
1896
|
/** List of VirtualNetworks. */
|
|
1873
1897
|
export declare interface VirtualNetworkListResult {
|