@azure/arm-quantum 1.0.0-alpha.20240312.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 +26 -8
- package/LICENSE +1 -1
- package/dist/index.js +668 -471
- 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/offeringsListSample.js +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/workspaceCheckNameAvailabilitySample.js +3 -3
- package/dist-esm/samples-dev/workspaceCheckNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/workspaceListKeysSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.js +39 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.js.map +1 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.js +40 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +10 -8
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/workspacesGetSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/workspacesUpdateTagsSample.js +2 -2
- package/dist-esm/src/azureQuantumManagementClient.d.ts +1 -1
- package/dist-esm/src/azureQuantumManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureQuantumManagementClient.js +9 -9
- package/dist-esm/src/azureQuantumManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +106 -41
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +8 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +5 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +454 -345
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +1 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +43 -32
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/offerings.js +11 -11
- package/dist-esm/src/operations/offerings.js.map +1 -1
- package/dist-esm/src/operations/operations.js +9 -9
- package/dist-esm/src/operations/workspace.d.ts +19 -1
- package/dist-esm/src/operations/workspace.d.ts.map +1 -1
- package/dist-esm/src/operations/workspace.js +69 -5
- package/dist-esm/src/operations/workspace.js.map +1 -1
- package/dist-esm/src/operations/workspaces.d.ts +9 -9
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaces.js +62 -61
- package/dist-esm/src/operations/workspaces.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/workspace.d.ts +19 -1
- package/dist-esm/src/operationsInterfaces/workspace.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +7 -7
- package/dist-esm/test/quantum_operations_test.spec.js +12 -9
- package/dist-esm/test/quantum_operations_test.spec.js.map +1 -1
- package/package.json +10 -10
- package/review/arm-quantum.api.md +55 -6
- package/src/azureQuantumManagementClient.ts +18 -17
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +123 -48
- package/src/models/mappers.ts +476 -367
- package/src/models/parameters.ts +46 -33
- package/src/operations/offerings.ts +20 -21
- package/src/operations/operations.ts +16 -16
- package/src/operations/workspace.ts +94 -10
- package/src/operations/workspaces.ts +110 -117
- package/src/operationsInterfaces/offerings.ts +1 -1
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/workspace.ts +33 -2
- package/src/operationsInterfaces/workspaces.ts +16 -16
- package/src/pagingHelper.ts +1 -1
- package/types/arm-quantum.d.ts +127 -34
- package/types/tsdoc-metadata.json +1 -1
package/src/models/parameters.ts
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
import {
|
|
10
10
|
OperationParameter,
|
|
11
11
|
OperationURLParameter,
|
|
12
|
-
OperationQueryParameter
|
|
12
|
+
OperationQueryParameter,
|
|
13
13
|
} from "@azure/core-client";
|
|
14
14
|
import {
|
|
15
15
|
QuantumWorkspace as QuantumWorkspaceMapper,
|
|
16
16
|
TagsObject as TagsObjectMapper,
|
|
17
|
-
CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper
|
|
17
|
+
CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper,
|
|
18
|
+
APIKeys as APIKeysMapper,
|
|
18
19
|
} from "../models/mappers";
|
|
19
20
|
|
|
20
21
|
export const accept: OperationParameter = {
|
|
@@ -24,9 +25,9 @@ export const accept: OperationParameter = {
|
|
|
24
25
|
isConstant: true,
|
|
25
26
|
serializedName: "Accept",
|
|
26
27
|
type: {
|
|
27
|
-
name: "String"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
28
|
+
name: "String",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export const $host: OperationURLParameter = {
|
|
@@ -35,33 +36,37 @@ export const $host: OperationURLParameter = {
|
|
|
35
36
|
serializedName: "$host",
|
|
36
37
|
required: true,
|
|
37
38
|
type: {
|
|
38
|
-
name: "String"
|
|
39
|
-
}
|
|
39
|
+
name: "String",
|
|
40
|
+
},
|
|
40
41
|
},
|
|
41
|
-
skipEncoding: true
|
|
42
|
+
skipEncoding: true,
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
export const resourceGroupName: OperationURLParameter = {
|
|
45
46
|
parameterPath: "resourceGroupName",
|
|
46
47
|
mapper: {
|
|
48
|
+
constraints: {
|
|
49
|
+
MaxLength: 90,
|
|
50
|
+
MinLength: 1,
|
|
51
|
+
},
|
|
47
52
|
serializedName: "resourceGroupName",
|
|
48
53
|
required: true,
|
|
49
54
|
type: {
|
|
50
|
-
name: "String"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
55
|
+
name: "String",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
export const apiVersion: OperationQueryParameter = {
|
|
56
61
|
parameterPath: "apiVersion",
|
|
57
62
|
mapper: {
|
|
58
|
-
defaultValue: "
|
|
63
|
+
defaultValue: "2023-11-13-preview",
|
|
59
64
|
isConstant: true,
|
|
60
65
|
serializedName: "api-version",
|
|
61
66
|
type: {
|
|
62
|
-
name: "String"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
67
|
+
name: "String",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
export const subscriptionId: OperationURLParameter = {
|
|
@@ -70,20 +75,23 @@ export const subscriptionId: OperationURLParameter = {
|
|
|
70
75
|
serializedName: "subscriptionId",
|
|
71
76
|
required: true,
|
|
72
77
|
type: {
|
|
73
|
-
name: "
|
|
74
|
-
}
|
|
75
|
-
}
|
|
78
|
+
name: "Uuid",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
76
81
|
};
|
|
77
82
|
|
|
78
83
|
export const workspaceName: OperationURLParameter = {
|
|
79
84
|
parameterPath: "workspaceName",
|
|
80
85
|
mapper: {
|
|
86
|
+
constraints: {
|
|
87
|
+
Pattern: new RegExp("^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"),
|
|
88
|
+
},
|
|
81
89
|
serializedName: "workspaceName",
|
|
82
90
|
required: true,
|
|
83
91
|
type: {
|
|
84
|
-
name: "String"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
92
|
+
name: "String",
|
|
93
|
+
},
|
|
94
|
+
},
|
|
87
95
|
};
|
|
88
96
|
|
|
89
97
|
export const contentType: OperationParameter = {
|
|
@@ -93,19 +101,19 @@ export const contentType: OperationParameter = {
|
|
|
93
101
|
isConstant: true,
|
|
94
102
|
serializedName: "Content-Type",
|
|
95
103
|
type: {
|
|
96
|
-
name: "String"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
104
|
+
name: "String",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
99
107
|
};
|
|
100
108
|
|
|
101
109
|
export const quantumWorkspace: OperationParameter = {
|
|
102
110
|
parameterPath: "quantumWorkspace",
|
|
103
|
-
mapper: QuantumWorkspaceMapper
|
|
111
|
+
mapper: QuantumWorkspaceMapper,
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
export const workspaceTags: OperationParameter = {
|
|
107
115
|
parameterPath: "workspaceTags",
|
|
108
|
-
mapper: TagsObjectMapper
|
|
116
|
+
mapper: TagsObjectMapper,
|
|
109
117
|
};
|
|
110
118
|
|
|
111
119
|
export const nextLink: OperationURLParameter = {
|
|
@@ -114,10 +122,10 @@ export const nextLink: OperationURLParameter = {
|
|
|
114
122
|
serializedName: "nextLink",
|
|
115
123
|
required: true,
|
|
116
124
|
type: {
|
|
117
|
-
name: "String"
|
|
118
|
-
}
|
|
125
|
+
name: "String",
|
|
126
|
+
},
|
|
119
127
|
},
|
|
120
|
-
skipEncoding: true
|
|
128
|
+
skipEncoding: true,
|
|
121
129
|
};
|
|
122
130
|
|
|
123
131
|
export const locationName: OperationURLParameter = {
|
|
@@ -126,12 +134,17 @@ export const locationName: OperationURLParameter = {
|
|
|
126
134
|
serializedName: "locationName",
|
|
127
135
|
required: true,
|
|
128
136
|
type: {
|
|
129
|
-
name: "String"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
137
|
+
name: "String",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
132
140
|
};
|
|
133
141
|
|
|
134
142
|
export const checkNameAvailabilityParameters: OperationParameter = {
|
|
135
143
|
parameterPath: "checkNameAvailabilityParameters",
|
|
136
|
-
mapper: CheckNameAvailabilityParametersMapper
|
|
144
|
+
mapper: CheckNameAvailabilityParametersMapper,
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export const keySpecification: OperationParameter = {
|
|
148
|
+
parameterPath: "keySpecification",
|
|
149
|
+
mapper: APIKeysMapper,
|
|
137
150
|
};
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
OfferingsListNextOptionalParams,
|
|
19
19
|
OfferingsListOptionalParams,
|
|
20
20
|
OfferingsListResponse,
|
|
21
|
-
OfferingsListNextResponse
|
|
21
|
+
OfferingsListNextResponse,
|
|
22
22
|
} from "../models";
|
|
23
23
|
|
|
24
24
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -41,7 +41,7 @@ export class OfferingsImpl implements Offerings {
|
|
|
41
41
|
*/
|
|
42
42
|
public list(
|
|
43
43
|
locationName: string,
|
|
44
|
-
options?: OfferingsListOptionalParams
|
|
44
|
+
options?: OfferingsListOptionalParams,
|
|
45
45
|
): PagedAsyncIterableIterator<ProviderDescription> {
|
|
46
46
|
const iter = this.listPagingAll(locationName, options);
|
|
47
47
|
return {
|
|
@@ -56,14 +56,14 @@ export class OfferingsImpl implements Offerings {
|
|
|
56
56
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
57
57
|
}
|
|
58
58
|
return this.listPagingPage(locationName, options, settings);
|
|
59
|
-
}
|
|
59
|
+
},
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
private async *listPagingPage(
|
|
64
64
|
locationName: string,
|
|
65
65
|
options?: OfferingsListOptionalParams,
|
|
66
|
-
settings?: PageSettings
|
|
66
|
+
settings?: PageSettings,
|
|
67
67
|
): AsyncIterableIterator<ProviderDescription[]> {
|
|
68
68
|
let result: OfferingsListResponse;
|
|
69
69
|
let continuationToken = settings?.continuationToken;
|
|
@@ -85,7 +85,7 @@ export class OfferingsImpl implements Offerings {
|
|
|
85
85
|
|
|
86
86
|
private async *listPagingAll(
|
|
87
87
|
locationName: string,
|
|
88
|
-
options?: OfferingsListOptionalParams
|
|
88
|
+
options?: OfferingsListOptionalParams,
|
|
89
89
|
): AsyncIterableIterator<ProviderDescription> {
|
|
90
90
|
for await (const page of this.listPagingPage(locationName, options)) {
|
|
91
91
|
yield* page;
|
|
@@ -99,11 +99,11 @@ export class OfferingsImpl implements Offerings {
|
|
|
99
99
|
*/
|
|
100
100
|
private _list(
|
|
101
101
|
locationName: string,
|
|
102
|
-
options?: OfferingsListOptionalParams
|
|
102
|
+
options?: OfferingsListOptionalParams,
|
|
103
103
|
): Promise<OfferingsListResponse> {
|
|
104
104
|
return this.client.sendOperationRequest(
|
|
105
105
|
{ locationName, options },
|
|
106
|
-
listOperationSpec
|
|
106
|
+
listOperationSpec,
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -116,11 +116,11 @@ export class OfferingsImpl implements Offerings {
|
|
|
116
116
|
private _listNext(
|
|
117
117
|
locationName: string,
|
|
118
118
|
nextLink: string,
|
|
119
|
-
options?: OfferingsListNextOptionalParams
|
|
119
|
+
options?: OfferingsListNextOptionalParams,
|
|
120
120
|
): Promise<OfferingsListNextResponse> {
|
|
121
121
|
return this.client.sendOperationRequest(
|
|
122
122
|
{ locationName, nextLink, options },
|
|
123
|
-
listNextOperationSpec
|
|
123
|
+
listNextOperationSpec,
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -128,43 +128,42 @@ export class OfferingsImpl implements Offerings {
|
|
|
128
128
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
129
129
|
|
|
130
130
|
const listOperationSpec: coreClient.OperationSpec = {
|
|
131
|
-
path:
|
|
132
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings",
|
|
131
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings",
|
|
133
132
|
httpMethod: "GET",
|
|
134
133
|
responses: {
|
|
135
134
|
200: {
|
|
136
|
-
bodyMapper: Mappers.OfferingsListResult
|
|
135
|
+
bodyMapper: Mappers.OfferingsListResult,
|
|
137
136
|
},
|
|
138
137
|
default: {
|
|
139
|
-
bodyMapper: Mappers.ErrorResponse
|
|
140
|
-
}
|
|
138
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
139
|
+
},
|
|
141
140
|
},
|
|
142
141
|
queryParameters: [Parameters.apiVersion],
|
|
143
142
|
urlParameters: [
|
|
144
143
|
Parameters.$host,
|
|
145
144
|
Parameters.subscriptionId,
|
|
146
|
-
Parameters.locationName
|
|
145
|
+
Parameters.locationName,
|
|
147
146
|
],
|
|
148
147
|
headerParameters: [Parameters.accept],
|
|
149
|
-
serializer
|
|
148
|
+
serializer,
|
|
150
149
|
};
|
|
151
150
|
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
152
151
|
path: "{nextLink}",
|
|
153
152
|
httpMethod: "GET",
|
|
154
153
|
responses: {
|
|
155
154
|
200: {
|
|
156
|
-
bodyMapper: Mappers.OfferingsListResult
|
|
155
|
+
bodyMapper: Mappers.OfferingsListResult,
|
|
157
156
|
},
|
|
158
157
|
default: {
|
|
159
|
-
bodyMapper: Mappers.ErrorResponse
|
|
160
|
-
}
|
|
158
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
159
|
+
},
|
|
161
160
|
},
|
|
162
161
|
urlParameters: [
|
|
163
162
|
Parameters.$host,
|
|
164
163
|
Parameters.subscriptionId,
|
|
165
164
|
Parameters.nextLink,
|
|
166
|
-
Parameters.locationName
|
|
165
|
+
Parameters.locationName,
|
|
167
166
|
],
|
|
168
167
|
headerParameters: [Parameters.accept],
|
|
169
|
-
serializer
|
|
168
|
+
serializer,
|
|
170
169
|
};
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
OperationsListNextOptionalParams,
|
|
19
19
|
OperationsListOptionalParams,
|
|
20
20
|
OperationsListResponse,
|
|
21
|
-
OperationsListNextResponse
|
|
21
|
+
OperationsListNextResponse,
|
|
22
22
|
} from "../models";
|
|
23
23
|
|
|
24
24
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -39,7 +39,7 @@ export class OperationsImpl implements Operations {
|
|
|
39
39
|
* @param options The options parameters.
|
|
40
40
|
*/
|
|
41
41
|
public list(
|
|
42
|
-
options?: OperationsListOptionalParams
|
|
42
|
+
options?: OperationsListOptionalParams,
|
|
43
43
|
): PagedAsyncIterableIterator<Operation> {
|
|
44
44
|
const iter = this.listPagingAll(options);
|
|
45
45
|
return {
|
|
@@ -54,13 +54,13 @@ export class OperationsImpl implements Operations {
|
|
|
54
54
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
55
|
}
|
|
56
56
|
return this.listPagingPage(options, settings);
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
private async *listPagingPage(
|
|
62
62
|
options?: OperationsListOptionalParams,
|
|
63
|
-
settings?: PageSettings
|
|
63
|
+
settings?: PageSettings,
|
|
64
64
|
): AsyncIterableIterator<Operation[]> {
|
|
65
65
|
let result: OperationsListResponse;
|
|
66
66
|
let continuationToken = settings?.continuationToken;
|
|
@@ -81,7 +81,7 @@ export class OperationsImpl implements Operations {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
private async *listPagingAll(
|
|
84
|
-
options?: OperationsListOptionalParams
|
|
84
|
+
options?: OperationsListOptionalParams,
|
|
85
85
|
): AsyncIterableIterator<Operation> {
|
|
86
86
|
for await (const page of this.listPagingPage(options)) {
|
|
87
87
|
yield* page;
|
|
@@ -93,7 +93,7 @@ export class OperationsImpl implements Operations {
|
|
|
93
93
|
* @param options The options parameters.
|
|
94
94
|
*/
|
|
95
95
|
private _list(
|
|
96
|
-
options?: OperationsListOptionalParams
|
|
96
|
+
options?: OperationsListOptionalParams,
|
|
97
97
|
): Promise<OperationsListResponse> {
|
|
98
98
|
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
99
99
|
}
|
|
@@ -105,11 +105,11 @@ export class OperationsImpl implements Operations {
|
|
|
105
105
|
*/
|
|
106
106
|
private _listNext(
|
|
107
107
|
nextLink: string,
|
|
108
|
-
options?: OperationsListNextOptionalParams
|
|
108
|
+
options?: OperationsListNextOptionalParams,
|
|
109
109
|
): Promise<OperationsListNextResponse> {
|
|
110
110
|
return this.client.sendOperationRequest(
|
|
111
111
|
{ nextLink, options },
|
|
112
|
-
listNextOperationSpec
|
|
112
|
+
listNextOperationSpec,
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
121
121
|
httpMethod: "GET",
|
|
122
122
|
responses: {
|
|
123
123
|
200: {
|
|
124
|
-
bodyMapper: Mappers.OperationsList
|
|
124
|
+
bodyMapper: Mappers.OperationsList,
|
|
125
125
|
},
|
|
126
126
|
default: {
|
|
127
|
-
bodyMapper: Mappers.ErrorResponse
|
|
128
|
-
}
|
|
127
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
128
|
+
},
|
|
129
129
|
},
|
|
130
130
|
queryParameters: [Parameters.apiVersion],
|
|
131
131
|
urlParameters: [Parameters.$host],
|
|
132
132
|
headerParameters: [Parameters.accept],
|
|
133
|
-
serializer
|
|
133
|
+
serializer,
|
|
134
134
|
};
|
|
135
135
|
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
136
136
|
path: "{nextLink}",
|
|
137
137
|
httpMethod: "GET",
|
|
138
138
|
responses: {
|
|
139
139
|
200: {
|
|
140
|
-
bodyMapper: Mappers.OperationsList
|
|
140
|
+
bodyMapper: Mappers.OperationsList,
|
|
141
141
|
},
|
|
142
142
|
default: {
|
|
143
|
-
bodyMapper: Mappers.ErrorResponse
|
|
144
|
-
}
|
|
143
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
144
|
+
},
|
|
145
145
|
},
|
|
146
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
147
147
|
headerParameters: [Parameters.accept],
|
|
148
|
-
serializer
|
|
148
|
+
serializer,
|
|
149
149
|
};
|
|
@@ -14,7 +14,11 @@ import { AzureQuantumManagementClient } from "../azureQuantumManagementClient";
|
|
|
14
14
|
import {
|
|
15
15
|
CheckNameAvailabilityParameters,
|
|
16
16
|
WorkspaceCheckNameAvailabilityOptionalParams,
|
|
17
|
-
WorkspaceCheckNameAvailabilityResponse
|
|
17
|
+
WorkspaceCheckNameAvailabilityResponse,
|
|
18
|
+
WorkspaceListKeysOptionalParams,
|
|
19
|
+
WorkspaceListKeysResponse,
|
|
20
|
+
APIKeys,
|
|
21
|
+
WorkspaceRegenerateKeysOptionalParams,
|
|
18
22
|
} from "../models";
|
|
19
23
|
|
|
20
24
|
/** Class containing Workspace operations. */
|
|
@@ -38,11 +42,50 @@ export class WorkspaceImpl implements Workspace {
|
|
|
38
42
|
checkNameAvailability(
|
|
39
43
|
locationName: string,
|
|
40
44
|
checkNameAvailabilityParameters: CheckNameAvailabilityParameters,
|
|
41
|
-
options?: WorkspaceCheckNameAvailabilityOptionalParams
|
|
45
|
+
options?: WorkspaceCheckNameAvailabilityOptionalParams,
|
|
42
46
|
): Promise<WorkspaceCheckNameAvailabilityResponse> {
|
|
43
47
|
return this.client.sendOperationRequest(
|
|
44
48
|
{ locationName, checkNameAvailabilityParameters, options },
|
|
45
|
-
checkNameAvailabilityOperationSpec
|
|
49
|
+
checkNameAvailabilityOperationSpec,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the
|
|
55
|
+
* Quantum REST APIs. Only one key is needed at a time; two are given to provide seamless key
|
|
56
|
+
* regeneration.
|
|
57
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
58
|
+
* @param workspaceName The name of the quantum workspace resource.
|
|
59
|
+
* @param options The options parameters.
|
|
60
|
+
*/
|
|
61
|
+
listKeys(
|
|
62
|
+
resourceGroupName: string,
|
|
63
|
+
workspaceName: string,
|
|
64
|
+
options?: WorkspaceListKeysOptionalParams,
|
|
65
|
+
): Promise<WorkspaceListKeysResponse> {
|
|
66
|
+
return this.client.sendOperationRequest(
|
|
67
|
+
{ resourceGroupName, workspaceName, options },
|
|
68
|
+
listKeysOperationSpec,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop
|
|
74
|
+
* working immediately.
|
|
75
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
76
|
+
* @param workspaceName The name of the quantum workspace resource.
|
|
77
|
+
* @param keySpecification Which key to regenerate: primary or secondary.
|
|
78
|
+
* @param options The options parameters.
|
|
79
|
+
*/
|
|
80
|
+
regenerateKeys(
|
|
81
|
+
resourceGroupName: string,
|
|
82
|
+
workspaceName: string,
|
|
83
|
+
keySpecification: APIKeys,
|
|
84
|
+
options?: WorkspaceRegenerateKeysOptionalParams,
|
|
85
|
+
): Promise<void> {
|
|
86
|
+
return this.client.sendOperationRequest(
|
|
87
|
+
{ resourceGroupName, workspaceName, keySpecification, options },
|
|
88
|
+
regenerateKeysOperationSpec,
|
|
46
89
|
);
|
|
47
90
|
}
|
|
48
91
|
}
|
|
@@ -50,25 +93,66 @@ export class WorkspaceImpl implements Workspace {
|
|
|
50
93
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
51
94
|
|
|
52
95
|
const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|
53
|
-
path:
|
|
54
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability",
|
|
96
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability",
|
|
55
97
|
httpMethod: "POST",
|
|
56
98
|
responses: {
|
|
57
99
|
200: {
|
|
58
|
-
bodyMapper: Mappers.CheckNameAvailabilityResult
|
|
100
|
+
bodyMapper: Mappers.CheckNameAvailabilityResult,
|
|
59
101
|
},
|
|
60
102
|
default: {
|
|
61
|
-
bodyMapper: Mappers.ErrorResponse
|
|
62
|
-
}
|
|
103
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
104
|
+
},
|
|
63
105
|
},
|
|
64
106
|
requestBody: Parameters.checkNameAvailabilityParameters,
|
|
65
107
|
queryParameters: [Parameters.apiVersion],
|
|
66
108
|
urlParameters: [
|
|
67
109
|
Parameters.$host,
|
|
68
110
|
Parameters.subscriptionId,
|
|
69
|
-
Parameters.locationName
|
|
111
|
+
Parameters.locationName,
|
|
112
|
+
],
|
|
113
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
114
|
+
mediaType: "json",
|
|
115
|
+
serializer,
|
|
116
|
+
};
|
|
117
|
+
const listKeysOperationSpec: coreClient.OperationSpec = {
|
|
118
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/listKeys",
|
|
119
|
+
httpMethod: "POST",
|
|
120
|
+
responses: {
|
|
121
|
+
200: {
|
|
122
|
+
bodyMapper: Mappers.ListKeysResult,
|
|
123
|
+
},
|
|
124
|
+
default: {
|
|
125
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
queryParameters: [Parameters.apiVersion],
|
|
129
|
+
urlParameters: [
|
|
130
|
+
Parameters.$host,
|
|
131
|
+
Parameters.resourceGroupName,
|
|
132
|
+
Parameters.subscriptionId,
|
|
133
|
+
Parameters.workspaceName,
|
|
134
|
+
],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
136
|
+
serializer,
|
|
137
|
+
};
|
|
138
|
+
const regenerateKeysOperationSpec: coreClient.OperationSpec = {
|
|
139
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/regenerateKey",
|
|
140
|
+
httpMethod: "POST",
|
|
141
|
+
responses: {
|
|
142
|
+
204: {},
|
|
143
|
+
default: {
|
|
144
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
requestBody: Parameters.keySpecification,
|
|
148
|
+
queryParameters: [Parameters.apiVersion],
|
|
149
|
+
urlParameters: [
|
|
150
|
+
Parameters.$host,
|
|
151
|
+
Parameters.resourceGroupName,
|
|
152
|
+
Parameters.subscriptionId,
|
|
153
|
+
Parameters.workspaceName,
|
|
70
154
|
],
|
|
71
155
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
72
156
|
mediaType: "json",
|
|
73
|
-
serializer
|
|
157
|
+
serializer,
|
|
74
158
|
};
|