@azure/arm-containerinstance 9.1.1-alpha.20241023.1 → 9.2.0-beta.1
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 +41 -10
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +1855 -966
- 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/containerGroupProfileGetByRevisionNumberSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfileGetByRevisionNumberSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfileGetByRevisionNumberSample.js +40 -0
- package/dist-esm/samples-dev/containerGroupProfileGetByRevisionNumberSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfileListAllRevisionsSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfileListAllRevisionsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfileListAllRevisionsSample.js +55 -0
- package/dist-esm/samples-dev/containerGroupProfileListAllRevisionsSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesCreateOrUpdateSample.js +260 -0
- package/dist-esm/samples-dev/containerGroupProfilesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/containerGroupProfilesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesGetSample.js +58 -0
- package/dist-esm/samples-dev/containerGroupProfilesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesListByResourceGroupSample.js +54 -0
- package/dist-esm/samples-dev/containerGroupProfilesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesListSample.js +53 -0
- package/dist-esm/samples-dev/containerGroupProfilesListSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesPatchSample.d.ts +2 -0
- package/dist-esm/samples-dev/containerGroupProfilesPatchSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/containerGroupProfilesPatchSample.js +42 -0
- package/dist-esm/samples-dev/containerGroupProfilesPatchSample.js.map +1 -0
- package/dist-esm/samples-dev/containerGroupsCreateOrUpdateSample.js +88 -51
- package/dist-esm/samples-dev/containerGroupsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsDeleteSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsGetSample.js +9 -6
- package/dist-esm/samples-dev/containerGroupsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsListByResourceGroupSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsListSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsListSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsRestartSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsRestartSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsStartSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsStartSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsStopSample.js +3 -2
- package/dist-esm/samples-dev/containerGroupsStopSample.js.map +1 -1
- package/dist-esm/samples-dev/containerGroupsUpdateSample.js +5 -4
- package/dist-esm/samples-dev/containerGroupsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/containersAttachSample.js +3 -2
- package/dist-esm/samples-dev/containersAttachSample.js.map +1 -1
- package/dist-esm/samples-dev/containersExecuteCommandSample.js +5 -4
- package/dist-esm/samples-dev/containersExecuteCommandSample.js.map +1 -1
- package/dist-esm/samples-dev/containersListLogsSample.js +4 -3
- package/dist-esm/samples-dev/containersListLogsSample.js.map +1 -1
- package/dist-esm/samples-dev/locationListCachedImagesSample.js +3 -2
- package/dist-esm/samples-dev/locationListCachedImagesSample.js.map +1 -1
- package/dist-esm/samples-dev/locationListCapabilitiesSample.js +3 -2
- package/dist-esm/samples-dev/locationListCapabilitiesSample.js.map +1 -1
- package/dist-esm/samples-dev/locationListUsageSample.js +3 -2
- package/dist-esm/samples-dev/locationListUsageSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/subnetServiceAssociationLinkDeleteSample.js +3 -2
- package/dist-esm/samples-dev/subnetServiceAssociationLinkDeleteSample.js.map +1 -1
- package/dist-esm/src/containerInstanceManagementClient.d.ts +4 -3
- package/dist-esm/src/containerInstanceManagementClient.d.ts.map +1 -1
- package/dist-esm/src/containerInstanceManagementClient.js +13 -11
- package/dist-esm/src/containerInstanceManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +145 -3
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +7 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +898 -640
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +87 -47
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/containerGroupProfileOperations.d.ts +55 -0
- package/dist-esm/src/operations/containerGroupProfileOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/containerGroupProfileOperations.js +191 -0
- package/dist-esm/src/operations/containerGroupProfileOperations.js.map +1 -0
- package/dist-esm/src/operations/containerGroupProfiles.d.ts +95 -0
- package/dist-esm/src/operations/containerGroupProfiles.d.ts.map +1 -0
- package/dist-esm/src/operations/containerGroupProfiles.js +401 -0
- package/dist-esm/src/operations/containerGroupProfiles.js.map +1 -0
- package/dist-esm/src/operations/containerGroups.d.ts +15 -15
- package/dist-esm/src/operations/containerGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/containerGroups.js +97 -97
- package/dist-esm/src/operations/containerGroups.js.map +1 -1
- package/dist-esm/src/operations/containers.d.ts +3 -3
- package/dist-esm/src/operations/containers.js +20 -20
- package/dist-esm/src/operations/containers.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +2 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/location.d.ts +8 -8
- package/dist-esm/src/operations/location.js +36 -36
- package/dist-esm/src/operations/location.js.map +1 -1
- package/dist-esm/src/operations/operations.js +9 -9
- package/dist-esm/src/operations/subnetServiceAssociationLink.d.ts +2 -2
- package/dist-esm/src/operations/subnetServiceAssociationLink.d.ts.map +1 -1
- package/dist-esm/src/operations/subnetServiceAssociationLink.js +11 -11
- package/dist-esm/src/operations/subnetServiceAssociationLink.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/containerGroupProfileOperations.d.ts +27 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfileOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfileOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfileOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfiles.d.ts +55 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfiles.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfiles.js +9 -0
- package/dist-esm/src/operationsInterfaces/containerGroupProfiles.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerGroups.d.ts +13 -13
- package/dist-esm/src/operationsInterfaces/containers.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +2 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/location.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/subnetServiceAssociationLink.d.ts +2 -2
- package/dist-esm/test/containerinstance_examples.d.ts.map +1 -1
- package/dist-esm/test/containerinstance_examples.js +1 -4
- package/dist-esm/test/containerinstance_examples.js.map +1 -1
- package/package.json +31 -35
- package/review/arm-containerinstance.api.md +155 -3
- package/src/containerInstanceManagementClient.ts +29 -20
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +194 -17
- package/src/models/mappers.ts +974 -702
- package/src/models/parameters.ts +94 -48
- package/src/operations/containerGroupProfileOperations.ts +255 -0
- package/src/operations/containerGroupProfiles.ts +485 -0
- package/src/operations/containerGroups.ts +188 -201
- package/src/operations/containers.ts +30 -33
- package/src/operations/index.ts +2 -0
- package/src/operations/location.ts +63 -66
- package/src/operations/operations.ts +16 -16
- package/src/operations/subnetServiceAssociationLink.ts +24 -25
- package/src/operationsInterfaces/containerGroupProfileOperations.ts +50 -0
- package/src/operationsInterfaces/containerGroupProfiles.ts +99 -0
- package/src/operationsInterfaces/containerGroups.ts +28 -28
- package/src/operationsInterfaces/containers.ts +7 -7
- package/src/operationsInterfaces/index.ts +2 -0
- package/src/operationsInterfaces/location.ts +7 -7
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/subnetServiceAssociationLink.ts +4 -4
- package/src/pagingHelper.ts +1 -1
- package/types/arm-containerinstance.d.ts +275 -26
package/src/models/parameters.ts
CHANGED
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
import {
|
|
10
10
|
OperationParameter,
|
|
11
11
|
OperationURLParameter,
|
|
12
|
-
OperationQueryParameter
|
|
12
|
+
OperationQueryParameter,
|
|
13
13
|
} from "@azure/core-client";
|
|
14
14
|
import {
|
|
15
15
|
ContainerGroup as ContainerGroupMapper,
|
|
16
16
|
Resource as ResourceMapper,
|
|
17
|
-
ContainerExecRequest as ContainerExecRequestMapper
|
|
17
|
+
ContainerExecRequest as ContainerExecRequestMapper,
|
|
18
|
+
ContainerGroupProfile as ContainerGroupProfileMapper,
|
|
19
|
+
ContainerGroupProfilePatch as ContainerGroupProfilePatchMapper,
|
|
18
20
|
} from "../models/mappers";
|
|
19
21
|
|
|
20
22
|
export const accept: OperationParameter = {
|
|
@@ -24,9 +26,9 @@ export const accept: OperationParameter = {
|
|
|
24
26
|
isConstant: true,
|
|
25
27
|
serializedName: "Accept",
|
|
26
28
|
type: {
|
|
27
|
-
name: "String"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
29
|
+
name: "String",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export const $host: OperationURLParameter = {
|
|
@@ -35,10 +37,10 @@ export const $host: OperationURLParameter = {
|
|
|
35
37
|
serializedName: "$host",
|
|
36
38
|
required: true,
|
|
37
39
|
type: {
|
|
38
|
-
name: "String"
|
|
39
|
-
}
|
|
40
|
+
name: "String",
|
|
41
|
+
},
|
|
40
42
|
},
|
|
41
|
-
skipEncoding: true
|
|
43
|
+
skipEncoding: true,
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
export const subscriptionId: OperationURLParameter = {
|
|
@@ -47,32 +49,36 @@ export const subscriptionId: OperationURLParameter = {
|
|
|
47
49
|
serializedName: "subscriptionId",
|
|
48
50
|
required: true,
|
|
49
51
|
type: {
|
|
50
|
-
name: "
|
|
51
|
-
}
|
|
52
|
-
}
|
|
52
|
+
name: "Uuid",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
53
55
|
};
|
|
54
56
|
|
|
55
57
|
export const apiVersion: OperationQueryParameter = {
|
|
56
58
|
parameterPath: "apiVersion",
|
|
57
59
|
mapper: {
|
|
58
|
-
defaultValue: "
|
|
60
|
+
defaultValue: "2024-05-01-preview",
|
|
59
61
|
isConstant: true,
|
|
60
62
|
serializedName: "api-version",
|
|
61
63
|
type: {
|
|
62
|
-
name: "String"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
64
|
+
name: "String",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
export const resourceGroupName: OperationURLParameter = {
|
|
68
70
|
parameterPath: "resourceGroupName",
|
|
69
71
|
mapper: {
|
|
72
|
+
constraints: {
|
|
73
|
+
MaxLength: 90,
|
|
74
|
+
MinLength: 1,
|
|
75
|
+
},
|
|
70
76
|
serializedName: "resourceGroupName",
|
|
71
77
|
required: true,
|
|
72
78
|
type: {
|
|
73
|
-
name: "String"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
79
|
+
name: "String",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
76
82
|
};
|
|
77
83
|
|
|
78
84
|
export const containerGroupName: OperationURLParameter = {
|
|
@@ -81,9 +87,9 @@ export const containerGroupName: OperationURLParameter = {
|
|
|
81
87
|
serializedName: "containerGroupName",
|
|
82
88
|
required: true,
|
|
83
89
|
type: {
|
|
84
|
-
name: "String"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
90
|
+
name: "String",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
87
93
|
};
|
|
88
94
|
|
|
89
95
|
export const contentType: OperationParameter = {
|
|
@@ -93,19 +99,19 @@ export const contentType: OperationParameter = {
|
|
|
93
99
|
isConstant: true,
|
|
94
100
|
serializedName: "Content-Type",
|
|
95
101
|
type: {
|
|
96
|
-
name: "String"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
102
|
+
name: "String",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
99
105
|
};
|
|
100
106
|
|
|
101
107
|
export const containerGroup: OperationParameter = {
|
|
102
108
|
parameterPath: "containerGroup",
|
|
103
|
-
mapper: ContainerGroupMapper
|
|
109
|
+
mapper: ContainerGroupMapper,
|
|
104
110
|
};
|
|
105
111
|
|
|
106
112
|
export const resource: OperationParameter = {
|
|
107
113
|
parameterPath: "resource",
|
|
108
|
-
mapper: ResourceMapper
|
|
114
|
+
mapper: ResourceMapper,
|
|
109
115
|
};
|
|
110
116
|
|
|
111
117
|
export const nextLink: OperationURLParameter = {
|
|
@@ -114,21 +120,24 @@ export const nextLink: OperationURLParameter = {
|
|
|
114
120
|
serializedName: "nextLink",
|
|
115
121
|
required: true,
|
|
116
122
|
type: {
|
|
117
|
-
name: "String"
|
|
118
|
-
}
|
|
123
|
+
name: "String",
|
|
124
|
+
},
|
|
119
125
|
},
|
|
120
|
-
skipEncoding: true
|
|
126
|
+
skipEncoding: true,
|
|
121
127
|
};
|
|
122
128
|
|
|
123
129
|
export const location: OperationURLParameter = {
|
|
124
130
|
parameterPath: "location",
|
|
125
131
|
mapper: {
|
|
132
|
+
constraints: {
|
|
133
|
+
MinLength: 1,
|
|
134
|
+
},
|
|
126
135
|
serializedName: "location",
|
|
127
136
|
required: true,
|
|
128
137
|
type: {
|
|
129
|
-
name: "String"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
138
|
+
name: "String",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
132
141
|
};
|
|
133
142
|
|
|
134
143
|
export const containerName: OperationURLParameter = {
|
|
@@ -137,9 +146,9 @@ export const containerName: OperationURLParameter = {
|
|
|
137
146
|
serializedName: "containerName",
|
|
138
147
|
required: true,
|
|
139
148
|
type: {
|
|
140
|
-
name: "String"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
149
|
+
name: "String",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
143
152
|
};
|
|
144
153
|
|
|
145
154
|
export const tail: OperationQueryParameter = {
|
|
@@ -147,9 +156,9 @@ export const tail: OperationQueryParameter = {
|
|
|
147
156
|
mapper: {
|
|
148
157
|
serializedName: "tail",
|
|
149
158
|
type: {
|
|
150
|
-
name: "Number"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
159
|
+
name: "Number",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
153
162
|
};
|
|
154
163
|
|
|
155
164
|
export const timestamps: OperationQueryParameter = {
|
|
@@ -157,14 +166,14 @@ export const timestamps: OperationQueryParameter = {
|
|
|
157
166
|
mapper: {
|
|
158
167
|
serializedName: "timestamps",
|
|
159
168
|
type: {
|
|
160
|
-
name: "Boolean"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
169
|
+
name: "Boolean",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
163
172
|
};
|
|
164
173
|
|
|
165
174
|
export const containerExecRequest: OperationParameter = {
|
|
166
175
|
parameterPath: "containerExecRequest",
|
|
167
|
-
mapper: ContainerExecRequestMapper
|
|
176
|
+
mapper: ContainerExecRequestMapper,
|
|
168
177
|
};
|
|
169
178
|
|
|
170
179
|
export const virtualNetworkName: OperationURLParameter = {
|
|
@@ -173,9 +182,9 @@ export const virtualNetworkName: OperationURLParameter = {
|
|
|
173
182
|
serializedName: "virtualNetworkName",
|
|
174
183
|
required: true,
|
|
175
184
|
type: {
|
|
176
|
-
name: "String"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
185
|
+
name: "String",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
179
188
|
};
|
|
180
189
|
|
|
181
190
|
export const subnetName: OperationURLParameter = {
|
|
@@ -184,7 +193,44 @@ export const subnetName: OperationURLParameter = {
|
|
|
184
193
|
serializedName: "subnetName",
|
|
185
194
|
required: true,
|
|
186
195
|
type: {
|
|
187
|
-
name: "String"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
196
|
+
name: "String",
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const containerGroupProfileName: OperationURLParameter = {
|
|
202
|
+
parameterPath: "containerGroupProfileName",
|
|
203
|
+
mapper: {
|
|
204
|
+
constraints: {
|
|
205
|
+
Pattern: new RegExp("^(?!.*--)[a-z0-9]([-a-z0-9]*[a-z0-9])?$"),
|
|
206
|
+
MaxLength: 63,
|
|
207
|
+
MinLength: 1,
|
|
208
|
+
},
|
|
209
|
+
serializedName: "containerGroupProfileName",
|
|
210
|
+
required: true,
|
|
211
|
+
type: {
|
|
212
|
+
name: "String",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export const containerGroupProfile: OperationParameter = {
|
|
218
|
+
parameterPath: "containerGroupProfile",
|
|
219
|
+
mapper: ContainerGroupProfileMapper,
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export const properties: OperationParameter = {
|
|
223
|
+
parameterPath: "properties",
|
|
224
|
+
mapper: ContainerGroupProfilePatchMapper,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export const revisionNumber: OperationURLParameter = {
|
|
228
|
+
parameterPath: "revisionNumber",
|
|
229
|
+
mapper: {
|
|
230
|
+
serializedName: "revisionNumber",
|
|
231
|
+
required: true,
|
|
232
|
+
type: {
|
|
233
|
+
name: "String",
|
|
234
|
+
},
|
|
235
|
+
},
|
|
190
236
|
};
|
|
@@ -0,0 +1,255 @@
|
|
|
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
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { ContainerGroupProfileOperations } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { ContainerInstanceManagementClient } from "../containerInstanceManagementClient";
|
|
16
|
+
import {
|
|
17
|
+
ContainerGroupProfile,
|
|
18
|
+
ContainerGroupProfileListAllRevisionsNextOptionalParams,
|
|
19
|
+
ContainerGroupProfileListAllRevisionsOptionalParams,
|
|
20
|
+
ContainerGroupProfileListAllRevisionsResponse,
|
|
21
|
+
ContainerGroupProfileGetByRevisionNumberOptionalParams,
|
|
22
|
+
ContainerGroupProfileGetByRevisionNumberResponse,
|
|
23
|
+
ContainerGroupProfileListAllRevisionsNextResponse,
|
|
24
|
+
} from "../models";
|
|
25
|
+
|
|
26
|
+
/// <reference lib="esnext.asynciterable" />
|
|
27
|
+
/** Class containing ContainerGroupProfileOperations operations. */
|
|
28
|
+
export class ContainerGroupProfileOperationsImpl
|
|
29
|
+
implements ContainerGroupProfileOperations
|
|
30
|
+
{
|
|
31
|
+
private readonly client: ContainerInstanceManagementClient;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Initialize a new instance of the class ContainerGroupProfileOperations class.
|
|
35
|
+
* @param client Reference to the service client
|
|
36
|
+
*/
|
|
37
|
+
constructor(client: ContainerInstanceManagementClient) {
|
|
38
|
+
this.client = client;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get a list of all the revisions of the specified container group profile in the given subscription
|
|
43
|
+
* and resource group. This operation returns properties of each revision of the specified container
|
|
44
|
+
* group profile including containers, image registry credentials, restart policy, IP address type, OS
|
|
45
|
+
* type volumes, revision number, etc.
|
|
46
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
47
|
+
* @param containerGroupProfileName The name of the container group profile.
|
|
48
|
+
* @param options The options parameters.
|
|
49
|
+
*/
|
|
50
|
+
public listAllRevisions(
|
|
51
|
+
resourceGroupName: string,
|
|
52
|
+
containerGroupProfileName: string,
|
|
53
|
+
options?: ContainerGroupProfileListAllRevisionsOptionalParams,
|
|
54
|
+
): PagedAsyncIterableIterator<ContainerGroupProfile> {
|
|
55
|
+
const iter = this.listAllRevisionsPagingAll(
|
|
56
|
+
resourceGroupName,
|
|
57
|
+
containerGroupProfileName,
|
|
58
|
+
options,
|
|
59
|
+
);
|
|
60
|
+
return {
|
|
61
|
+
next() {
|
|
62
|
+
return iter.next();
|
|
63
|
+
},
|
|
64
|
+
[Symbol.asyncIterator]() {
|
|
65
|
+
return this;
|
|
66
|
+
},
|
|
67
|
+
byPage: (settings?: PageSettings) => {
|
|
68
|
+
if (settings?.maxPageSize) {
|
|
69
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
70
|
+
}
|
|
71
|
+
return this.listAllRevisionsPagingPage(
|
|
72
|
+
resourceGroupName,
|
|
73
|
+
containerGroupProfileName,
|
|
74
|
+
options,
|
|
75
|
+
settings,
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async *listAllRevisionsPagingPage(
|
|
82
|
+
resourceGroupName: string,
|
|
83
|
+
containerGroupProfileName: string,
|
|
84
|
+
options?: ContainerGroupProfileListAllRevisionsOptionalParams,
|
|
85
|
+
settings?: PageSettings,
|
|
86
|
+
): AsyncIterableIterator<ContainerGroupProfile[]> {
|
|
87
|
+
let result: ContainerGroupProfileListAllRevisionsResponse;
|
|
88
|
+
let continuationToken = settings?.continuationToken;
|
|
89
|
+
if (!continuationToken) {
|
|
90
|
+
result = await this._listAllRevisions(
|
|
91
|
+
resourceGroupName,
|
|
92
|
+
containerGroupProfileName,
|
|
93
|
+
options,
|
|
94
|
+
);
|
|
95
|
+
let page = result.value || [];
|
|
96
|
+
continuationToken = result.nextLink;
|
|
97
|
+
setContinuationToken(page, continuationToken);
|
|
98
|
+
yield page;
|
|
99
|
+
}
|
|
100
|
+
while (continuationToken) {
|
|
101
|
+
result = await this._listAllRevisionsNext(
|
|
102
|
+
resourceGroupName,
|
|
103
|
+
containerGroupProfileName,
|
|
104
|
+
continuationToken,
|
|
105
|
+
options,
|
|
106
|
+
);
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
setContinuationToken(page, continuationToken);
|
|
110
|
+
yield page;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
private async *listAllRevisionsPagingAll(
|
|
115
|
+
resourceGroupName: string,
|
|
116
|
+
containerGroupProfileName: string,
|
|
117
|
+
options?: ContainerGroupProfileListAllRevisionsOptionalParams,
|
|
118
|
+
): AsyncIterableIterator<ContainerGroupProfile> {
|
|
119
|
+
for await (const page of this.listAllRevisionsPagingPage(
|
|
120
|
+
resourceGroupName,
|
|
121
|
+
containerGroupProfileName,
|
|
122
|
+
options,
|
|
123
|
+
)) {
|
|
124
|
+
yield* page;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Get a list of all the revisions of the specified container group profile in the given subscription
|
|
130
|
+
* and resource group. This operation returns properties of each revision of the specified container
|
|
131
|
+
* group profile including containers, image registry credentials, restart policy, IP address type, OS
|
|
132
|
+
* type volumes, revision number, etc.
|
|
133
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
134
|
+
* @param containerGroupProfileName The name of the container group profile.
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
private _listAllRevisions(
|
|
138
|
+
resourceGroupName: string,
|
|
139
|
+
containerGroupProfileName: string,
|
|
140
|
+
options?: ContainerGroupProfileListAllRevisionsOptionalParams,
|
|
141
|
+
): Promise<ContainerGroupProfileListAllRevisionsResponse> {
|
|
142
|
+
return this.client.sendOperationRequest(
|
|
143
|
+
{ resourceGroupName, containerGroupProfileName, options },
|
|
144
|
+
listAllRevisionsOperationSpec,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Gets the properties of the specified revision of the container group profile in the given
|
|
150
|
+
* subscription and resource group. The operation returns the properties of container group profile
|
|
151
|
+
* including containers, image registry credentials, restart policy, IP address type, OS type, volumes,
|
|
152
|
+
* current revision number, etc.
|
|
153
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
154
|
+
* @param containerGroupProfileName The name of the container group profile.
|
|
155
|
+
* @param revisionNumber The revision number of the container group profile.
|
|
156
|
+
* @param options The options parameters.
|
|
157
|
+
*/
|
|
158
|
+
getByRevisionNumber(
|
|
159
|
+
resourceGroupName: string,
|
|
160
|
+
containerGroupProfileName: string,
|
|
161
|
+
revisionNumber: string,
|
|
162
|
+
options?: ContainerGroupProfileGetByRevisionNumberOptionalParams,
|
|
163
|
+
): Promise<ContainerGroupProfileGetByRevisionNumberResponse> {
|
|
164
|
+
return this.client.sendOperationRequest(
|
|
165
|
+
{ resourceGroupName, containerGroupProfileName, revisionNumber, options },
|
|
166
|
+
getByRevisionNumberOperationSpec,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* ListAllRevisionsNext
|
|
172
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
173
|
+
* @param containerGroupProfileName The name of the container group profile.
|
|
174
|
+
* @param nextLink The nextLink from the previous successful call to the ListAllRevisions method.
|
|
175
|
+
* @param options The options parameters.
|
|
176
|
+
*/
|
|
177
|
+
private _listAllRevisionsNext(
|
|
178
|
+
resourceGroupName: string,
|
|
179
|
+
containerGroupProfileName: string,
|
|
180
|
+
nextLink: string,
|
|
181
|
+
options?: ContainerGroupProfileListAllRevisionsNextOptionalParams,
|
|
182
|
+
): Promise<ContainerGroupProfileListAllRevisionsNextResponse> {
|
|
183
|
+
return this.client.sendOperationRequest(
|
|
184
|
+
{ resourceGroupName, containerGroupProfileName, nextLink, options },
|
|
185
|
+
listAllRevisionsNextOperationSpec,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// Operation Specifications
|
|
190
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
191
|
+
|
|
192
|
+
const listAllRevisionsOperationSpec: coreClient.OperationSpec = {
|
|
193
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions",
|
|
194
|
+
httpMethod: "GET",
|
|
195
|
+
responses: {
|
|
196
|
+
200: {
|
|
197
|
+
bodyMapper: Mappers.ContainerGroupProfileListResult,
|
|
198
|
+
},
|
|
199
|
+
default: {
|
|
200
|
+
bodyMapper: Mappers.CloudError,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
queryParameters: [Parameters.apiVersion],
|
|
204
|
+
urlParameters: [
|
|
205
|
+
Parameters.$host,
|
|
206
|
+
Parameters.subscriptionId,
|
|
207
|
+
Parameters.resourceGroupName,
|
|
208
|
+
Parameters.containerGroupProfileName,
|
|
209
|
+
],
|
|
210
|
+
headerParameters: [Parameters.accept],
|
|
211
|
+
serializer,
|
|
212
|
+
};
|
|
213
|
+
const getByRevisionNumberOperationSpec: coreClient.OperationSpec = {
|
|
214
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}",
|
|
215
|
+
httpMethod: "GET",
|
|
216
|
+
responses: {
|
|
217
|
+
200: {
|
|
218
|
+
bodyMapper: Mappers.ContainerGroupProfile,
|
|
219
|
+
},
|
|
220
|
+
default: {
|
|
221
|
+
bodyMapper: Mappers.CloudError,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
queryParameters: [Parameters.apiVersion],
|
|
225
|
+
urlParameters: [
|
|
226
|
+
Parameters.$host,
|
|
227
|
+
Parameters.subscriptionId,
|
|
228
|
+
Parameters.resourceGroupName,
|
|
229
|
+
Parameters.containerGroupProfileName,
|
|
230
|
+
Parameters.revisionNumber,
|
|
231
|
+
],
|
|
232
|
+
headerParameters: [Parameters.accept],
|
|
233
|
+
serializer,
|
|
234
|
+
};
|
|
235
|
+
const listAllRevisionsNextOperationSpec: coreClient.OperationSpec = {
|
|
236
|
+
path: "{nextLink}",
|
|
237
|
+
httpMethod: "GET",
|
|
238
|
+
responses: {
|
|
239
|
+
200: {
|
|
240
|
+
bodyMapper: Mappers.ContainerGroupProfileListResult,
|
|
241
|
+
},
|
|
242
|
+
default: {
|
|
243
|
+
bodyMapper: Mappers.CloudError,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
urlParameters: [
|
|
247
|
+
Parameters.$host,
|
|
248
|
+
Parameters.subscriptionId,
|
|
249
|
+
Parameters.resourceGroupName,
|
|
250
|
+
Parameters.nextLink,
|
|
251
|
+
Parameters.containerGroupProfileName,
|
|
252
|
+
],
|
|
253
|
+
headerParameters: [Parameters.accept],
|
|
254
|
+
serializer,
|
|
255
|
+
};
|