Skip to content

Commit 1f50f29

Browse files
[AutoPR @azure-arm-managedops]-generated-from-SDK Generation - JS-5863945 (Azure#37286)
Configurations: 'specification/managedoperations/ManagedOps.Management/tspconfig.yaml', API Version: 2025-07-28-preview, SDK Release Type: beta, and CommitSHA: 'ed16e10caee8ef2ab09f321272877d0efbec0d1e' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5863945 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. **Release plan link:** [https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=6712851c-60ef-f011-8407-000d3a5b0bfe](https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=6712851c-60ef-f011-8407-000d3a5b0bfe) **Submitted by**: wcashman@microsoft.com ## Release Plan Details - Release Plan: https://aka.ms/sdk-release-planner?release-plan-id=6712851c-60ef-f011-8407-000d3a5b0bfe Spec pull request: Azure/azure-rest-api-specs#40187 Spec API version: 2025-07-28-preview --------- Co-authored-by: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
1 parent 387271a commit 1f50f29

File tree

17 files changed

+128
-54
lines changed

17 files changed

+128
-54
lines changed

sdk/managedops/arm-managedops/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.0.0-beta.1 (2026-01-23)
3+
## 1.0.0-beta.1 (2026-02-13)
44

55
### Features Added
66

sdk/managedops/arm-managedops/metadata.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"apiVersion": "2025-07-28-preview",
3-
"emitterVersion": "0.48.0",
3+
"emitterVersion": "0.49.0",
44
"crossLanguageDefinitions": {
55
"CrossLanguagePackageId": "Microsoft.ManagedOps",
66
"CrossLanguageDefinitionId": {
@@ -29,8 +29,9 @@
2929
"@azure/arm-managedops!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData",
3030
"@azure/arm-managedops!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus",
3131
"@azure/arm-managedops!ManagedOpListResult:interface": "Azure.ResourceManager.ResourceListResult",
32-
"@azure/arm-managedops!ManagedOpUpdate:interface": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
33-
"@azure/arm-managedops!ManagedOpUpdateProperties:interface": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
32+
"@azure/arm-managedops!ManagedOpUpdate:interface": "Microsoft.ManagedOps.ManagedOpUpdate",
33+
"@azure/arm-managedops!ManagedOpUpdateProperties:interface": "Microsoft.ManagedOps.ManagedOpUpdateProperties",
34+
"@azure/arm-managedops!DesiredConfigurationUpdate:interface": "Microsoft.ManagedOps.DesiredConfigurationUpdate",
3435
"@azure/arm-managedops!KnownOrigin:enum": "Azure.ResourceManager.CommonTypes.Origin",
3536
"@azure/arm-managedops!KnownActionType:enum": "Azure.ResourceManager.CommonTypes.ActionType",
3637
"@azure/arm-managedops!KnownProvisioningState:enum": "Microsoft.ManagedOps.ProvisioningState",

sdk/managedops/arm-managedops/review/arm-managedops-api-node.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface ManagedOpsClientOptionalParams extends ClientOptions {
1919

2020
// @public
2121
export interface ManagedOpsContext extends Client {
22-
apiVersion: string;
22+
apiVersion?: string;
2323
subscriptionId: string;
2424
}
2525

sdk/managedops/arm-managedops/review/arm-managedops-models-node.api.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ export interface DesiredConfiguration {
5151
userAssignedManagedIdentityId: string;
5252
}
5353

54+
// @public
55+
export interface DesiredConfigurationUpdate {
56+
defenderCspm?: string;
57+
defenderForServers?: string;
58+
}
59+
5460
// @public
5561
export interface ErrorAdditionalInfo {
5662
readonly info?: any;
@@ -131,7 +137,7 @@ export interface ManagedOpUpdate {
131137

132138
// @public
133139
export interface ManagedOpUpdateProperties {
134-
desiredConfiguration?: DesiredConfiguration;
140+
desiredConfiguration?: DesiredConfigurationUpdate;
135141
}
136142

137143
// @public

sdk/managedops/arm-managedops/review/arm-managedops-node.api.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ export interface DesiredConfiguration {
7575
userAssignedManagedIdentityId: string;
7676
}
7777

78+
// @public
79+
export interface DesiredConfigurationUpdate {
80+
defenderCspm?: string;
81+
defenderForServers?: string;
82+
}
83+
7884
// @public
7985
export interface ErrorAdditionalInfo {
8086
readonly info?: any;
@@ -201,7 +207,7 @@ export interface ManagedOpUpdate {
201207

202208
// @public
203209
export interface ManagedOpUpdateProperties {
204-
desiredConfiguration?: DesiredConfiguration;
210+
desiredConfiguration?: DesiredConfigurationUpdate;
205211
}
206212

207213
// @public

sdk/managedops/arm-managedops/samples-dev/managedOpsCreateOrUpdateSample.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ async function managedOpsCreateOrUpdate(): Promise<void> {
1616
const client = new ManagedOpsClient(credential, subscriptionId);
1717
const result = await client.managedOps.createOrUpdate("default", {
1818
properties: {
19-
sku: { name: "ManagedOps", tier: "Essential" },
2019
desiredConfiguration: {
2120
changeTrackingAndInventory: {
2221
logAnalyticsWorkspaceId:

sdk/managedops/arm-managedops/samples/v1-beta/javascript/managedOpsCreateOrUpdateSample.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ async function managedOpsCreateOrUpdate() {
1616
const client = new ManagedOpsClient(credential, subscriptionId);
1717
const result = await client.managedOps.createOrUpdate("default", {
1818
properties: {
19-
sku: { name: "ManagedOps", tier: "Essential" },
2019
desiredConfiguration: {
2120
changeTrackingAndInventory: {
2221
logAnalyticsWorkspaceId:

sdk/managedops/arm-managedops/src/api/managedOps/operations.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function _$deleteSend(
3535
{
3636
subscriptionId: context.subscriptionId,
3737
managedOpsName: managedOpsName,
38-
"api%2Dversion": context.apiVersion,
38+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
3939
},
4040
{
4141
allowReserved: options?.requestOptions?.skipUrlEncoding,
@@ -45,7 +45,7 @@ export function _$deleteSend(
4545
}
4646

4747
export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {
48-
const expectedStatuses = ["202", "204", "200", "201"];
48+
const expectedStatuses = ["202", "204", "200"];
4949
if (!expectedStatuses.includes(result.status)) {
5050
const error = createRestError(result);
5151
error.details = errorResponseDeserializer(result.body);
@@ -66,11 +66,12 @@ export function $delete(
6666
managedOpsName: string,
6767
options: ManagedOpsDeleteOptionalParams = { requestOptions: {} },
6868
): PollerLike<OperationState<void>, void> {
69-
return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200", "201"], {
69+
return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
7070
updateIntervalInMs: options?.updateIntervalInMs,
7171
abortSignal: options?.abortSignal,
7272
getInitialResponse: () => _$deleteSend(context, managedOpsName, options),
7373
resourceLocationConfig: "location",
74+
apiVersion: context.apiVersion ?? "2025-07-28-preview",
7475
}) as PollerLike<OperationState<void>, void>;
7576
}
7677

@@ -85,7 +86,7 @@ export function _updateSend(
8586
{
8687
subscriptionId: context.subscriptionId,
8788
managedOpsName: managedOpsName,
88-
"api%2Dversion": context.apiVersion,
89+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
8990
},
9091
{
9192
allowReserved: options?.requestOptions?.skipUrlEncoding,
@@ -122,6 +123,7 @@ export function update(
122123
abortSignal: options?.abortSignal,
123124
getInitialResponse: () => _updateSend(context, managedOpsName, properties, options),
124125
resourceLocationConfig: "location",
126+
apiVersion: context.apiVersion ?? "2025-07-28-preview",
125127
}) as PollerLike<OperationState<ManagedOp>, ManagedOp>;
126128
}
127129

@@ -133,7 +135,7 @@ export function _listSend(
133135
"/subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps{?api%2Dversion}",
134136
{
135137
subscriptionId: context.subscriptionId,
136-
"api%2Dversion": context.apiVersion,
138+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
137139
},
138140
{
139141
allowReserved: options?.requestOptions?.skipUrlEncoding,
@@ -168,7 +170,11 @@ export function list(
168170
() => _listSend(context, options),
169171
_listDeserialize,
170172
["200"],
171-
{ itemName: "value", nextLinkName: "nextLink" },
173+
{
174+
itemName: "value",
175+
nextLinkName: "nextLink",
176+
apiVersion: context.apiVersion ?? "2025-07-28-preview",
177+
},
172178
);
173179
}
174180

@@ -183,7 +189,7 @@ export function _createOrUpdateSend(
183189
{
184190
subscriptionId: context.subscriptionId,
185191
managedOpsName: managedOpsName,
186-
"api%2Dversion": context.apiVersion,
192+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
187193
},
188194
{
189195
allowReserved: options?.requestOptions?.skipUrlEncoding,
@@ -222,6 +228,7 @@ export function createOrUpdate(
222228
abortSignal: options?.abortSignal,
223229
getInitialResponse: () => _createOrUpdateSend(context, managedOpsName, resource, options),
224230
resourceLocationConfig: "azure-async-operation",
231+
apiVersion: context.apiVersion ?? "2025-07-28-preview",
225232
}) as PollerLike<OperationState<ManagedOp>, ManagedOp>;
226233
}
227234

@@ -235,7 +242,7 @@ export function _getSend(
235242
{
236243
subscriptionId: context.subscriptionId,
237244
managedOpsName: managedOpsName,
238-
"api%2Dversion": context.apiVersion,
245+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
239246
},
240247
{
241248
allowReserved: options?.requestOptions?.skipUrlEncoding,

sdk/managedops/arm-managedops/src/api/managedOpsContext.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import type { TokenCredential } from "@azure/core-auth";
1111

1212
/** Managed Operations API. */
1313
export interface ManagedOpsContext extends Client {
14-
/** The API version to use for this operation. */
15-
/** Known values of {@link KnownVersions} that the service accepts. */
16-
apiVersion: string;
1714
/** The ID of the target subscription. The value must be an UUID. */
1815
subscriptionId: string;
16+
/** The API version to use for this operation. */
17+
/** Known values of {@link KnownVersions} that the service accepts. */
18+
apiVersion?: string;
1919
}
2020

2121
/** Optional parameters for the client. */
@@ -47,22 +47,6 @@ export function createManagedOps(
4747
credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },
4848
};
4949
const clientContext = getClient(endpointUrl, credential, updatedOptions);
50-
clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
51-
const apiVersion = options.apiVersion ?? "2025-07-28-preview";
52-
clientContext.pipeline.addPolicy({
53-
name: "ClientApiVersionPolicy",
54-
sendRequest: (req, next) => {
55-
// Use the apiVersion defined in request url directly
56-
// Append one if there is no apiVersion and we have one at client options
57-
const url = new URL(req.url);
58-
if (!url.searchParams.get("api-version")) {
59-
req.url = `${req.url}${
60-
Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"
61-
}api-version=${apiVersion}`;
62-
}
63-
64-
return next(req);
65-
},
66-
});
50+
const apiVersion = options.apiVersion;
6751
return { ...clientContext, apiVersion, subscriptionId } as ManagedOpsContext;
6852
}

sdk/managedops/arm-managedops/src/api/operations/operations.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function _listSend(
2121
const path = expandUrlTemplate(
2222
"/providers/Microsoft.ManagedOps/operations{?api%2Dversion}",
2323
{
24-
"api%2Dversion": context.apiVersion,
24+
"api%2Dversion": context.apiVersion ?? "2025-07-28-preview",
2525
},
2626
{
2727
allowReserved: options?.requestOptions?.skipUrlEncoding,
@@ -56,6 +56,10 @@ export function list(
5656
() => _listSend(context, options),
5757
_listDeserialize,
5858
["200"],
59-
{ itemName: "value", nextLinkName: "nextLink" },
59+
{
60+
itemName: "value",
61+
nextLinkName: "nextLink",
62+
apiVersion: context.apiVersion ?? "2025-07-28-preview",
63+
},
6064
);
6165
}

0 commit comments

Comments
 (0)